vollt icon indicating copy to clipboard operation
vollt copied to clipboard

Duplicated `ON` keyword with `ADQLQuery.toADQL()`

Open gmantele opened this issue 5 years ago • 1 comments

A second ON keyword appears in a query using an INNER JOIN when asking for the ADQL representation of the syntactic tree returned by the ADQL parser.

For instance:

String query = "SELECT * FROM table1 t1 INNER JOIN table2 t2 ON t1.id = t2.id";
ADQLQuery a = (new ADQLParser()).parseQuery(query);
System.out.println("Input query: " + query);
System.out.println("Query after parsing: " + a.toADQL());

The output is then:

Input query: SELECT * FROM table1 t1 INNER JOIN table2 t2 ON t1.id = t2.id
Query after parsing: SELECT * FROM table1 t1 INNER JOIN table2 t2 ON ON t1.id = t2.id
                                                                  ^^^^^

gmantele avatar Oct 30 '19 17:10 gmantele