Repository navigation
fix: Allow segment pruners to indicate what segment details they need to effectively prune + fixup MSQ table slicer to honor such requests - #20892
Conversation
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. The required segment details are correctly propagated through the MSQ slicer and action clients, with coverage for cluster-group pruning and detail requests.
Reviewed 9 of 9 changed files.
Validation: git diff --check passed. No tests or builds were run.
This is an automated review by Codex GPT-5.6-Luna(max)
| * Callers may pass segments that lack some of these details, so {@link #include(DataSegment)} must return true | ||
| * when a detail it needs is absent. | ||
| */ | ||
| default EnumSet<SegmentDetail> getRequiredSegmentDetails() |
There was a problem hiding this comment.
i wonder if it is good that we have a default here.. it might be safer to force everything to explicitly implement this method to make sure all pruners choose the things that they need.
There was a problem hiding this comment.
that is actually what I preferred in local dev. I was talked into adding a default by automated review before opening the PR. It convinced me that there could be mystical extensions out there that implement this api and would prefer a default over incompatibility. I kinda wonder if I should have pushed back on that and go forward with removing the default now. I think I will do that
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. The required segment details are correctly propagated through the MSQ slicer and action clients, while FilterSegmentPruner and CompositeSegmentPruner preserve the required-detail contract. The updated interface is implemented by all repository pruners.
Reviewed 9 of 9 changed files.
Validation: git diff --check passed. No tests or builds were run.
This is an automated review by Codex GPT-5.6-Luna(max)
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found in this review. The current head correctly propagates declared segment details through task-engine table slicing, unions requirements across composite pruners, preserves the no-pruner path, and updates the test action client to mirror detail trimming.
Reviewed 9 of 9 changed files. The incremental diff was reviewed first, followed by the complete current-head diff and relevant surrounding code.
This is an automated review by Codex GPT-5.6-Luna(max)
Description
FilterSegmentPrunercan prune segments based on cluster groups for segments that are built using them since #20149. This should allow msq-task engine queries to prune segments when cluster groups are being filtered on. However, that is not the case because #20006 cut back on the segment details that the RetrieveUsedSegmentsAction grabs.In the effort to actually support full pruning capabilities for
FilterSegmentPruner(and create a path forward for future pruners), this PR proposes theSegmentPrunerinterface gains a new methodgetRequiredSegmentDetailswhich returns segment details it needs to make pruning decisions. The MSQ module takes advantage of this new method in the table input slicer by submitting theRetrieveUsedSegmentsActionrequest with the details needed by the pruner, if any exist. This allows msq-task queries to prune on cluster groups when there are there.Release note
Close a functionality gap in segment pruning by msq-task queries by providing them the information about the input segments that they need to prune on cluster groups if the query is filtering on columns that are cluster group column in the underlying data. Enhancing the impact of #20149
Key changed/added classes in this PR
SegmentPrunerFilterSegmentPrunerIndexerTableInputSpecSlicerThis PR has: