danny0405 commented on code in PR #6365:
URL: https://github.com/apache/hudi/pull/6365#discussion_r945403655


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/mor/MergeOnReadInputFormat.java:
##########
@@ -298,10 +299,21 @@ private ParquetColumnarRowSplitReader getReader(String 
path, int[] requiredPos)
         new org.apache.hadoop.fs.Path(path).getParent(),
         this.conf.getBoolean(FlinkOptions.HIVE_STYLE_PARTITIONING),
         FilePathUtils.extractPartitionKeys(this.conf));
+
     LinkedHashMap<String, Object> partObjects = new LinkedHashMap<>();
-    partSpec.forEach((k, v) -> partObjects.put(k, 
DataTypeUtils.resolvePartition(
-        defaultPartName.equals(v) ? null : v,
-        fieldTypes.get(fieldNames.indexOf(k)))));
+
+    // can't convert data by partition value if timestamp is used to partition 
key.
+    partSpec.entrySet().stream()
+        .filter(entry -> fieldTypes
+            .get(fieldNames.indexOf(entry.getKey()))
+            .getLogicalType().getTypeRoot() != TIMESTAMP_WITHOUT_TIME_ZONE)

Review Comment:
   Why ignore the timestamp partition field directly ? The current code may 
generates a `long` number string as partition path field, do you mean the 
`DataTypeUtils.resolvePartition` can not handle such a field ? Then we should 
fix  `DataTypeUtils.resolvePartition` firstly, and we should handle different 
precision for the timestamp type.



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