You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/12/31 07:08:56 UTC

[GitHub] [incubator-hudi] pratyakshsharma commented on a change in pull request #1154: [HUDI-406] Added default partition path in TimestampBasedKeyGenerator

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

 ##########
 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:
   @bvaradar I changed here with the idea that when partitionVal is returned as null from DataSourceUtils, it will not match any of the instanceof conditions, and will result in throwing the exception according to previous code. 
   But this is a valid point that the exception can be due to some user configuration error as well. Will modify the code accordingly. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services