danny0405 commented on code in PR #12343:
URL: https://github.com/apache/hudi/pull/12343#discussion_r1862822490
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkTaskContextSupplier.java:
##########
@@ -90,4 +120,16 @@ public Option<String> getProperty(EngineProperty prop) {
throw new HoodieException("Unknown engine property :" + prop);
}
+ // This reader context is used to read records before write, like
compaction, clustering.
+ @Override
+ public Option<HoodieReaderContext> getReaderContext(HoodieTableMetaClient
metaClient, boolean useReaderContext) {
+ if (useReaderContext && parquetReaderOpt.isPresent()) {
+ return Option.of(new SparkFileFormatInternalRowReaderContext(
Review Comment:
My suggestion is we just add another `HoodieCompactor` and choose the right
one based on the given config:
```java
HoodieCompactors.getInstance(...)
```
might need to abstract a base class for the shared logic though.
Another choice is just adding a new method in `HoodieCompactor` and invoke
it specifically in the file group reader code path(based on the read context
there).
--
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]