bvaradar commented on a change in pull request #1154: [HUDI-406]: added default 
partition path in TimestampBasedKeyGenerator
URL: https://github.com/apache/incubator-hudi/pull/1154#discussion_r362132263
 
 

 ##########
 File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/keygen/TimestampBasedKeyGenerator.java
 ##########
 @@ -96,8 +95,7 @@ public HoodieKey getKey(GenericRecord record) {
       } else if (partitionVal instanceof String) {
         unixTime = inputDateFormat.parse(partitionVal.toString()).getTime() / 
1000;
       } else {
-        throw new HoodieNotSupportedException(
-            "Unexpected type for partition field: " + 
partitionVal.getClass().getName());
+        unixTime = 1L;
 
 Review comment:
   I dont think we should use default for this. I can understand using default 
when the value is null. But here, it is of unknown type. This could very well 
be because of some user configuration error ? Is there any specific reason why 
we should default to 1 instead of erroring out ? 

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


With regards,
Apache Git Services

Reply via email to