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

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

Currently ExpandConversionRule uses 
VolcanoPlanner.changeTraitsUsingConverters() to implement the trait conversion. 
Note that changeTraitsUsingConverters() is able to convert multiple traits at a 
time. If we create one rule for one convention with one particular trait, we 
would end up creating rules for all combination of traits. For example, if we 
have 3 conventions X, Y, and Z, then we will need XSort, YSort, ZSort, 
XExchange, YExchange, ZExchange rules. Essentially the calcite users will be 
duplicating the work which should have been handled by the framework.

>From the engineering perspective, this rule-based approach could be more 
>expensive to implement. We would have to take what's currently in 
>VolcanoPlanner.changeTraitsUsingConverters() and put into rule onMatch(). Some 
>of the logics need to be updated/rewritten since they used to live in the 
>planner. To me, that's a much bigger change than just updating 
>traitDef.convert().

MaxCompute and Flink have their own ways to handle this issue. Some of those 
work are overlapping. I think Calcite as a framework should try to solve this 
problem at a higher level so it benefits all users.

> 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: 1h 20m
>  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