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_r362776898
########## File path: hudi-spark/src/main/java/org/apache/hudi/DataSourceUtils.java ########## @@ -52,29 +52,18 @@ */ public class DataSourceUtils { - /** - * Obtain value of the provided nullable field as string, denoted by dot notation. e.g: a.b.c - */ - public static String getNullableNestedFieldValAsString(GenericRecord record, String fieldName) { - try { - return getNestedFieldValAsString(record, fieldName); - } catch (HoodieException e) { - return null; - } - } - /** * Obtain value of the provided field as string, denoted by dot notation. e.g: a.b.c */ - public static String getNestedFieldValAsString(GenericRecord record, String fieldName) { - Object obj = getNestedFieldVal(record, fieldName); - return obj.toString(); + public static String getNestedFieldValAsString(GenericRecord record, String fieldName, boolean returnNullValue) { + Object obj = getNestedFieldVal(record, fieldName, returnNullValue); + return (obj == null) ? null : obj.toString(); } /** * Obtain value of the provided field, denoted by dot notation. e.g: a.b.c */ - public static Object getNestedFieldVal(GenericRecord record, String fieldName) { + public static Object getNestedFieldVal(GenericRecord record, String fieldName, boolean returnNullValue) { Review comment: 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: us...@infra.apache.org With regards, Apache Git Services