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 config 
should not be used for readers; merge mode/partial update mode should be used 
directly.
   2. For existing tables in table version 8, if payload class has been used, 
the reader should keep reading based on the CUSTOM merge mode. But in upgrade 
to table version 9, the merge mode / partial update mode should be inferred, 
and set explicitly for these payload classes. 
   
   Therefore, in table version 8, inference is not needed as well if we assume 
table version 8 will not support 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 to keep inferrence only for table 
version < 8, and the upgrade/downgrade PR to add merge/partial update mode 
explicitly 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