[ 
https://issues.apache.org/jira/browse/CALCITE-783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Milinda Lakmal Pathirage updated CALCITE-783:
---------------------------------------------
    Description: 
Current implementation of RelMdCollation#project doesn't handle function 
expressions and because of that we loose any collation metadata related to 
monotonic expressions which can be useful for generating streaming query 
execution plans involving tumbling windows.

Following is how current code looks like (RelMdCollation):

185: for (Ord<RexNode> project : Ord.zip(projects)) {
186:       if (project.e instanceof RexInputRef) {
187:         targets.put(((RexInputRef) project.e).getIndex(), project.i);
188:       } 
189: }

We only handle projects of type RexInputRef. But to support monotonic 
expressions we should laso handle projects of type RexCall.

  was:
Current implementation of RelMdCollation#project doesn't handle function 
expressions and because of that we loose any collation metadata related to 
monotonic expressions which can be useful generating streaming query execution 
plans involving tumbling windows.

Following is how current code looks like (RelMdCollation):

185: for (Ord<RexNode> project : Ord.zip(projects)) {
186:       if (project.e instanceof RexInputRef) {
187:         targets.put(((RexInputRef) project.e).getIndex(), project.i);
188:       } 
189: }

We only handle projects of type RexInputRef. But to support monotonic 
expressions we should laso handle projects of type RexCall.


> Infer collation of Project using monotonicity
> ---------------------------------------------
>
>                 Key: CALCITE-783
>                 URL: https://issues.apache.org/jira/browse/CALCITE-783
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Milinda Lakmal Pathirage
>            Assignee: Julian Hyde
>         Attachments: CALCITE-783-0.patch
>
>
> Current implementation of RelMdCollation#project doesn't handle function 
> expressions and because of that we loose any collation metadata related to 
> monotonic expressions which can be useful for generating streaming query 
> execution plans involving tumbling windows.
> Following is how current code looks like (RelMdCollation):
> 185: for (Ord<RexNode> project : Ord.zip(projects)) {
> 186:       if (project.e instanceof RexInputRef) {
> 187:         targets.put(((RexInputRef) project.e).getIndex(), project.i);
> 188:       } 
> 189: }
> We only handle projects of type RexInputRef. But to support monotonic 
> expressions we should laso handle projects of type RexCall.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to