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

Stamatis Zampetakis commented on CALCITE-2970:
----------------------------------------------

Let me try to sketch a bit what I have in mind. I would like to keep, if 
possible, the creation of {{EnumerableSort}} (and other similar enforce 
operators) in rule or rule-like structures. We could have for instance a 
{{EnforcerRule}} (or change a bit the existing {{ConverterRule}}) which among 
other things has a method (canConvert(RelTraitSet toTraits,...)}}) and is 
called in the same way as {{RelTraitDef#canConvert}}. Then we have specific 
rules like {{EnumerableSortRule}} extending {{EnforcerRule}} which can check if 
they can answer positively to the {{canConvert}} method and apply the 
transformation.

For the example above consider that the requested  {{toTraits}} is ENUMERABLE. 
[0] and our {{EnumerableSortRule#canConvert}} method performs the following 
check ENUMERABLE. [] satisfies ENUMERERABLE. [0]. The answer is true so the 
rule fires and applies the transformation introducing EnumerableSort. 

Sorry I don't have time right now to provide a detailed description but I will 
try to do it in the following weeks.

> 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