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

When Group By clause is present, the argument in window function should not refer to any column outside Group By

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0-incubating
    • None
    • None

    Description

      An invalid query such as:

      select max(empno) over () 
      from emp
      group by deptno
      

      This query is invalid because the argument in max (i.e., empno) points at a column which is not present in Group By clause. However, Calcite does not catch it but generate a plan.

      Invalid queries should fail early to reduce potential confusion.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            seanhychu Sean Hsuan-Yi Chu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: