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

Julian Hyde commented on CALCITE-2348:
--------------------------------------

Not sure what you mean by "take care of". If it's not valid to push an operator 
down (because the operator is non-deterministic), the rules don't push it down.

Maybe there are some kinds of non-determinism where it would be OK to push an 
operator down. In which case, I'm happy to talk about other kinds of 
non-determinism.

> handling non-deterministic operator in rules
> --------------------------------------------
>
>                 Key: CALCITE-2348
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2348
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: godfrey he
>            Assignee: Julian Hyde
>            Priority: Major
>
> Currently,  rules do not handle non-deterministic operator,
> e.g. FilterAggregateTransposeRule can't push down a non-deterministic filter 
> through an aggregate.
> {code:java}
> // rand_substr is a non-deterministic udf
> @Test public void testPushFilterPastAggWithNondeterministicFilter() {
>   final String sql = "select ename, empno, c from\n"
>       + " (select ename, empno, count(*) as c from emp group by ename, empno) 
> t\n"
>       + " where rand_substr(ename, 1, 3) = 'Tom' and empno = 10";
>   checkPlanning(FilterAggregateTransposeRule.INSTANCE, sql);
> }{code}
>  



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

Reply via email to