hudi-agent commented on code in PR #18793:
URL: https://github.com/apache/hudi/pull/18793#discussion_r3301195243
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -773,7 +773,7 @@ private TableState(Configuration conf) {
this.syncMetadata = conf.get(FlinkOptions.METADATA_ENABLED);
this.isDeltaTimeCompaction = OptionsResolver.isDeltaTimeCompaction(conf);
this.isStreamingIndexWriteEnabled =
OptionsResolver.isStreamingIndexWriteEnabled(conf);
- this.isRLIWithBootstrap = OptionsResolver.isRLIWithBootstrap(conf);
+ this.isRecordLevelIndex = OptionsResolver.isGlobalRecordLevelIndex(conf)
|| OptionsResolver.isRecordLevelIndex(conf);
Review Comment:
π€ nit: every other field in `TableState` delegates to a named
`OptionsResolver` method β could you add an `isRecordLevelIndex(conf)` helper
there instead of inlining the `||` here? Keeps the logic in one place if a
third index variant ever needs to be included.
<sub><i>- AI-generated; verify before applying. React π/π to flag
quality.</i></sub>
##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/sink/TestStreamWriteOperatorCoordinator.java:
##########
@@ -776,6 +789,16 @@ private void assertError(Runnable runnable, String
message) {
assertTrue(context.isJobFailed(), message);
}
+ private static boolean
getRecordLevelIndexFlag(StreamWriteOperatorCoordinator coordinator) throws
Exception {
Review Comment:
π€ nit: using `getDeclaredField` on string literals is fragile β a rename of
`tableState` or `isRecordLevelIndex` silently breaks this test at runtime
rather than compile time. Could you expose a package-private accessor on
`TableState`, or verify the flag's effect through observable coordinator
behavior instead?
<sub><i>- AI-generated; verify before applying. React π/π to flag
quality.</i></sub>
--
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]