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

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

godfrey he created CALCITE-2348:
-----------------------------------

             Summary: 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


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)