-
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/cascades: Add ImplementationRule for Window #14085
Conversation
} | ||
|
||
// CalcCost implements Implementation CalcCost interface. | ||
func (impl *WindowImpl) CalcCost(outCount float64, children ...memo.Implementation) float64 { |
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.
Consulted with @francis0407 . The Window cost is not included in the old planner and this is to be fixed later.
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.
Could add a test case in the integration_test
? You can just add a SQL which contains window function in testdata/integration_suite_in.json/TestSimplePlans
, and then run go test
with flag --record
in cascades package.
Codecov Report
@@ Coverage Diff @@
## master #14085 +/- ##
===========================================
Coverage ? 80.1752%
===========================================
Files ? 483
Lines ? 121510
Branches ? 0
===========================================
Hits ? 97421
Misses ? 16334
Partials ? 7755 |
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.
var byItems []property.Item | ||
byItems = append(byItems, lw.PartitionBy...) | ||
byItems = append(byItems, lw.OrderBy...) | ||
childProperty := &property.PhysicalProperty{ExpectedCnt: math.MaxFloat64, Items: byItems} |
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.
ExpectedCnt
is also unused here, you can remove it.
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. Thanks for your contribution.
If there're some other parts of planner which you're interested in. Feel free to contact us on Github or community slack channel.
/run-all-tests |
/run-all-tests |
What problem does this PR solve?
Part of #13709
Add ImplementationRule for Window