xushiyan commented on a change in pull request #4471: URL: https://github.com/apache/hudi/pull/4471#discussion_r778566200
########## File path: hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/RowKeyGeneratorHelper.java ########## @@ -116,6 +119,7 @@ public static String getPartitionPathFromRow(Row row, List<String> partitionPath } } else { // nested Object nestedVal = getNestedFieldVal(row, partitionPathPositions.get(field)); + nestedVal = convertInstantToTimestampIfNeed(nestedVal); Review comment: try to be consistent with the other case ```suggestion Object data = getNestedFieldVal(row, partitionPathPositions.get(field)); nestedVal = convertInstantToTimestampIfNeed(data); ``` ########## File path: hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/RowKeyGeneratorHelper.java ########## @@ -266,4 +270,11 @@ public static Object getNestedFieldVal(Row row, List<Integer> positions) { } return positions; } + + private static Object convertInstantToTimestampIfNeed(Object data) { Review comment: optional naming change ```suggestion private static Object convertToTimestampIfInstant(Object data) { ``` -- 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