linliu-code commented on code in PR #13498:
URL: https://github.com/apache/hudi/pull/13498#discussion_r2197836915


##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -280,7 +286,8 @@ public ClosableIterator<T> getFileRecordIterator(
   public void initRecordMerger(TypedProperties properties) {
     RecordMergeMode recordMergeMode = tableConfig.getRecordMergeMode();
     String mergeStrategyId = tableConfig.getRecordMergeStrategyId();
-    if 
(!tableConfig.getTableVersion().greaterThanOrEquals(HoodieTableVersion.EIGHT)) {
+    if 
(tableConfig.getTableVersion().greaterThanOrEquals(HoodieTableVersion.NINE)
+        || tableConfig.getTableVersion().lesserThan(HoodieTableVersion.EIGHT)) 
{

Review Comment:
   @nsivabalan , we can sync on this. I think I finally understand the workflow.
   1. For any new tables created in table version 9, payload class should not 
be set; merge mode/partial update mode should be used directly.
   2. For existing tables in table version 8, if payload class has been used, 
the merge mode and partial update mode will be set by upgrade process to table 
version 9. But in table version 9, we still keep the payload class settings for 
write path backward compatibility.
   
   Therefore, in table version 8, inference is needed for merge mode and 
partial update mode. in table version 9, we should assume merge mode/partial 
update mode have been set explicitly.
   
   Then I think I need to fix the above logic, and the upgrade/downgrade PR as 
well. 



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