cshuo commented on code in PR #19844:
URL: https://github.com/apache/hudi/pull/19844#discussion_r3946293595
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -425,8 +425,8 @@ private static DataStream<HoodieFlinkInternalRow>
streamBootstrap(
boolean bounded) {
DataStream<HoodieFlinkInternalRow> dataStream1 =
rowDataToHoodieRecord(conf, rowType, dataStream);
- boolean isGlobalRLI = OptionsResolver.isGlobalRecordLevelIndex(conf);
- if (conf.get(FlinkOptions.INDEX_BOOTSTRAP_ENABLED) || (bounded &&
!isGlobalRLI)) {
+ boolean isRLI = OptionsResolver.isGlobalRecordLevelIndex(conf) ||
OptionsResolver.isRecordLevelIndex(conf);
Review Comment:
Could we move this check into `bootstrap()`, before the bounded/stream
routing, and return `rowDataToHoodieRecord(...)` when either RLI type is
configured and `INDEX_BOOTSTRAP_ENABLED` is false?
For partitioned RLI, `HoodieTableFactory` sets `INDEX_GLOBAL_ENABLED=false`,
so a bounded source writing to a partitioned table takes the earlier
`boundedBootstrap()` branch and never reaches this check. An early return would
cover both paths while preserving the existing routing when bootstrap is
explicitly enabled. Then `streamBootstrap()` would no longer need an
RLI-specific condition.
Please also set `INDEX_GLOBAL_ENABLED=false` in the partitioned-RLI
regression test to match the factory-produced configuration.
--
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]