expression: reuse tipb.Expr 'val' to push down expression implicit parameters#10790
Merged
qw4990 merged 5 commits intopingcap:masterfrom Jun 21, 2019
lonng:pushdown-cast-flag
Merged
expression: reuse tipb.Expr 'val' to push down expression implicit parameters#10790qw4990 merged 5 commits intopingcap:masterfrom lonng:pushdown-cast-flag
qw4990 merged 5 commits intopingcap:masterfrom
lonng:pushdown-cast-flag
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10790 +/- ##
================================================
- Coverage 80.9963% 80.9551% -0.0412%
================================================
Files 419 419
Lines 88825 88759 -66
================================================
- Hits 71945 71855 -90
- Misses 11652 11672 +20
- Partials 5228 5232 +4 |
2 tasks
qw4990
reviewed
Jun 20, 2019
This was referenced Jun 20, 2019
…rameters Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng <heng@lonng.org>
Contributor
Author
|
@breeswish PTAL |
Member
|
LGTM |
Contributor
Author
|
/run-all-tests |
Signed-off-by: Lonng <heng@lonng.org>
Contributor
|
Please fix these CI problems. |
zz-jason
reviewed
Jun 21, 2019
| } | ||
|
|
||
| // implicitArgs returns the implicit arguments of cast functions | ||
| func (b *baseBuiltinCastFunc) implicitArgs() []types.Datum { |
Member
There was a problem hiding this comment.
Why use Datum? Can we change to another data structure?
Contributor
Author
There was a problem hiding this comment.
I think Datum is the best structure which is used to exchange implicit arguments.
- Codec is easily on both sides.
- The encoded bytes are small.
- General used in TiDB/TiKV (some implicit arguments do not need any transform)
Contributor
Author
|
/run-all-tests |
Contributor
Author
|
/run-mybatis-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Add an
implicitParametersmethod to thebuiltinFuncinterface, and provide a default implementation forbaseBuiltinFunc.The
UnionAllexecutor will infer its children's results type and addCASTfunction if necessary. TheCASTfunctions in this scenario maybe have some different behaviors. The flagInUnionStmtwhich is useful to cover some corner case in CAST functions implementation in the coprocessor, so we should pushdown relatedFlagto the coprocessor.What is changed and how it works?
This PR overwrite the
implicitParametersforbaseBuiltinCastFuncto push theinUnionflag.Check List
Tests