[ https://issues.apache.org/jira/browse/FLINK-34902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther reopened FLINK-34902: ---------------------------------- > INSERT INTO column mismatch leads to IndexOutOfBoundsException > -------------------------------------------------------------- > > Key: FLINK-34902 > URL: https://issues.apache.org/jira/browse/FLINK-34902 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Reporter: Timo Walther > Assignee: Jeyhun Karimov > Priority: Major > Labels: pull-request-available > Fix For: 1.20.0 > > > SQL: > {code} > INSERT INTO t (a, b) SELECT 1; > {code} > > Stack trace: > {code} > org.apache.flink.table.api.ValidationException: SQL validation failed. Index > 1 out of bounds for length 1 > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.org$apache$flink$table$planner$calcite$FlinkPlannerImpl$$validate(FlinkPlannerImpl.scala:200) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:117) > at > Caused by: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for > length 1 > at > java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) > at > java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) > at > java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) > at java.base/java.util.Objects.checkIndex(Objects.java:374) > at java.base/java.util.ArrayList.get(ArrayList.java:459) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter$.$anonfun$reorder$1(PreValidateReWriter.scala:355) > at > org.apache.flink.table.planner.calcite.PreValidateReWriter$.$anonfun$reorder$1$adapted(PreValidateReWriter.scala:355) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)