calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <julianh...@gmail.com>
Subject Re: JdbcSort not used in plan.
Date Wed, 11 Mar 2015 16:50:33 GMT
Likely cause is that JdbcSort is being created without its RelCollation properly set up. It
should have a create method similar to LogicalSort, and clients should call that rather than
the constructor directly.

Julian

> On Mar 11, 2015, at 8:25 AM, Julian Hyde <julianhyde@gmail.com> wrote:
> 
> Can you please log a jira case and we'll progress the issue there. 
> 
> Julian
> 
>> On Mar 11, 2015, at 02:02, Jiunn Jye Ng <jiunnjye@gmail.com> wrote:
>> 
>> Hi,
>> 
>> When running a query with Order By clause using JdbcAdapter, I observed the
>> JdbcSort rule is not being used.
>> 
>> I have try a few variation of order by and the calcite always fall to
>> using EnumerableSort.
>> 
>> I tried to workaround by it override JdbcSort.computeSelfCost to return a
>> very minimal value (CPU = 1, ROW = 1, IO  = 0)
>> 
>> but the cheapest plan always fall to using EnumerableSort even though the
>> EnumerableSort.computeSelfCost return a higher value. (CPU:100.0 io:0.0
>> row:3684.1361487904733)
>> 
>> Can someone give me some pointer why this does not work and how the
>> cheapest plan identification work?
>> 
>> I have also tried override getRows and that does not work neither.
>> 
>> 
>> Thank you.
>> 
>> Rgds,
>> jay


Mime
View raw message