yihua commented on code in PR #11895:
URL: https://github.com/apache/hudi/pull/11895#discussion_r1746363795


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java:
##########
@@ -106,6 +106,18 @@ public static List<PartitionKeyType> 
getPartitionTypes(List<String> partitionPat
     }
   }
 
+  public static List<String> getTimestampFields(List<String> 
partitionPathFields) {
+    if (partitionPathFields.size() == 1 && 
partitionPathFields.get(0).isEmpty()) {
+      return Collections.emptyList(); // Corresponds to no partition case
+    } else {
+      return partitionPathFields.stream()
+          .map(CustomAvroKeyGenerator::getPartitionFieldAndKeyType)
+          .filter(fieldAndKeyType -> 
fieldAndKeyType.getRight().equals(PartitionKeyType.TIMESTAMP))

Review Comment:
   Do we have test coverage on custom keygen where the types are in different 
combinations: (1) all timestamp type(s); (2) simple and timestamp types; (3) 
all simple type(s)?



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to