Mathieu1124 commented on a change in pull request #1920:
URL: https://github.com/apache/hudi/pull/1920#discussion_r465826414



##########
File path: 
hudi-spark/src/test/java/org/apache/hudi/keygen/TestTimestampBasedKeyGenerator.java
##########
@@ -107,6 +107,13 @@ public void testTimestampBasedKeyGenerator() throws 
IOException {
     properties = getBaseKeyConfig("DATE_STRING", "yyyy-MM-dd hh", "GMT", null);
     HoodieKey hk4 = new 
TimestampBasedKeyGenerator(properties).getKey(baseRecord);
     assertEquals("2020-01-06 12", hk4.getPartitionPath());
+
+    // timestamp is DATE_STRING, timezone is GMT+8:00, createTime is null
+    baseRecord.put("createTime", null);
+    properties = getBaseKeyConfig("DATE_STRING", "yyyy-MM-dd hh:mm:ss", 
"GMT+8:00", null);

Review comment:
       > Let us add a test case for the scenario when timestampType is SCALAR 
or EPOCH_MILLISECONDS and the value of the field is null?
   
   done




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to