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

Cannot use parentheses after FROM in SQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.11.0
    • 1.14.0
    • None
    • None

    Description

      Some BI tools will generate some SQLs like this:

      SELECT COUNT(*) FROM (emps LEFT OUTER JOIN depts ON emps.deptno = depts.deptno);

      In this SQL, the FROM clause is contained within parentheses.

      But always failed with such exception:

      Error: Error while executing SQL "SELECT COUNT(*) FROM (emps LEFT OUTER JOIN depts ON emps.deptno = depts.deptno)": parse failed: Non-query expression encountered in illegal context (state=,code=0)

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              lidong_sjtu Dong Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: