[jira] [Updated] (FLINK-33523) DataType ARRAY fails to cast into Object[]
[ https://issues.apache.org/jira/browse/FLINK-33523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated FLINK-33523: --- Labels: pull-request-available (was: ) > DataType ARRAY fails to cast into Object[] > > > Key: FLINK-33523 > URL: https://issues.apache.org/jira/browse/FLINK-33523 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.18.0 >Reporter: Prabhu Joseph >Assignee: Martijn Visser >Priority: Blocker > Labels: pull-request-available > Fix For: 1.18.1 > > > When upgrading Iceberg's Flink version to 1.18, we found the Flink-related > unit test case broken due to this issue. The below code used to work fine in > Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY > fails to cast into Object[]. > *Error:* > {code} > Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to > [Ljava.lang.Object; > at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) > {code} > *Repro:* > {code} > import org.apache.flink.table.data.ArrayData; > import org.apache.flink.table.data.GenericArrayData; > import org.apache.flink.table.api.EnvironmentSettings; > import org.apache.flink.table.api.TableEnvironment; > import org.apache.flink.table.api.TableResult; > public class FlinkArrayIntNotNullTest { > public static void main(String[] args) throws Exception { > EnvironmentSettings settings = > EnvironmentSettings.newInstance().inBatchMode().build(); > TableEnvironment env = TableEnvironment.create(settings); > env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY NOT NULL>) WITH ('connector' = 'filesystem', 'path' = > '/tmp/FLINK/filesystemtable2', 'format'='json')"); > env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); > TableResult tableResult = env.executeSql("SELECT * from > filesystemtable2"); > ArrayData actualArrayData = new GenericArrayData((Object[]) > tableResult.collect().next().getField(1)); > } > } > {code} > *Analysis:* > 1. The code works fine with ARRAY datatype. The issue happens when using > ARRAY. > 2. The code works fine when casting into int[] instead of Object[]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-33523) DataType ARRAY fails to cast into Object[]
[ https://issues.apache.org/jira/browse/FLINK-33523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martijn Visser updated FLINK-33523: --- Fix Version/s: 1.18.1 > DataType ARRAY fails to cast into Object[] > > > Key: FLINK-33523 > URL: https://issues.apache.org/jira/browse/FLINK-33523 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.18.0 >Reporter: Prabhu Joseph >Priority: Blocker > Fix For: 1.18.1 > > > When upgrading Iceberg's Flink version to 1.18, we found the Flink-related > unit test case broken due to this issue. The below code used to work fine in > Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY > fails to cast into Object[]. > *Error:* > {code} > Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to > [Ljava.lang.Object; > at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) > {code} > *Repro:* > {code} > import org.apache.flink.table.data.ArrayData; > import org.apache.flink.table.data.GenericArrayData; > import org.apache.flink.table.api.EnvironmentSettings; > import org.apache.flink.table.api.TableEnvironment; > import org.apache.flink.table.api.TableResult; > public class FlinkArrayIntNotNullTest { > public static void main(String[] args) throws Exception { > EnvironmentSettings settings = > EnvironmentSettings.newInstance().inBatchMode().build(); > TableEnvironment env = TableEnvironment.create(settings); > env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY NOT NULL>) WITH ('connector' = 'filesystem', 'path' = > '/tmp/FLINK/filesystemtable2', 'format'='json')"); > env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); > TableResult tableResult = env.executeSql("SELECT * from > filesystemtable2"); > ArrayData actualArrayData = new GenericArrayData((Object[]) > tableResult.collect().next().getField(1)); > } > } > {code} > *Analysis:* > 1. The code works fine with ARRAY datatype. The issue happens when using > ARRAY. > 2. The code works fine when casting into int[] instead of Object[]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-33523) DataType ARRAY fails to cast into Object[]
[ https://issues.apache.org/jira/browse/FLINK-33523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martijn Visser updated FLINK-33523: --- Priority: Blocker (was: Major) > DataType ARRAY fails to cast into Object[] > > > Key: FLINK-33523 > URL: https://issues.apache.org/jira/browse/FLINK-33523 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.18.0 >Reporter: Prabhu Joseph >Priority: Blocker > > When upgrading Iceberg's Flink version to 1.18, we found the Flink-related > unit test case broken due to this issue. The below code used to work fine in > Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY > fails to cast into Object[]. > *Error:* > {code} > Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to > [Ljava.lang.Object; > at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) > {code} > *Repro:* > {code} > import org.apache.flink.table.data.ArrayData; > import org.apache.flink.table.data.GenericArrayData; > import org.apache.flink.table.api.EnvironmentSettings; > import org.apache.flink.table.api.TableEnvironment; > import org.apache.flink.table.api.TableResult; > public class FlinkArrayIntNotNullTest { > public static void main(String[] args) throws Exception { > EnvironmentSettings settings = > EnvironmentSettings.newInstance().inBatchMode().build(); > TableEnvironment env = TableEnvironment.create(settings); > env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY NOT NULL>) WITH ('connector' = 'filesystem', 'path' = > '/tmp/FLINK/filesystemtable2', 'format'='json')"); > env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); > TableResult tableResult = env.executeSql("SELECT * from > filesystemtable2"); > ArrayData actualArrayData = new GenericArrayData((Object[]) > tableResult.collect().next().getField(1)); > } > } > {code} > *Analysis:* > 1. The code works fine with ARRAY datatype. The issue happens when using > ARRAY. > 2. The code works fine when casting into int[] instead of Object[]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-33523) DataType ARRAY fails to cast into Object[]
[ https://issues.apache.org/jira/browse/FLINK-33523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Prabhu Joseph updated FLINK-33523: -- Component/s: Table SQL / API > DataType ARRAY fails to cast into Object[] > > > Key: FLINK-33523 > URL: https://issues.apache.org/jira/browse/FLINK-33523 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.18.0 >Reporter: Prabhu Joseph >Priority: Major > > When upgrading Iceberg's Flink version to 1.18, we found the Flink-related > unit test case broken due to this issue. The below code used to work fine in > Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY > fails to cast into Object[]. > *Error:* > {code} > Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to > [Ljava.lang.Object; > at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) > {code} > *Repro:* > {code} > import org.apache.flink.table.data.ArrayData; > import org.apache.flink.table.data.GenericArrayData; > import org.apache.flink.table.api.EnvironmentSettings; > import org.apache.flink.table.api.TableEnvironment; > import org.apache.flink.table.api.TableResult; > public class FlinkArrayIntNotNullTest { > public static void main(String[] args) throws Exception { > EnvironmentSettings settings = > EnvironmentSettings.newInstance().inBatchMode().build(); > TableEnvironment env = TableEnvironment.create(settings); > env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY NOT NULL>) WITH ('connector' = 'filesystem', 'path' = > '/tmp/FLINK/filesystemtable2', 'format'='json')"); > env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); > TableResult tableResult = env.executeSql("SELECT * from > filesystemtable2"); > ArrayData actualArrayData = new GenericArrayData((Object[]) > tableResult.collect().next().getField(1)); > } > } > {code} > *Analysis:* > 1. The code works fine with ARRAY datatype. The issue happens when using > ARRAY. > 2. The code works fine when casting into int[] instead of Object[]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-33523) DataType ARRAY fails to cast into Object[]
[ https://issues.apache.org/jira/browse/FLINK-33523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Prabhu Joseph updated FLINK-33523: -- Description: When upgrading Iceberg's Flink version to 1.18, we found the Flink-related unit test case broken due to this issue. The below code used to work fine in Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY fails to cast into Object[]. *Error:* {code} Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to [Ljava.lang.Object; at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) {code} *Repro:* {code} import org.apache.flink.table.data.ArrayData; import org.apache.flink.table.data.GenericArrayData; import org.apache.flink.table.api.EnvironmentSettings; import org.apache.flink.table.api.TableEnvironment; import org.apache.flink.table.api.TableResult; public class FlinkArrayIntNotNullTest { public static void main(String[] args) throws Exception { EnvironmentSettings settings = EnvironmentSettings.newInstance().inBatchMode().build(); TableEnvironment env = TableEnvironment.create(settings); env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY) WITH ('connector' = 'filesystem', 'path' = '/tmp/FLINK/filesystemtable2', 'format'='json')"); env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); TableResult tableResult = env.executeSql("SELECT * from filesystemtable2"); ArrayData actualArrayData = new GenericArrayData((Object[]) tableResult.collect().next().getField(1)); } } {code} *Analysis:* 1. The code works fine with ARRAY datatype. The issue happens when using ARRAY. 2. The code works fine when casting into int[] instead of Object[]. was: When upgrading Iceberg's Flink version to 1.18, we found the Flink-related unit test case broken due to this issue. The below code used to work fine in Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY fails to cast into Object[]. **Error:** {code} Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to [Ljava.lang.Object; at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) {code} **Repro:** {code} import org.apache.flink.table.data.ArrayData; import org.apache.flink.table.data.GenericArrayData; import org.apache.flink.table.api.EnvironmentSettings; import org.apache.flink.table.api.TableEnvironment; import org.apache.flink.table.api.TableResult; public class FlinkArrayIntNotNullTest { public static void main(String[] args) throws Exception { EnvironmentSettings settings = EnvironmentSettings.newInstance().inBatchMode().build(); TableEnvironment env = TableEnvironment.create(settings); env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY) WITH ('connector' = 'filesystem', 'path' = '/tmp/FLINK/filesystemtable2', 'format'='json')"); env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); TableResult tableResult = env.executeSql("SELECT * from filesystemtable2"); ArrayData actualArrayData = new GenericArrayData((Object[]) tableResult.collect().next().getField(1)); } } {code} > DataType ARRAY fails to cast into Object[] > > > Key: FLINK-33523 > URL: https://issues.apache.org/jira/browse/FLINK-33523 > Project: Flink > Issue Type: Bug >Affects Versions: 1.18.0 >Reporter: Prabhu Joseph >Priority: Major > > When upgrading Iceberg's Flink version to 1.18, we found the Flink-related > unit test case broken due to this issue. The below code used to work fine in > Flink 1.17 but failed after upgrading to 1.18. DataType ARRAY > fails to cast into Object[]. > *Error:* > {code} > Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to > [Ljava.lang.Object; > at FlinkArrayIntNotNullTest.main(FlinkArrayIntNotNullTest.java:18) > {code} > *Repro:* > {code} > import org.apache.flink.table.data.ArrayData; > import org.apache.flink.table.data.GenericArrayData; > import org.apache.flink.table.api.EnvironmentSettings; > import org.apache.flink.table.api.TableEnvironment; > import org.apache.flink.table.api.TableResult; > public class FlinkArrayIntNotNullTest { > public static void main(String[] args) throws Exception { > EnvironmentSettings settings = > EnvironmentSettings.newInstance().inBatchMode().build(); > TableEnvironment env = TableEnvironment.create(settings); > env.executeSql("CREATE TABLE filesystemtable2 (id INT, data ARRAY NOT NULL>) WITH ('connector' = 'filesystem', 'path' = > '/tmp/FLINK/filesystemtable2', 'format'='json')"); > env.executeSql("INSERT INTO filesystemtable2 VALUES (4,ARRAY [1,2,3])"); > TableResult tableResult = env.executeSql("SELECT