Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-905

Improve JOIN syntax support

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Qserv
    • Labels:
      None

      Description

      At the moment, the Qserv SQL parser throws an exception when it encounters AST nodes for the "subquery" production (in parser/FromFactory).

      Note that in our grammar the table_ref production (which appears in FROM clauses) can be expanded as follows:

      table_ref
      -> table_ref_aux (qualified_join | cross_join)*
      -> table_subquery
      -> subquery
      -> "(" query_exp ")"
      -> "(" query_term ")"
      -> "(" query_primary ")"
      -> "(" table_ref ")"

      In other words, by disallowing subquery nodes in our from clauses, we've also thrown out the ability to parenthesize the constituent joins (running a query with parentheses in the from clause results in: "Qserv error: 'Unknown ANTLR error'").

      Also, the IR (query/TableRef) cannot fully represent the structure of from clauses with parenthesized components.

      We may want to fix this at some point, which would involve tweaking the IR, and being more discerning about subquery AST nodes. In particular, we would have to let through a subquery that reduces down to just a table_ref.

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              smonkewitz Serge Monkewitz
              Watchers:
              Serge Monkewitz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.