nsivabalan commented on code in PR #13951:
URL: https://github.com/apache/hudi/pull/13951#discussion_r2366254305


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/BufferedRecords.java:
##########
@@ -35,7 +35,12 @@
 public class BufferedRecords {
 
   public static <T> BufferedRecord<T> fromHoodieRecord(HoodieRecord record, 
Schema schema, RecordContext<T> recordContext, Properties props, String[] 
orderingFields) {
-    boolean isDelete = record.isDelete(schema, props);
+    boolean isDelete = record.isDelete(schema, props, new DeleteContext(props, 
schema));

Review Comment:
   was about the remind the same. 
   while reviewing the other patch, bumped into this. anyways, once we land the 
other patch, the `isDeleted` value will be fetched directly from `HoodieRecord` 
is my understanding. 
   
   so, we might get rid of these. 
   but in general, once both patches are in, we should not have any per record 
DeleteContext instantiation during the construction of `BufferedRecord` 



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieWriteHandle.java:
##########
@@ -140,6 +143,8 @@ protected HoodieWriteHandle(HoodieWriteConfig config, 
String instantTime, String
         && hoodieTable.getMetaClient().getTableConfig().getRecordMergeMode() 
== EVENT_TIME_ORDERING
         && ConfigUtils.isTrackingEventTimeWatermark(config.getProps());
     this.keepConsistentLogicalTimestamp = isTrackingEventTimeWatermark && 
ConfigUtils.shouldKeepConsistentLogicalTimestamp(config.getProps());
+    this.deleteContext = new 
DeleteContext(ConfigUtils.getMergeProps(config.getProps(), 
hoodieTable.getMetaClient().getTableConfig().getProps()), 
writeSchema).withReaderSchema(writeSchema);
+    this.deleteContextWithMetaFields = new 
DeleteContext(ConfigUtils.getMergeProps(config.getProps(), 
hoodieTable.getMetaClient().getTableConfig().getProps()), 
writeSchemaWithMetaFields).withReaderSchema(writeSchemaWithMetaFields);

Review Comment:
   yes, we might need just one of the deleteContext for one instance of a 
`HoodieWriteHandle`. 
   



-- 
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]

Reply via email to