huaxingao commented on code in PR #238:
URL: 
https://github.com/apache/arrow-datafusion-comet/pull/238#discussion_r1544958397


##########
common/src/main/java/org/apache/comet/parquet/TypeUtil.java:
##########
@@ -196,7 +196,9 @@ && isUnsignedIntTypeMatched(logicalTypeAnnotation, 64)) {
             || canReadAsBinaryDecimal(descriptor, sparkType)
             || sparkType == DataTypes.BinaryType
             // for uuid, since iceberg maps uuid to StringType
-            || sparkType == DataTypes.StringType) {
+            || sparkType == DataTypes.StringType
+                && descriptor.getPrimitiveType().getLogicalTypeAnnotation()
+                    instanceof 
LogicalTypeAnnotation.UUIDLogicalTypeAnnotation) {

Review Comment:
   > How can we test this?
   
   I have made change on my local, and used the local build to test UUID in 
iceberg table. 
   
   > this is parquet uuid logical type, why it is Iceberg specified?
   
   I don't think Spark support UUID type. If the code comes to this line, the 
type has to be Iceberg UUID. If we want to be absolutely sure, we can add a 
flag when creating ColumnReader in Iceberg.
   



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

Reply via email to