Flink SQL ParseException: Encountered "(" at line 4, column 12 - Syntax Error
This is an error message from the Flink SQL parser. It indicates that the parser encountered an unexpected '(' on line 4, column 12 of your SQL statement. The parser was expecting one of the following keywords or symbols:
'CONSTRAINT', 'NOT', 'NULL', 'PRIMARY', 'UNIQUE', 'COMMENT', 'METADATA', ')', ',', 'MULTISET', 'ARRAY'
The error likely means there's a syntax issue with your SQL statement. Double-check that you have all the necessary keywords and symbols in the correct order. It's also helpful to examine your SQL statement closely, especially the line in question (line 4), to see if you've inadvertently placed a parenthesis where it shouldn't be.
Here's an example: you might have forgotten to specify a column name within a parenthesis after a 'CREATE TABLE' statement.
The stack trace provides more detail on where the error occurred:
Caused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "(" at line 4, column 12.
Was expecting one of:
"CONSTRAINT" ...
"NOT" ...
"NULL" ...
"PRIMARY" ...
"UNIQUE" ...
"COMMENT" ...
"METADATA" ...
")" ...
"," ...
"MULTISET" ...
"ARRAY" ...
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:40981)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:40792)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlCreateTable(FlinkSqlParserImpl.java:5347)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlCreateExtended(FlinkSqlParserImpl.java:6400)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlCreate(FlinkSqlParserImpl.java:21899)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:3471)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtEof(FlinkSqlParserImpl.java:3980)
at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtEof(FlinkSqlParserImpl.java:273)
at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:153)
Please provide your SQL statement so we can offer more specific assistance.
原文地址: https://www.cveoy.top/t/topic/lYGu 著作权归作者所有。请勿转载和采集!