[ 
https://issues.apache.org/jira/browse/CALCITE-2970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17069128#comment-17069128
 ] 

Xiening Dai commented on CALCITE-2970:
--------------------------------------

[~hyuan][~zabetak][~julianhyde] I create a pull request which attempts to 
address the issue that LogicalSort, instead of EnumerableSort, is created in 
this case. The core idea is to allow register RelNode factories for different 
conventions. Note that currently we only have factories for logical RelNode 
(such as DEFAULT_SORT_FACTORY in RelFactories.java), thus can only create 
logical nodes even if the convention is specified. Once we have the RelNode 
factories available, the trait convert logic will just involve RelBuilder to 
create RelNode with given convention. 

There's one big question is how we can expose an interface so the adapters can 
register their own factories. A new interface on Planner might be required. I 
would like to hear suggestions from you. Right now I just register enumerable 
factories during planner initialization, since enumerable is part of Calcite 
core.

With this change, we are able to turn on useAbstractConvertersForConversion and 
generate merge join plan. Based on my test, I see 10X speed up on a 10 way join 
case. 

Please consider the change as Work In Progress. I still need to clean up the 
code and update a bunch of test cases. But would like to get some early 
feedback on the general direction. Thanks.

> Performance issue when enabling abstract converter for EnumerableConvention
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-2970
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2970
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Haisheng Yuan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 6h 50m
>  Remaining Estimate: 0h
>
> If we enable the use of abstract converter for {{EnumerableConvention}}, by 
> making {{useAbstractConvertersForConversion}} return true, 
> {{JDBCTest.testJoinManyWay}} will not complete.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to