nsivabalan commented on a change in pull request #4681:
URL: https://github.com/apache/hudi/pull/4681#discussion_r798499028



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/model/debezium/PostgresDebeziumAvroPayload.java
##########
@@ -71,6 +72,19 @@ protected boolean shouldPickCurrentRecord(IndexedRecord 
currentRecord, IndexedRe
     return insertSourceLSN < currentSourceLSN;
   }
 
+  @Override
+  public Option<IndexedRecord> combineAndGetUpdateValue(IndexedRecord 
currentValue, Schema schema, Properties properties) throws IOException {
+    // Specific to Postgres: If the updated record has TOASTED columns,
+    // we will need to keep the previous value for those columns

Review comment:
       check lines 89 to 99. adding this method which takes in properties and 
it calls respective super.combineAndGetUpdateValue(currentValue, schema, 
properties) instead of combineAndGetUpdateValue(currentValue, schema) as you 
see in line 89 to 99. 
   There is some duplication. but few couple of lines, did not feel we should 
introduce a private method. let me know wdyt. 
   

##########
File path: 
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/AbstractRealtimeRecordReader.java
##########
@@ -72,6 +75,7 @@ public AbstractRealtimeRecordReader(RealtimeSplit split, 
JobConf job) {
 
   private boolean usesCustomPayload() {
     HoodieTableMetaClient metaClient = 
HoodieTableMetaClient.builder().setConf(jobConf).setBasePath(split.getBasePath()).build();
+    
this.payloadProps.setProperty(HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY,
 metaClient.getTableConfig().getPreCombineField());

Review comment:
       We don't have access to HoodiePayloadConfig from this module. hence 
creating properties directly. 




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to