nsivabalan commented on code in PR #9892:
URL: https://github.com/apache/hudi/pull/9892#discussion_r1366218260
##########
hudi-common/src/main/java/org/apache/hudi/common/model/BaseAvroPayload.java:
##########
@@ -83,7 +89,7 @@ public boolean canProduceSentinel() {
* @param genericRecord instance of {@link GenericRecord} of interest.
* @returns {@code true} if record represents a delete record. {@code false}
otherwise.
*/
- protected boolean isDeleteRecord(GenericRecord genericRecord) {
+ protected boolean isDeleteRecord(GenericRecord genericRecord, Properties
props) {
Review Comment:
should we keep the older isDeleteRecord just to ensure user defined payload
which calls super.isDeleteRecord may not break.
##########
hudi-common/src/main/java/org/apache/hudi/common/model/BaseAvroPayload.java:
##########
@@ -43,16 +45,20 @@ public abstract class BaseAvroPayload implements
Serializable {
protected final boolean isDeletedRecord;
+ public BaseAvroPayload(GenericRecord record, Comparable orderingVal) {
Review Comment:
should we mark this deprecated. so that users will start using the other
constructor.
##########
hudi-common/src/main/java/org/apache/hudi/common/model/DefaultHoodieRecordPayload.java:
##########
@@ -86,30 +86,27 @@ public Option<IndexedRecord> getInsertValue(Schema schema,
Properties properties
GenericRecord incomingRecord = HoodieAvroUtils.bytesToAvro(recordBytes,
schema);
eventTime = updateEventTime(incomingRecord, properties);
- return isDeleteRecord(incomingRecord, properties) ? Option.empty() :
Option.of(incomingRecord);
+ return isDeleted(schema, properties) ? Option.empty() :
Option.of(incomingRecord);
Review Comment:
is this incomingRecord or schema? intentional change?
##########
hudi-common/src/main/java/org/apache/hudi/common/model/DefaultHoodieRecordPayload.java:
##########
@@ -86,30 +86,27 @@ public Option<IndexedRecord> getInsertValue(Schema schema,
Properties properties
GenericRecord incomingRecord = HoodieAvroUtils.bytesToAvro(recordBytes,
schema);
eventTime = updateEventTime(incomingRecord, properties);
- return isDeleteRecord(incomingRecord, properties) ? Option.empty() :
Option.of(incomingRecord);
+ return isDeleted(schema, properties) ? Option.empty() :
Option.of(incomingRecord);
Review Comment:
is this to avoid double parsing of deleted record?
--
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]