-
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/core: check the window func arg first before checking window specs #11613
Conversation
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
Codecov Report
@@ Coverage Diff @@
## master #11613 +/- ##
===========================================
Coverage 81.6469% 81.6469%
===========================================
Files 429 429
Lines 93614 93614
===========================================
Hits 76433 76433
Misses 11780 11780
Partials 5401 5401 |
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
@@ -3056,6 +3061,35 @@ func (b *PlanBuilder) buildProjectionForWindow(ctx context.Context, p LogicalPla | |||
return proj, propertyItems[:lenPartition], propertyItems[lenPartition:], newArgList, nil | |||
} | |||
|
|||
func (b *PlanBuilder) buildArgs4WindowFunc(ctx context.Context, p LogicalPlan, args []ast.ExprNode, aggMap map[*ast.AggregateFuncExpr]int) ([]expression.Expression, error) { |
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 buildArgs4WindowFunc
also be used in buildProjectionForWindow
?
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.
no. if we use that, we need to change func buildArgs4WindowFunc
to add some projection information into the plan. and then you may find the two methods are same. if so, I think it's much better just call same method instead of two methods
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
/run-all-tests |
@gaoxingliang merge failed. |
seems other cases failed |
/run-integration-common-test |
cherry pick to release-3.0 in PR #11705 |
What problem does this PR solve?
Fix #11008.
What is changed and how it works?
it seems not a good idea but we need to be compatible with mysql.
so here, when extract windows funcs, it the continue to check the window arg. when checking window func arg, it need to be able to do the expression check.
Check List
Tests
Code changes
Side effects