-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
planner: make group expression inherit logical plan & refine rule interface. #57782
Conversation
Hi @AilinKid. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #57782 +/- ##
================================================
+ Coverage 73.1382% 73.5329% +0.3946%
================================================
Files 1670 1671 +1
Lines 460581 461849 +1268
================================================
+ Hits 336861 339611 +2750
+ Misses 103003 101521 -1482
Partials 20717 20717
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -159,15 +153,15 @@ func NewBinder(p *pattern.Pattern, gE *memo.GroupExpression) *Binder { | |||
// empty stack info, means the toppest loop. | |||
// pre-set nil is for later alignment with the traceID indexing. | |||
stackInfo: []*list.Element{}, | |||
holder: &GroupExprHolder{Cur: gE}, | |||
holder: gE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we directly keep the Logicalplan as the holder in here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not possible, some unchanged holder should be able to be traced back to its original group when copying in, LogicalPlan couldn't do that
base2 "github.com/pingcap/tidb/pkg/planner/cascades/base" | ||
"github.com/pingcap/tidb/pkg/planner/cascades/util" | ||
"github.com/pingcap/tidb/pkg/planner/core/base" | ||
"github.com/pingcap/tidb/pkg/planner/pattern" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need to organize the old cascades struct into new one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we did, currently all old stuff have been moved from ./cascades into ./cascades/old pkg, cause we want to use cascades pkg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
// WriteString implements IBufStrWriter | ||
func (sw *StrBuffer) WriteString(s string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need an extra package for strBufferWriter ? Just for add a assert in the test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's for simplicity. otherwise, we should add hint skipper like the below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: arenatlx <314806019@qq.com>
Signed-off-by: arenatlx <314806019@qq.com>
4d96d1b
to
f3ac15c
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elsa0520, hawkingrei The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #51664
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.