Details
-
Type:
Story
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: Qserv
-
Labels:None
-
Epic Link:
-
Team:Data Access and Database
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
- mentioned in
-
Page Loading...