Closed
Description
We are using JSqlParser (version 4.1) to parse queries from Amazon's Athena service. Many queries include a cast to a formatted ROW. Here is a simple example of this:
SELECT CAST(ROW(dataid, value, calcMark) AS ROW(datapointid CHAR, value CHAR, calcMark CHAR)) AS datapoints
This throws the following exception:
com.morningstar.neti.sqlparse.SqlParseException: Failed to parse sql: 'SELECT CAST(ROW(dataid, value, calcMark) AS ROW(datapointid CHAR, value CHAR, calcMark CHAR)) AS datapoints'
net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "ROW" "ROW"
at line 1, column 45.
Was expecting one of:
"BINARY"
"BIT"
"CHAR"
"CHARACTER"
"DOUBLE"
"INTERVAL"
"JSON"
"SET"
"SIGNED"
"UNSIGNED"
"XML"
<DT_ZONE>
<K_DATETIMELITERAL>
<K_DATE_LITERAL>
<S_IDENTIFIER>
Is this currently supported by the parser? If not, could it be added?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels