Gyula F贸ra
10/27/2023, 10:32 AMARRAY<INT not null> SQL field was previously converted to List<Integer> when converting to Row and now it seems to be an int[] . Does anyone have an idea what change my cause this in Flink? And whether this is expected.Martijn Visser
10/27/2023, 10:33 AMMartijn Visser
10/27/2023, 10:34 AMGyula F贸ra
10/27/2023, 10:34 AMMartijn Visser
10/27/2023, 10:34 AMGyula F贸ra
10/27/2023, 10:35 AMARRAY<INT not null> and the only diff is in the Row output after converting back to streamGyula F贸ra
10/27/2023, 10:37 AMP茅ter V谩ry
10/27/2023, 11:02 AMTestFlinkMetaDataTable#testAllFilesPartitionedSergey Nuyanzin
10/27/2023, 6:28 PMGyula F贸ra
10/27/2023, 8:27 PMStreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
DataStreamSource<Tuple1<int[]>> input = env.fromElements(Tuple1.of(new int[] {1}));
StreamTableEnvironment tableEnvironment = StreamTableEnvironment.create(env);
Table table =
tableEnvironment.sqlQuery(
"select * from " + tableEnvironment.fromDataStream(input));
tableEnvironment.toDataStream(table).addSink(new SinkFunction<Row>() {
@Override
public void invoke(Row value, Context context) throws Exception {
System.out.println(value.getField(0).getClass().getSimpleName());
}
});
env.execute();
For Flink 1.17 the Row field type is Integer[] for Flink 1.18 it is int[]Gyula F贸ra
10/27/2023, 8:27 PMP茅ter V谩ry
10/28/2023, 6:05 AMtry {
actualArrayData = (ArrayData) actual;
} catch (ClassCastException e) {
actualArrayData = new GenericArrayData((Object[]) actual);
}
To something like this:
try {
actualArrayData = (ArrayData) actual;
} catch (ClassCastException e) {
actualArrayData = new GenericArrayData((int[]) actual);
}
Notice the only change is the cast (Object->int)
I am not sure where we did we see the List, and without the laptop I can not reproduce now, but based on the required test change, I expect that fixing @Gyula F贸ra's example would fix the Iceberg test too.P茅ter V谩ry
11/13/2023, 2:43 PM