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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0-incubating
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: