planner: refresh pruned TopN schema before inline projection#67171
planner: refresh pruned TopN schema before inline projection#67171ti-chi-bot[bot] merged 5 commits intopingcap:masterfrom
Conversation
|
Review Complete Findings: 0 issues ℹ️ Learn more details on Pantheon AI. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughLogicalTopN.PruneColumns now always resets the operator schema ( Changes
Sequence Diagram(s)sequenceDiagram
participant Parent
participant TopN as LogicalTopN
participant Child
Parent->>TopN: PruneColumns(parentUsedCols)
TopN->>Child: PruneColumns(snapParentUsedCols)
Child-->>TopN: child.PruneColumns done
TopN->>TopN: SetSchema(nil)
TopN->>TopN: InlineProjection(snapParentUsedCols)
TopN-->>Parent: PruneColumns returns
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67171 +/- ##
================================================
- Coverage 77.7126% 77.4528% -0.2598%
================================================
Files 2016 1936 -80
Lines 552501 540752 -11749
================================================
- Hits 429363 418828 -10535
- Misses 121396 121921 +525
+ Partials 1742 3 -1739
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
1 similar comment
|
/retest |
|
/retest |
Signed-off-by: Weizhen Wang <hawking.rei@gmail.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guo-shaoge, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/hold |
|
/unhold |
|
/retest |
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
|
/retest |
1 similar comment
|
/retest |
What problem does this PR solve?
Issue Number: close #65892
Problem Summary:
LogicalTopN.PruneColumnscould keep a stale schema after child pruning. When hidden sortcolumns were duplicated in that stale schema, the physical
TopNinline-projection resolve pathcould no longer match its output schema to the child schema and failed with:
Some columns of TopN_xxx cannot find the reference from its child(ren).What changed and how does it work?
LogicalTopNschema from the pruned child before running inline projectionCheck List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit
Bug Fixes
Tests
Chores