J-HowHuang opened a new pull request, #19700: URL: https://github.com/apache/pinot/pull/19700
## Summary `SegmentPreProcessorProvider` lets downstream projects plug in their own `SegmentPreProcessor`, but everything a subclass might want to narrow is `private`. This PR adds protected hooks so a subclass can defer parts of a preprocess run, for example building only some index types when a segment is first loaded and leaving the rest for a later reload. ## Changes `SegmentPreProcessor`: - `createHandler(IndexType)` is now `protected`. Returning `IndexHandler.NoOp.INSTANCE` leaves that index type untouched for the run: nothing is built and nothing is removed. - New `protected getColumnMinMaxValueGeneratorMode()`, defaulting to the index loading config's mode. - New `protected shouldProcessStarTrees()` and `shouldProcessMultiColumnTextIndex()`, defaulting to `true`. `needProcess()` and `process()` consult the same hooks, so a deferred step is neither reported as pending (for example by the needs-reload check) nor executed. Default column handling isn't overridable, because skipping it would leave schema columns missing from the segment. Default behavior is unchanged. ## Testing `SegmentPreProcessorTest.testSubclassDefersPreprocessSteps`: a subclass that defers inverted index changes, star-trees and min/max generation reports no pending work and changes nothing. That covers an index to add, an index to remove, a missing star-tree and missing min/max values. The default pre-processor then does all of that work. All 63 tests in `SegmentPreProcessorTest` pass. -- 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]
