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

Julian Hyde commented on CALCITE-2617:
--------------------------------------

[~rubenql], Do not change the {{containsOver}} call. It is always wrong to push 
a Filter through a Project that contains windowed-aggregates. It changes the 
result. So it should not be a predicate.

I think that we should make it configurable via a Predicate in the constructor. 
Not via a command-line {{-D}} argument.

If we make the new behavior more aggressive (i.e. push down even if there are 
correlating variables), are there any regressions? If not, I think aggressive 
should be the new default behavior.  [~amansinha100], Since you were involved 
in CALCITE-769, let me know if you disagree.

> FilterProjectTransposeRule should allow filter conditions with correlated 
> variables to be pushed down
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2617
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2617
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Stamatis Zampetakis
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.18.0
>
>
> The rule always forbids conditions with correlated variables to be pushed 
> down (as of [CALCITE-769|https://issues.apache.org/jira/browse/CALCITE-769] 
> to avoid certain problems in the decorrelation of the query). However, in the 
> general context of query optimization, it is beneficial to push-down filters 
> and the fact that there is a correlated variable is not a reason to skip this 
> optimization. 
> In order to avoid regressions, and at the same time enable correlated 
> conditions to be pushed down we should make the pushing of correlated 
> variables configurable. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to