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

Query validation fails when an ORDER BY clause is used with WITH CLAUSE

    Details

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

      Description

      This query fails in validation:

      WITH
                    x
                    AS (SELECT deptno a
                             FROM  emp)
                    (SELECT  x.a 
                    FROM   x
                    ORDER  BY x.a)
      

      while this one below, basically the same except for the "ORDER BY being gone", succeeds:

      WITH
                    x
                    AS (SELECT deptno a
                             FROM  emp)
                    (SELECT  x.a 
                    FROM   x)
      

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              seanhychu Sean Hsuan-Yi Chu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: