JingsongLi commented on code in PR #8635:
URL: https://github.com/apache/paimon/pull/8635#discussion_r3620332207
##########
paimon-api/src/main/java/org/apache/paimon/types/BlobType.java:
##########
@@ -118,6 +118,25 @@ public static boolean isBlobFileField(DataType type) {
if (type.getTypeRoot() == DataTypeRoot.ARRAY) {
return ((ArrayType) type).getElementType().getTypeRoot() ==
DataTypeRoot.BLOB;
}
+ if (type.getTypeRoot() == DataTypeRoot.MAP) {
+ MapType mapType = (MapType) type;
+ return mapType.getValueType().getTypeRoot() == DataTypeRoot.BLOB
+ && isSupportedMapBlobKeyType(mapType.getKeyType());
+ }
return false;
}
+
+ private static boolean isSupportedMapBlobKeyType(DataType keyType) {
Review Comment:
Yes, Ultimately, we should support all key types supported by Paimon.
##########
paimon-api/src/main/java/org/apache/paimon/types/BlobType.java:
##########
@@ -118,6 +118,25 @@ public static boolean isBlobFileField(DataType type) {
if (type.getTypeRoot() == DataTypeRoot.ARRAY) {
return ((ArrayType) type).getElementType().getTypeRoot() ==
DataTypeRoot.BLOB;
}
+ if (type.getTypeRoot() == DataTypeRoot.MAP) {
+ MapType mapType = (MapType) type;
+ return mapType.getValueType().getTypeRoot() == DataTypeRoot.BLOB
+ && isSupportedMapBlobKeyType(mapType.getKeyType());
+ }
return false;
}
+
+ private static boolean isSupportedMapBlobKeyType(DataType keyType) {
Review Comment:
Ultimately, we should support all key types supported by Paimon.
--
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]