[ https://issues.apache.org/jira/browse/FLINK-19818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-19818: ----------------------------------- Labels: auto-deprioritized-major stale-minor (was: auto-deprioritized-major) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized. > ArrayIndexOutOfBoundsException occus when the source table have nest json > -------------------------------------------------------------------------- > > Key: FLINK-19818 > URL: https://issues.apache.org/jira/browse/FLINK-19818 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.11.2 > Reporter: shizhengchao > Priority: Minor > Labels: auto-deprioritized-major, stale-minor > > I get an *ArrayIndexOutOfBoundsException* , when my table source have nest > json. as the follows is my test: > {code:sql} > CREATE TABLE Orders ( > nest ROW< > id BIGINT, > consumerName STRING, > price DECIMAL(10, 5), > productName STRING > >, > proctime AS PROCTIME() > ) WITH ( > 'connector' = 'kafka-0.11', > 'topic' = 'Orders', > 'properties.bootstrap.servers' = 'localhost:9092', > 'properties.group.id' = 'testGroup', > 'scan.startup.mode' = 'latest-offset', > 'format' = 'json' > ); > CREATE TABLE print ( > orderId BIGINT, > consumerName STRING, > price DECIMAL(10, 5), > productName STRING > ) WITH ( > 'connector' = 'print' > ); > CREATE VIEW testView AS > SELECT > id, > consumerName, > price, > productName > FROM ( > SELECT * FROM Orders > ); > INSERT INTO print > SELECT > * > FROM testView; > {code} > The following is the exception of flinkļ¼ > {code} > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 > at java.util.ArrayList.elementData(ArrayList.java:422) > at java.util.ArrayList.get(ArrayList.java:435) > at > org.apache.calcite.sql.validate.SelectNamespace.getMonotonicity(SelectNamespace.java:73) > at > org.apache.calcite.sql.SqlIdentifier.getMonotonicity(SqlIdentifier.java:375) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectList(SqlToRelConverter.java:4132) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:685) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:642) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3345) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:568) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.org$apache$flink$table$planner$calcite$FlinkPlannerImpl$$rel(FlinkPlannerImpl.scala:164) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.rel(FlinkPlannerImpl.scala:151) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.toQueryOperation(SqlToOperationConverter.java:789) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convertViewQuery(SqlToOperationConverter.java:696) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convertCreateView(SqlToOperationConverter.java:665) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:228) > at > org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:78) > at > org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:684) > at > com.fcbox.streaming.sql.submit.StreamingJob.callExecuteSql(StreamingJob.java:239) > at > com.fcbox.streaming.sql.submit.StreamingJob.callCommand(StreamingJob.java:207) > at > com.fcbox.streaming.sql.submit.StreamingJob.run(StreamingJob.java:133) > at > com.fcbox.streaming.sql.submit.StreamingJob.main(StreamingJob.java:77) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)