danny0405 commented on code in PR #13699:
URL: https://github.com/apache/hudi/pull/13699#discussion_r2278043646
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java:
##########
@@ -397,6 +401,9 @@ protected HoodieMergeHandle getUpdateHandle(String
partitionPath, String fileId,
mergeHandle.setPartitionFields(partitionFields);
mergeHandle.setPartitionValues(partitionValues);
}
+ if (readerContextFactory != null && mergeHandle instanceof
FileGroupReaderBasedMergeHandle) {
Review Comment:
We do it for these reasons:
1. the param is only needed for the FG merge handle now, we don't want to
init the reader context for all the merge handles
2. also modifying the merge handle param will need to modify all the
executors, which is also unnecessary, like Java and Flink can fetch the reader
context directly from hoodie table.
3. thus, we want to constraint the explicit reader contex for writer path to
just "upsert" executors of Spark so that all the other executors are not
affected
4. we already did some special handling like set partition fields and values
for update handle of Spark, set reader context is another case here.
--
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]