Gabriel39 commented on code in PR #69163:
URL: https://github.com/apache/doris/pull/69163#discussion_r4309851238


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hudi/HudiUtils.java:
##########
@@ -183,7 +183,8 @@ public static Type fromAvroHudiTypeToDorisType(Schema 
avroSchema) {
             case DOUBLE:
                 return Type.DOUBLE;
             case STRING:
-                return Type.STRING;
+                // Avro UUID is logical metadata over STRING, not an ordinary 
text column.
+                return logicalType != null && 
"uuid".equals(logicalType.getName()) ? Type.UUID : Type.STRING;

Review Comment:
   Fixed in d4de20fe88a266bee315987eec1283a7b08a8cd8.
   
   The catalog now maps the UUID FIXED(16) produced by Hudi's Avro -> 
InternalSchema -> Avro round trip to native UUID, including nullable and nested 
values. Its Hive carrier is binary so fixed UUID bytes are preserved.
   
   The JNI scanner now builds output vectors from BE's requested 
`columns_types`, keeping Hive reader types separate. UUID decoding handles 
network-order 16-byte values, legacy Text log records, and UTF-8 bytes from 
original STRING Parquet files.
   
   Validation: 40 focused FE/JNI tests pass, including the real Hudi schema 
round trip, actual Parquet STRING/FIXED readback, Hudi Writable -> Hive 
inspector -> JNI vector transport for nested arrays/maps/structs and nulls, 
reordered/empty projections, and existing timestamp/UUID regressions. 
Checkstyle and git diff --check pass. Parquet/Thrift additions are test-scoped 
and mirror the production preload setup.
   



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