[ https://issues.apache.org/jira/browse/FLINK-31301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711166#comment-17711166 ]
lincoln lee commented on FLINK-31301: ------------------------------------- [~aitozi] thanks for fixing this! I'll try to find some time to take a look. > Unsupported nested columns in column list of insert statement > ------------------------------------------------------------- > > Key: FLINK-31301 > URL: https://issues.apache.org/jira/browse/FLINK-31301 > Project: Flink > Issue Type: Bug > Components: Table SQL / API > Affects Versions: 1.17.0, 1.16.1 > Reporter: lincoln lee > Assignee: Aitozi > Priority: Major > Labels: pull-request-available > > Currently an error will be raised when use nested columns in column list of > insert statement, e.g., > {code:java} > INSERT INTO nested_type_sink (a,b.b1,c.c2,f) > SELECT a,b.b1,c.c2,f FROM nested_type_src > {code} > > {code:java} > java.lang.AssertionError > at org.apache.calcite.sql.SqlIdentifier.getSimple(SqlIdentifier.java:333) > at > org.apache.calcite.sql.validate.SqlValidatorUtil.getTargetField(SqlValidatorUtil.java:612) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter$.$anonfun$appendPartitionAndNullsProjects$3(PreValidateReWriter.scala:171) > at > scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233) > at scala.collection.Iterator.foreach(Iterator.scala:937) > at scala.collection.Iterator.foreach$(Iterator.scala:937) > at scala.collection.AbstractIterator.foreach(Iterator.scala:1425) > at scala.collection.IterableLike.foreach(IterableLike.scala:70) > at scala.collection.IterableLike.foreach$(IterableLike.scala:69) > at scala.collection.AbstractIterable.foreach(Iterable.scala:54) > at scala.collection.TraversableLike.map(TraversableLike.scala:233) > at scala.collection.TraversableLike.map$(TraversableLike.scala:226) > at scala.collection.AbstractTraversable.map(Traversable.scala:104) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter$.appendPartitionAndNullsProjects(PreValidateReWriter.scala:164) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter.rewriteInsert(PreValidateReWriter.scala:71) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter.visit(PreValidateReWriter.scala:61) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter.visit(PreValidateReWriter.scala:50) > at org.apache.calcite.sql.SqlCall.accept(SqlCall.java:161) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.org$apache$flink$table$planner$calcite$FlinkPlannerImpl$$validate(FlinkPlannerImpl.scala:118) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:113) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:281) > at > org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:106) > at > org.apache.flink.table.api.internal.StatementSetImpl.addInsertSql(StatementSetImpl.java:63) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)