Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.12.0
-
None
-
None
Description
I tried both version 1.11.0 and 1.12.0, this is the scala code to reproduce the bug
import org.apache.calcite.sql.parser.SqlParser val sqlStmt = """ select distinct foo as bar, split_part(f.value, '-', -1) as state_code from sample_table a, table(flatten(a.location_slugs)) """ SqlParser.create(sqlStmt).parseQuery()
gives
org.apache.calcite.sql.parser.SqlParseException: Encountered ". value" at line 3, column 13.
This fails because value is in the keyword list, but it is actually an alias here and shouldn't be treated as a keyword.