pvary commented on code in PR #17644:
URL: https://github.com/apache/iceberg/pull/17644#discussion_r4002706130


##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/data/AvroWithFlinkSchemaVisitor.java:
##########
@@ -51,12 +55,21 @@ protected LogicalType arrayElementType(LogicalType 
arrayType) {
   @Override
   protected LogicalType mapKeyType(LogicalType mapType) {
     Preconditions.checkArgument(isMapType(mapType), "Invalid map: %s is not a 
map", mapType);
+    if (mapType instanceof MultisetType) {
+      return ((MultisetType) mapType).getElementType();
+    }
+
     return ((MapType) mapType).getKeyType();
   }
 
   @Override
   protected LogicalType mapValueType(LogicalType mapType) {
     Preconditions.checkArgument(isMapType(mapType), "Invalid map: %s is not a 
map", mapType);

Review Comment:
   Shall we update the error message?



-- 
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]

Reply via email to