Details
-
Bug
-
Status: Closed
-
Not a Priority
-
Resolution: Fixed
-
None
-
None
Description
create table my_source ( my_row row<a int, b int, c int> ) with (...); create table my_sink ( my_row row<a int, b int> ) with (...); insert into my_sink select ROW(my_row.a, my_row.b) from my_source;
will throw excepions:
Exception in thread "main" org.apache.flink.table.api.SqlParserException: SQL parse failed. Encountered "." at line 1, column 18.Exception in thread "main" org.apache.flink.table.api.SqlParserException: SQL parse failed. Encountered "." at line 1, column 18.Was expecting one of: ")" ... "," ... at org.apache.flink.table.planner.calcite.CalciteParser.parse(CalciteParser.java:56) at org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:64) at org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlQuery(TableEnvironmentImpl.java:627) at com.bytedance.demo.KafkaTableSource.main(KafkaTableSource.java:76)Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered "." at line 1, column 18.Was expecting one of: ")" ... "," ... at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.convertException(FlinkSqlParserImpl.java:416) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.normalizeException(FlinkSqlParserImpl.java:201) at org.apache.calcite.sql.parser.SqlParser.handleException(SqlParser.java:148) at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:163) at org.apache.calcite.sql.parser.SqlParser.parseStmt(SqlParser.java:188) at org.apache.flink.table.planner.calcite.CalciteParser.parse(CalciteParser.java:54) ... 3 moreCaused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "." at line 1, column 18.Was expecting one of: ")" ... "," ... at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:36161) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:35975) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.ParenthesizedSimpleIdentifierList(FlinkSqlParserImpl.java:21432) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.Expression3(FlinkSqlParserImpl.java:17164) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.Expression2b(FlinkSqlParserImpl.java:16820) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.Expression2(FlinkSqlParserImpl.java:16861) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.Expression(FlinkSqlParserImpl.java:16792) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SelectExpression(FlinkSqlParserImpl.java:11091) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SelectItem(FlinkSqlParserImpl.java:10293) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SelectList(FlinkSqlParserImpl.java:10267) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlSelect(FlinkSqlParserImpl.java:6943) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.LeafQuery(FlinkSqlParserImpl.java:658) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.LeafQueryOrExpr(FlinkSqlParserImpl.java:16775) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.QueryOrExpr(FlinkSqlParserImpl.java:16238) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.OrderedQueryOrExpr(FlinkSqlParserImpl.java:532) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:3761) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtEof(FlinkSqlParserImpl.java:3800) at org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtEof(FlinkSqlParserImpl.java:248) at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:161) ... 5 more
Attachments
Issue Links
- duplicates
-
FLINK-22951 First parameter of ROW() function must be constant
- Closed
-
FLINK-20821 `select row(map[1,2],'ab')` parses failed
- Closed
-
FLINK-20922 row() function cannot accpet <table alias>.<column> as arguments
- Closed
-
FLINK-11399 Parsing nested ROW()s in SQL
- Closed
-
FLINK-22274 SQL parser fails to parse group by statements with brackets in views
- Closed
- is blocked by
-
FLINK-20873 Upgrade Calcite version to 1.27
- Closed
- is fixed by
-
FLINK-20873 Upgrade Calcite version to 1.27
- Closed
- relates to
-
FLINK-18342 SQLParser can not parse ROW() if it contains UDF
- Closed
-
FLINK-31787 Add the explicit ROW constructor to the system function doc
- Closed
- links to