Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2348

Handling non-deterministic operator in rules

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.17.0
    • None
    • core

    Description

      Currently,  rules do not handle non-deterministic operator,

      e.g. FilterAggregateTransposeRule can't push down a non-deterministic filter through an aggregate.

      // 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);
      }

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              godfreyhe godfrey he
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: