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

Vladimir Ozerov commented on CALCITE-4461:
------------------------------------------

Hi [~julianhyde], let me clarify the intent of the ticket. The goal is only to 
change the lines like {{LogicalFilter filter = (LogicalFilter) rel}} to 
{{Filter filter = (Filter) rel}}. This way, it becomes possible to create a 
custom config for the rule and apply it to non-logical operators. The default 
configuration pattern remains the same, so by default enumerable rules will 
fire only for {{Logical}} operators.

Does it make sense? 

I realize, that my changes to JavaDoc in the PR bring confusion, I can 
reformulate them like "Converts LogicalSomething to EnumerabeSomething. You may 
provide a custom configuration to match non-Logical operators."

> Do not cast to logical node inside Enumerable rules
> ---------------------------------------------------
>
>                 Key: CALCITE-4461
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4461
>             Project: Calcite
>          Issue Type: Task
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.27.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Currently, some {{Enumerable}} rules work with the base operator classes, 
> such as {{Join}}, while others have an explicit cast to {{Logical}} 
> counterparts, such as `LogicalJoin`, {{LogicalProject}}, etc. This makes it 
> impossible to convert custom non-logical nodes into {{Enumerable}} using the 
> built-in rules because such an invocation will fail with a 
> {{ClassCastException}}.
> The proposal is to change all existing rules so that they work with the base 
> {{RelNode}} classes.



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

Reply via email to