openinx commented on a change in pull request #1320:
URL: https://github.com/apache/iceberg/pull/1320#discussion_r469042673
##########
File path: flink/src/main/java/org/apache/iceberg/flink/RowDataWrapper.java
##########
@@ -85,52 +85,51 @@ public int size() {
}
private static PositionalGetter<?> buildGetter(LogicalType logicalType, Type
type) {
- switch (type.typeId()) {
- case STRING:
+ switch (logicalType.getTypeRoot()) {
Review comment:
I changed the type from iceberg type to flink's logical type here,
because the value of tinyint & smallint is a `byte` & `short`, when cast to
the `byte` or `short` to `Integer`
[here](https://github.com/apache/iceberg/pull/1320/files#diff-d9a34420cfd2381e6b7cb4b50ea34f19R75),
it will throw a cast failure exception. Using logical type here so that we
could cast it to integer right way.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]