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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    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

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment