vinothchandar commented on a change in pull request #1073: [HUDI-377] Adding
Delete() support to DeltaStreamer
URL: https://github.com/apache/incubator-hudi/pull/1073#discussion_r360731839
##########
File path: hudi-spark/src/main/java/org/apache/hudi/DataSourceUtils.java
##########
@@ -72,6 +72,18 @@ public static String
getNestedFieldValAsString(GenericRecord record, String fiel
return (obj == null) ? null : obj.toString();
}
+ /**
+ * Obtain value of the provided field, denoted by dot notation. e.g: a.b.c.
Return null if not found
+ */
+ public static Object getNestedFieldValOrNull(GenericRecord record, String
fieldName) {
+ try {
+ return getNestedFieldVal(record, fieldName);
+ } catch (HoodieException e) {
Review comment:
Not sure if handling this via Exception handling is the most efficient way?
`_hoodie_delete_marker` is just a top level field right? So, can't we call
`record.get()` and check for null. I think it will be much less overhead?
----------------------------------------------------------------
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