You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/06/04 17:40:00 UTC

[jira] [Comment Edited] (CALCITE-2348) handling non-deterministic operator in rules

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

Julian Hyde edited comment on CALCITE-2348 at 6/4/18 5:39 PM:
--------------------------------------------------------------

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. Doing nothing is the right thing to do.

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.


was (Author: julianhyde):
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)