morningman commented on code in PR #53399:
URL: https://github.com/apache/doris/pull/53399#discussion_r2241396667


##########
gensrc/thrift/PlanNodes.thrift:
##########
@@ -493,6 +493,8 @@ struct TFileRangeDesc {
     12: optional string fs_name
     13: optional TFileFormatType format_type;
     14: optional i64 self_split_weight
+    // partition values for data lake table format like 
iceberg/hudi/paimon/lakesoul
+    15: optional map<string, string> data_lake_partition_values;

Review Comment:
   reuse column from path



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -602,6 +609,72 @@ public static Type 
icebergTypeToDorisType(org.apache.iceberg.types.Type type) {
         }
     }
 
+    public static Map<String, String> getPartitionInfoMap(PartitionData 
partitionData, String timeZone) {
+        Map<String, String> partitionInfoMap = new HashMap<>();
+        List<NestedField> fields = 
partitionData.getPartitionType().asNestedType().fields();
+        for (int i = 0; i < fields.size(); i++) {
+            NestedField field = fields.get(i);
+            Object value = partitionData.get(i);
+            try {
+                String partitionString = serializePartitionValue(field.type(), 
value, timeZone);
+                partitionInfoMap.put(field.name(), partitionString);
+            } catch (UnsupportedOperationException e) {
+                LOG.warn("Failed to serialize partition value for field {}: 
{}", field.name(), e.getMessage());
+                return null;
+            }
+        }
+        return partitionInfoMap;
+    }
+
+    private static String 
serializePartitionValue(org.apache.iceberg.types.Type type, Object value, 
String timeZone) {
+        if (value == null) {
+            return "\\N";
+        }
+        switch (type.typeId()) {
+            case BOOLEAN:
+            case INTEGER:
+            case LONG:
+            case FLOAT:

Review Comment:
   remove float/double



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