pvary commented on code in PR #17644:
URL: https://github.com/apache/iceberg/pull/17644#discussion_r4120684836
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/data/AvroWithFlinkSchemaVisitor.java:
##########
@@ -56,14 +55,16 @@ protected LogicalType arrayElementType(LogicalType
arrayType) {
@Override
protected LogicalType mapKeyType(LogicalType mapType) {
- Preconditions.checkArgument(isMapType(mapType), "Invalid map: %s is not a
map", mapType);
- return ((MapType) mapType).getKeyType();
+ Preconditions.checkArgument(
+ isMapType(mapType), "Invalid map: %s is not a map or multiset",
mapType);
Review Comment:
Maybe move the precondition to the `asMapType`?
--
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]