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
fix: union distinct between unsharded route and sharded join #12968
Conversation
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
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.
The other changes look fine to me.
expr := node.OutputColumns()[offset] | ||
aliasedExpr, isAliased := expr.(*sqlparser.AliasedExpr) | ||
if !isAliased { | ||
return 0, vterrors.VT13001("cannot convert JOIN output columns to an aliased-expression") | ||
} |
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.
Don't we need this check anymore?
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 no test for it.
I think I can add a case and put this back in.
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 able to come up with the test.
It can either be
aliasexpr or starExpr. For starExpr on sharded join query we fail early.
I was unable to backport this Pull Request to the following branches: |
@harshit-gangal backports are missing here |
…d join (#12968) (#12983) * fix: union distinct between unsharded route and sharded join Signed-off-by: Harshit Gangal <harshit@planetscale.com> * test: removed TablesUsed from the expected output Signed-off-by: Harshit Gangal <harshit@planetscale.com> --------- Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Description
This PR fixes a panic on pushing weight_string function on a join plan over a union operator for distinct planning.
Related Issue(s)
Checklist
Deployment Notes