-
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
expression: aggregate the collation only if the function is needed. #27789
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
8e8db01
to
8fe81b4
Compare
8fe81b4
to
ba1e06a
Compare
/run-all-tests |
fc2dbbb
to
ace7961
Compare
/run-check_dev_2 |
1 similar comment
/run-check_dev_2 |
/run-all-tests |
@@ -189,12 +168,102 @@ func deriveCoercibilityForColumn(c *Column) Coercibility { | |||
return CoercibilityImplicit | |||
} | |||
|
|||
func deriveCollation(ctx sessionctx.Context, funcName string, args []Expression, retType types.EvalType, argTps ...types.EvalType) (dstCharset, dstCollation string, coercibility Coercibility, err error) { | |||
switch funcName { |
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.
Please write a UT for deriveCollation(), we need more tests for 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.
will add more UT in the next PR because the next PR will make aggregate collation the same with MySQL.
@wjhuang2016 @zimulala PTAL |
/merge |
/merge cancel |
61d3fc5
to
f9da500
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: f9da500
|
@xiongjiwei: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
CheckIllegalMixCollation
andDeriveCollationFromExprs
all useinferCollation
, combain them to 1 to remove the extrainferCollation
call.DeriveCollationFromExprs
function, useCheckAndDeriveCollationFromExprs
instead.switch ... case ...
.see #26816 (comment) for why need this refactor.
close #27789
Check List
Tests
Side effects
Documentation
Release note