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 reading any tables created in table version 9, payload class config
should not be used. Merge mode/partial update mode should have been set
correctly.
2. For reading existing tables in table version < 9, if payload class has
been used, the merge mode/partial update mode should be inferred. (backward
compatibility)
3. During 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 < 9, inference should be utilized. 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 inference 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]