tharvey5 opened a new issue, #13170:
URL: https://github.com/apache/iceberg/issues/13170
### Feature Request / Improvement
Using Iceberg 1.5.2 and Flink 1.18, this occurs using both legacy source API
and new source API (Flip27 enabled)
We have run into the following exception when running a Flink Batch Query
```
Caused by: java.lang.ClassCastException: Cannot cast
org.apache.flink.table.data.GenericArrayData to java.util.List
at java.lang.Class.cast(Class.java:3397)
at org.apache.iceberg.flink.RowDataWrapper.get(RowDataWrapper.java:74)
at org.apache.iceberg.Accessors$PositionAccessor.get(Accessors.java:71)
at org.apache.iceberg.Accessors$PositionAccessor.get(Accessors.java:58)
at
org.apache.iceberg.expressions.BoundReference.eval(BoundReference.java:40)
at
org.apache.iceberg.expressions.Evaluator$EvalVisitor.notNull(Evaluator.java:91)
at
org.apache.iceberg.expressions.Evaluator$EvalVisitor.notNull(Evaluator.java:51)
at
org.apache.iceberg.expressions.ExpressionVisitors$BoundVisitor.predicate(ExpressionVisitors.java:300)
at
org.apache.iceberg.expressions.ExpressionVisitors.visitEvaluator(ExpressionVisitors.java:390)
at
org.apache.iceberg.expressions.ExpressionVisitors.visitEvaluator(ExpressionVisitors.java:409)
at
org.apache.iceberg.expressions.Evaluator$EvalVisitor.eval(Evaluator.java:56)
at
org.apache.iceberg.expressions.Evaluator$EvalVisitor.access$100(Evaluator.java:51)
at org.apache.iceberg.expressions.Evaluator.eval(Evaluator.java:48)
at
org.apache.iceberg.flink.FlinkSourceFilter.filter(FlinkSourceFilter.java:47)
at
org.apache.iceberg.io.CloseableIterable$4.shouldKeep(CloseableIterable.java:112)
at org.apache.iceberg.io.FilterIterator.advance(FilterIterator.java:66)
at org.apache.iceberg.io.FilterIterator.hasNext(FilterIterator.java:49)
at org.apache.iceberg.io.FilterIterator.advance(FilterIterator.java:64)
at org.apache.iceberg.io.FilterIterator.hasNext(FilterIterator.java:49)
at
org.apache.iceberg.flink.source.DataIterator.updateCurrentIterator(DataIterator.java:127)
at
org.apache.iceberg.flink.source.DataIterator.seek(DataIterator.java:90)
at
org.apache.iceberg.flink.source.reader.DataIteratorReaderFunction.apply(DataIteratorReaderFunction.java:40)
at
org.apache.iceberg.flink.source.reader.DataIteratorReaderFunction.apply(DataIteratorReaderFunction.java:27)
at
org.apache.iceberg.flink.source.reader.IcebergSourceSplitReader.fetch(IcebergSourceSplitReader.java:84)
at
org.apache.flink.connector.base.source.reader.fetcher.FetchTask.run(FetchTask.java:58)
at
org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165)
... 6 more
```
To work around the issue we have temporarily added a condition in
RowDataWrapper#get as a **short term solution**
```
if (value instanceof org.apache.flink.table.data.GenericArrayData
&& javaClass == java.util.List.class) {
org.apache.flink.table.data.GenericArrayData arrayData =
(org.apache.flink.table.data.GenericArrayData) value;
return
javaClass.cast(java.util.Arrays.asList(arrayData.toObjectArray()));
}
```
We are wondering if there is any plan to address this issue since this
doesn't address other cases such as GenericArrayData or nested Generic*Data
### Query engine
Flink
### Willingness to contribute
- [x] I can contribute this improvement/feature independently
- [x] I would be willing to contribute this improvement/feature with
guidance from the Iceberg community
- [ ] I cannot contribute this improvement/feature at this time
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]