Jackie-Jiang opened a new pull request, #18450: URL: https://github.com/apache/pinot/pull/18450
## Summary Adds a default-true `shouldCreateIndex(IndexCreationContext, C)` hook on `IndexType`. `BaseSegmentCreator.tryCreateIndexCreator` consults it after confirming `indexConfig.isEnabled()`; if the hook returns `false`, the index is skipped without invoking `createIndexCreator`. ## Motivation Today the dispatch loop only filters by `IndexConfig#isEnabled()`. Indexes that have runtime column-shape preconditions (e.g. min-max requires a sorted single-value column) must either return a no-op creator from `createIndexCreator` or rely on every external caller to duplicate the shape check. Both patterns push column-shape logic into the wrong place. This hook lets the index declare its runtime ineligibility in one method that the dispatcher consults once, so: - `createIndexCreator` can `Preconditions.checkArgument` the precondition holds, instead of silently no-op'ing. - External callers (e.g. plugin index handlers that build post-segment-creation) can call the same hook to share the filter. - Config-level invalidity remains the responsibility of `validate(...)`; this hook is strictly for runtime column-shape signals (`isSorted`, `isSingleValueField`, stored type, etc.). ## Compatibility Default returns `true`, so existing index types are unaffected. New plugin index types can opt in. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
