Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently we only allow columns as arguments to CUBE and ROLLUP operators, whereas we allow expressions in the GROUP BY clause. This change would also allow expressions as arguments to CUBE and ROLLUP. Example:

      // the following are valid, and will remain valid
      select deptno from emp group by deptno; 
      select deptno +1 from emp group by deptno + 1;
      select deptno from emp group by cube(deptno);
      select deptno from emp group by rollup(deptno);
      
      // the following are currently invalid, but would be valid
      select deptno +1 from emp group by cube(deptno + 1, empno - 1);
      select deptno +1 from emp group by rollup(deptno + 1, empno - 1);
      

      Note that as of CALCITE-1306, and with SqlConformance.isGroupByOrdinal enabled, select deptno from emp group by cube(1) should be valid because 1 is interpreted as an ordinal in the SELECT clause, not an expression.

        Issue Links

          Activity

          Hide
          julianhyde Julian Hyde added a comment - - edited
          Show
          julianhyde Julian Hyde added a comment - - edited It already worked; added some tests in http://git-wip-us.apache.org/repos/asf/calcite/commit/5ee895d3 .
          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Resolved in release 1.13.0 (2017-06-26).

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.13.0 (2017-06-26).

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development