LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-242] Trailing spaces after semicolon confuse SQL parser #630

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jhyde", created="Wed, 13 Dec 2006 17:22:24 -0500 (GMT-05:00)"] If there are trailing spaces after the semicolon following a stmt entered via sqlline, get a parse exception. For example,

0: jdbc:> select 1 as one
 . . . . . .> from (values (true));{space}
Error: org.eigenbase.sql.parser.SqlParseException: Encountered ";" at line 2, column 21.
Was expecting one of:
    
    "AS" ...
    "EXCEPT" ...
    "GROUP" ...
    "HAVING" ...
    "INTERSECT" ...
    "ORDER" ...
    "OVER" ...
    "TABLESAMPLE" ...
    "UNION" ...
    "WHERE" ...
    "WINDOW" ...
     ...
     ...
    "NATURAL" ...
    "JOIN" ...
    "INNER" ...
    "LEFT" ...
    "RIGHT" ...
    "FULL" ...
    "CROSS" ...
    "," ... (state=,code=0)

Interestingly, the problem does not occur if the stmt is on a single line. Problem may be in sqlline.

dynamobi-build commented 12 years ago

[author="jhyde", created="Tue, 18 May 2010 02:45:57 -0500 (GMT-05:00)"] Seems to be fixed in recent versions of sqlline.