voonhous commented on code in PR #18944:
URL: https://github.com/apache/hudi/pull/18944#discussion_r3393209664


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/BaseHoodieLogRecordReader.java:
##########
@@ -89,13 +90,16 @@ public abstract class BaseHoodieLogRecordReader<T> {
   protected final HoodieReaderContext<T> readerContext;
   protected final HoodieTableMetaClient hoodieTableMetaClient;
   // Merge strategy to use when combining records from log
+  @Getter(AccessLevel.PROTECTED)
   private final String payloadClassFQN;
   // Record's key/partition-path fields
   private final String recordKeyField;
   // Partition name override
+  @Getter
   private final Option<String> partitionNameOverrideOpt;

Review Comment:
   Checked the codebase: there are no callers of `getPartitionNameOverride()` 
or the Lombok generated `getPartitionNameOverrideOpt()` anywhere 
(`AbstractHoodieLogRecordScanner` only declares the former, never calls it). 
Since nothing depends on the old name, I standardised both classes on the 
Lombok generated getter instead: 
`AbstractHoodieLogRecordScanner.partitionNameOverrideOpt` now uses `@Getter` 
too and its explicit `getPartitionNameOverride()` is removed.
   
   Standardising on the `Opt` suffix also keeps this in line with 
`InstantRange` (`getStartInstantOpt()`/`getEndInstantOpt()`) from this PR, and 
makes the getter self-describing: callers immediately know it returns an 
`Option` without having to check the return type.



-- 
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