shenh062326 commented on a change in pull request #1819:
URL: https://github.com/apache/hudi/pull/1819#discussion_r455609009
##########
File path: hudi-spark/src/main/java/org/apache/hudi/DataSourceUtils.java
##########
@@ -176,11 +177,21 @@ public static KeyGenerator
createKeyGenerator(TypedProperties props) throws IOEx
/**
* Create a payload class via reflection, passing in an ordering/precombine
value.
*/
- public static HoodieRecordPayload createPayload(String payloadClass,
GenericRecord record, Comparable orderingVal)
- throws IOException {
+ public static HoodieRecordPayload createPayload(String payloadClass,
GenericRecord record,
+ Comparable orderingVal,
+ String deleteField) throws
IOException {
try {
- return (HoodieRecordPayload) ReflectionUtils.loadClass(payloadClass,
- new Class<?>[] {GenericRecord.class, Comparable.class}, record,
orderingVal);
+ HoodieRecordPayload payload = null;
+ if (payloadClass.equals(OverwriteWithLatestAvroPayload.class.getName())
&&
+ !deleteField.isEmpty()) {
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:
[email protected]