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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 6210dec57c0 [opt](varbinary) add conf control mapping iceberg uuid 
(#59726)
6210dec57c0 is described below

commit 6210dec57c00487d09762d7a25b9012c78a25de9
Author: zhangstar333 <[email protected]>
AuthorDate: Mon Jan 12 12:17:15 2026 +0800

    [opt](varbinary) add conf control mapping iceberg uuid (#59726)
    
    ### What problem does this PR solve?
    Related PR: https://github.com/apache/doris/pull/59406
    
    Problem Summary:
    iceberg uuid type use the conf of enable.varbinary.mapping to control
    mapping type, default is mapping to string type.
---
 be/src/vec/exec/format/parquet/schema_desc.cpp       |  8 ++++++--
 .../tvf/test_hdfs_parquet_group6.out                 | 20 ++++++++++++++++----
 .../tvf/test_hdfs_parquet_group6.groovy              | 15 +++++++++++++++
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/be/src/vec/exec/format/parquet/schema_desc.cpp 
b/be/src/vec/exec/format/parquet/schema_desc.cpp
index 4a78a09f19a..e9062753f57 100644
--- a/be/src/vec/exec/format/parquet/schema_desc.cpp
+++ b/be/src/vec/exec/format/parquet/schema_desc.cpp
@@ -306,8 +306,12 @@ std::pair<DataTypePtr, bool> 
FieldDescriptor::convert_to_doris_type(
     } else if (logicalType.__isset.JSON) {
         ans.first = DataTypeFactory::instance().create_data_type(TYPE_STRING, 
nullable);
     } else if (logicalType.__isset.UUID) {
-        ans.first =
-                DataTypeFactory::instance().create_data_type(TYPE_VARBINARY, 
nullable, -1, -1, 16);
+        if (_enable_mapping_varbinary) {
+            ans.first = 
DataTypeFactory::instance().create_data_type(TYPE_VARBINARY, nullable, -1,
+                                                                     -1, 16);
+        } else {
+            ans.first = 
DataTypeFactory::instance().create_data_type(TYPE_STRING, nullable);
+        }
     } else if (logicalType.__isset.FLOAT16) {
         ans.first = DataTypeFactory::instance().create_data_type(TYPE_FLOAT, 
nullable);
     } else {
diff --git 
a/regression-test/data/external_table_p0/tvf/test_hdfs_parquet_group6.out 
b/regression-test/data/external_table_p0/tvf/test_hdfs_parquet_group6.out
index a35fcd8e130..a797eca8601 100644
--- a/regression-test/data/external_table_p0/tvf/test_hdfs_parquet_group6.out
+++ b/regression-test/data/external_table_p0/tvf/test_hdfs_parquet_group6.out
@@ -795,10 +795,10 @@ true
 
 -- !test_98 --
 \N     \N      \N
-0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
-0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
-0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
-0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
+abcDeFGhijkLmnOp       682.56  1212��������
+abcDeFGhijkLmnOp       682.56  1212��������
+abcDeFGhijkLmnOp       682.56  1212��������
+abcDeFGhijkLmnOp       682.56  1212��������
 
 -- !test_100 --
 1317017856     1       18752152        809291  1089176 19951117        
3-MEDIUM        0       40      4801000 16034243        9       4368910 72015   
3       19951228        RAIL    Customer#018752152       q4gN2btSpiKXdN,6       
ALGERIA  1      ALGERIA AFRICA  10-753-996-8708 MACHINERY       
Supplier#001089176      ROidEL1L6yeFsJqnUjD     EGYPT    5      EGYPT   MIDDLE 
EAST     14-807-108-7869 blanched gainsboro      MFGR#4  MFGR#43 MFGR#433       
 brown   MEDIUM BRUSHED STEEL    42      MED BAG
@@ -851,3 +851,15 @@ true
 1172064        32655   5159    1       19.000000000    30165.350000000 
0.060000000     0.060000000     R       F       1994-12-08      1995-02-10      
1994-12-12      TAKE BACK RETURN        RAIL    s are carefully express, final 
packag
 1172064        77399   9907    3       49.000000000    67443.110000000 
0.060000000     0.010000000     A       F       1995-03-22      1995-02-14      
1995-04-18      TAKE BACK RETURN        RAIL    gle. even dependencies a
 
+-- !test_107 --
+\N     \N      \N
+0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
+0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
+0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
+0x6162634465464768696A6B4C6D6E4F70     682.56  1212��������
+
+-- !test_107_desc --
+decimal_flba   decimal(5,2)    Yes     false   \N      NONE
+interval       text    Yes     false   \N      NONE
+uuid   varbinary(16)   Yes     false   \N      NONE
+
diff --git 
a/regression-test/suites/external_table_p0/tvf/test_hdfs_parquet_group6.groovy 
b/regression-test/suites/external_table_p0/tvf/test_hdfs_parquet_group6.groovy
index af548a9ae50..d9896ea68be 100644
--- 
a/regression-test/suites/external_table_p0/tvf/test_hdfs_parquet_group6.groovy
+++ 
b/regression-test/suites/external_table_p0/tvf/test_hdfs_parquet_group6.groovy
@@ -795,6 +795,21 @@ 
suite("test_hdfs_parquet_group6","external,hive,tvf,external_docker") {
                         "uri" = "${uri}",
                         "hadoop.username" = "${hdfsUserName}",
                         "format" = "parquet") limit 10; """
+
+
+            uri = "${defaultFS}" + 
"/user/doris/tvf_data/test_hdfs_parquet/group6/fixed_len_byte_array.parquet"
+            order_qt_test_107 """ select * from HDFS(
+                        "uri" = "${uri}",
+                        "hadoop.username" = "${hdfsUserName}",
+                        "enable_mapping_varbinary"="true",
+                        "format" = "parquet") limit 10; """
+
+            order_qt_test_107_desc """ desc function HDFS(
+                        "uri" = "${uri}",
+                        "hadoop.username" = "${hdfsUserName}",
+                        "enable_mapping_varbinary"="true",
+                        "format" = "parquet"); """
+
         } finally {
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to