This is an automated email from the ASF dual-hosted git repository.

viirya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion-comet.git


The following commit(s) were added to refs/heads/main by this push:
     new e0b8db1  fix: Only maps FIXED_LEN_BYTE_ARRAY to String for uuid type 
(#238)
e0b8db1 is described below

commit e0b8db150be47a11bf9860f8fbdfa7a6327b7bc7
Author: Huaxin Gao <[email protected]>
AuthorDate: Thu Apr 4 08:25:48 2024 -0700

    fix: Only maps FIXED_LEN_BYTE_ARRAY to String for uuid type (#238)
    
    * Only maps FIXED_LEN_BYTE_ARRAY to String for uuid type
    
    * remove redundant code
    
    ---------
    
    Co-authored-by: Huaxin Gao <[email protected]>
---
 common/src/main/java/org/apache/comet/parquet/TypeUtil.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/src/main/java/org/apache/comet/parquet/TypeUtil.java 
b/common/src/main/java/org/apache/comet/parquet/TypeUtil.java
index 340bf98..b8b7ff5 100644
--- a/common/src/main/java/org/apache/comet/parquet/TypeUtil.java
+++ b/common/src/main/java/org/apache/comet/parquet/TypeUtil.java
@@ -196,7 +196,9 @@ public class TypeUtil {
             || canReadAsBinaryDecimal(descriptor, sparkType)
             || sparkType == DataTypes.BinaryType
             // for uuid, since iceberg maps uuid to StringType
-            || sparkType == DataTypes.StringType) {
+            || sparkType == DataTypes.StringType
+                && logicalTypeAnnotation
+                    instanceof 
LogicalTypeAnnotation.UUIDLogicalTypeAnnotation) {
           return;
         }
         break;

Reply via email to