the-other-tim-brown commented on code in PR #13591:
URL: https://github.com/apache/hudi/pull/13591#discussion_r2231627816
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -92,7 +92,7 @@ public final class HoodieFileGroupReader<T> implements
Closeable {
private final boolean allowInflightInstants;
// Callback to run custom logic on updates to the base files for the file
group
private final Option<BaseFileUpdateCallback> fileGroupUpdateCallback;
- private final boolean enableOptimizedLogBlockScan;
+ private final Boolean enableOptimizedLogBlockScan;
Review Comment:
Please keep this a primitive, if it is null let's make it false.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -575,6 +575,12 @@ public HoodieFileGroupReader<T> build() {
ValidationUtils.checkArgument(baseFileOption != null, "Base file option
is required");
ValidationUtils.checkArgument(logFiles != null, "Log files stream is
required");
ValidationUtils.checkArgument(partitionPath != null, "Partition path is
required");
+ if (enableOptimizedLogBlockScan == null) {
+ // check to see if props contains this key if not explicitly set
+ // otherwise use the default value from the config itself
+ enableOptimizedLogBlockScan =
props.getBoolean(HoodieReaderConfig.ENABLE_OPTIMIZED_LOG_BLOCKS_SCAN.key(),
Review Comment:
You will want to use the `ConfigUtils.getRawValueWithAltKeys` here so it is
does not silently break if the configs change in the future.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -544,7 +544,7 @@ public Builder<T>
withFileGroupUpdateCallback(Option<BaseFileUpdateCallback> fil
return this;
}
- public Builder<T> withEnableOptimizedLogBlockScan(boolean
enableOptimizedLogBlockScan) {
+ public Builder<T> withEnableOptimizedLogBlockScan(Boolean
enableOptimizedLogBlockScan) {
Review Comment:
Can we keep the input here as a primitive to avoid callers from passing null?
--
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]