-
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
*: fix a bug causes indexed virtual generated column return wrong value and refine admin check table #18408
Conversation
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
a0b2328
to
6cd1dda
Compare
Signed-off-by: wjhuang2016 <[email protected]>
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #18408 +/- ##
===========================================
Coverage 79.6853% 79.6853%
===========================================
Files 543 543
Lines 148922 148922
===========================================
Hits 118669 118669
Misses 20916 20916
Partials 9337 9337 |
Signed-off-by: wjhuang2016 <[email protected]>
/run-all-tests |
save := ctx.GetSessionVars().StmtCtx.IgnoreTruncate | ||
defer func() { | ||
ctx.GetSessionVars().StmtCtx.IgnoreTruncate = save | ||
}() | ||
ctx.GetSessionVars().StmtCtx.IgnoreTruncate = true |
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 add a comment for this.
planner/core/expression_rewriter.go
Outdated
@@ -46,17 +46,30 @@ func evalAstExpr(sctx sessionctx.Context, expr ast.ExprNode) (types.Datum, error | |||
if val, ok := expr.(*driver.ValueExpr); ok { | |||
return val.Datum, nil | |||
} | |||
NewExpr, err := rewriteAstExpr(sctx, expr, nil, nil) |
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.
NewExpr, err := rewriteAstExpr(sctx, expr, nil, nil) | |
newExpr, err := rewriteAstExpr(sctx, expr, nil, nil) |
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: djshow832 <[email protected]>
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 address comments and involve a member from executor SIG. Rest LGTM.
LGTM |
/run-all-tests |
Signed-off-by: wjhuang2016 <[email protected]>
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
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
/merge |
/run-all-tests |
@wjhuang2016 merge failed. |
/merge |
/run-all-tests |
…ue and refine admin check table (#18408) (#19062) * save Signed-off-by: wjhuang2016 <[email protected]> * done Signed-off-by: wjhuang2016 <[email protected]> * 1 Signed-off-by: wjhuang2016 <[email protected]> * 1 Signed-off-by: wjhuang2016 <[email protected]> Co-authored-by: ti-srebot <[email protected]>
What problem does this PR solve?
Issue Number: close #17989
Problem Summary:
column substitution
to decode a multi-level virtual generated column, which is buggy.admin check table
uses tableReader, and tableReader can output rows with a virtual generated column already, we don't need to compute it again. Besides, the previous implementation also suffered the above problem.I’m
What is changed and how it works?
ColumnInfos2ColumnsAndNames
.genExprs
incheckIndexValue
.compareData
, don't compute the virtual generated column again.rewriteAstExpr
, so that we can userewrite
in package expression.buildPhysicalIndexLookUpReader
, make it simple.table/tables/gen_expr_test.go → util/generatedexpr/gen_expr_test.go
. to avoid circular reference.What's Changed:
How it Works:
Related changes
Check List
Tests
Side effects
Release note