antlr-plsql icon indicating copy to clipboard operation
antlr-plsql copied to clipboard

Bad support for subqueries in the FROM clause

Open filipsch opened this issue 6 years ago • 1 comments

See this example on ast-viewer.datacamp.com.

A bunch of unshaped nodes.

filipsch avatar Aug 13 '18 13:08 filipsch

It looks like quite a few things can go into the FROM clause in a SELECT statement. If we just want to add support for subqueries here, I think we can just handle that case in the dml_expression_clause rule in the grammar.

https://github.com/datacamp/antlr-plsql/blob/master/antlr_plsql/plsql.g4#L1293

From what I can tell the three changes are:

  1. support a list of table expressions in the FROM clause (see this query)
  2. implement some AST structure for table aliases (see this query)
  3. handle subqueries in the FROM clause (see this query)

machow avatar Aug 14 '18 14:08 machow