the-other-tim-brown commented on code in PR #13699:
URL: https://github.com/apache/hudi/pull/13699#discussion_r2279043962
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecordPayload.java:
##########
@@ -217,4 +217,16 @@ static Option<String>
getPayloadClassNameIfPresent(Properties props) {
// Need to transparently change to org.apache.hudi.
return Option.ofNullable(payloadClassName).map(className ->
className.replace("com.uber.hoodie", "org.apache.hudi"));
}
+
+ /**
+ * Returns the writer payload override class if present in the properties.
+ * @param properties the properties to inspect
+ * @return an Option containing the writer payload override class name if
present, otherwise an empty Option
+ */
+ static Option<String> getWriterPayloadOverride(Properties properties) {
+ if (properties.containsKey("hoodie.datasource.write.payload.class")) {
Review Comment:
Thanks! I'm realizing I can also just do `Option.ofNullable` on the result
of the `get`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]