[ES|QL] Refactor MV_UNION and MV_INTERSECTION to use shared set operation helper#139982
Conversation
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Thanks for this @mridula-s109 -- this looks clean. The only thing I think we can optimize here is to not have to initialize additional sets in the helper class... I'm wondering if something like creating a |
1ca3d21 to
7e83ce5
Compare
thanks @markjhoy for the suggestion. i have addressed the code optimisation. |
markjhoy
left a comment
There was a problem hiding this comment.
Nice. In the words of Marie Kondo - "This sparks joy" 😂
* upstream/main: (191 commits) Overall Decision for Deciders prioritizes THROTTLE (elastic#140237) Apply group by all logic not only to top-level aggregates (elastic#140248) [ES|QL] Refactor MV_UNION and MV_INTERSECTION to use shared set operation helper (elastic#139982) Avoid reading entire bloom filter file on reader open (elastic#139374) Mark bloom filter files for random access (elastic#139375) Ensure that the buffer used for ES93BloomFilterStoredFieldsFormat is zeroed (elastic#139034) Add busy assertion to avoid race condition for testStalledShardMigrationProperlyDetected (elastic#140230) Remove line number check for testTransitiveFindsDeepCallChain (elastic#140228) Allow a slight difference in rescored docs (elastic#139931) Mute org.elasticsearch.xpack.inference.integration.AuthorizationTaskExecutorIT testCreatesEisChatCompletion_DoesNotRemoveEndpointWhenNoLongerAuthorized elastic#138480 Start exchange sink fetchers concurrently (elastic#140196) Allow allocation to replacement target node on vacate completion (elastic#140150) Ignore JNA cleaner threads in SecureHdfsRepositoryAnalysisRestIT (elastic#139925) DeterministicQueue refactor and enhancement (elastic#140151) Always error out if CCS expression shows up when CCS is not supported (elastic#139009) Use IllegalArgumentException over RepositoryException for readonly-repository checks (elastic#140200) Guard promql capabilities in AnalyzerTests (elastic#140232) [Inference API] Fix flaky AuthorizationTaskExecutorIT tests (elastic#139978) Cleaning up exitable vector value impls (elastic#140190) [Inference API] Fix auth exception listener not called bug (elastic#139966) ...
…tion helper (elastic#139982) * ES|QL: Refactor MV set operations to use shared helper * cleaned up the PR * updated code to use operational set
Follow-up to #139664 (MV_UNION implementation).
This PR extracts common set operation logic into a shared
MvSetOperationHelperutility class to reduce code duplication betweenMV_UNIONandMV_INTERSECTION.Changes
MvSetOperationHelperwithunion()andintersection()static methodsMvUnion.processUnionSet()andMvIntersection.processIntersectionSet()to use the helper