expression: fix incorrect result of logical operators when isTrue/ isFalse function is pushed down#15926
Closed
Reminiscent wants to merge 15 commits intopingcap:masterfrom
Closed
expression: fix incorrect result of logical operators when isTrue/ isFalse function is pushed down#15926Reminiscent wants to merge 15 commits intopingcap:masterfrom
Reminiscent wants to merge 15 commits intopingcap:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15926 +/- ##
===========================================
Coverage 80.3437% 80.3437%
===========================================
Files 506 506
Lines 136618 136618
===========================================
Hits 109764 109764
Misses 18276 18276
Partials 8578 8578 |
Contributor
|
/merge |
Contributor
|
Your auto merge job has been accepted, waiting for 15907, 15845, 15758, 15956, 15776, 15889 |
Contributor
|
/run-all-tests |
Contributor
|
@Reminiscent merge failed. |
Contributor
|
@Reminiscent CI failed, please check it. |
XuHuaiyu
reviewed
Apr 14, 2020
Contributor
|
Is this expectant? [2020-04-16T06:33:09.000Z] FAIL: const_test.go:180: testMySQLConstSuite.TestHighNotPrecedenceMode
[2020-04-16T06:33:09.000Z]
[2020-04-16T06:33:09.000Z] const_test.go:191:
[2020-04-16T06:33:09.000Z] r = tk.MustQuery(`SELECT * FROM t1 WHERE NOT a BETWEEN 2 AND 3;`)
[2020-04-16T06:33:09.000Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2@2/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:288:
[2020-04-16T06:33:09.000Z] tk.c.Check(err, check.IsNil, comment)
[2020-04-16T06:33:09.000Z] ... value *errors.fundamental = runtime error: invalid memory address or nil pointer dereference ("runtime error: invalid memory address or nil pointer dereference")
[2020-04-16T06:33:09.000Z] ... sql:SELECT * FROM t1 WHERE NOT a BETWEEN 2 AND 3;, args:[] |
Contributor
[2020-04-16T09:05:14.887Z] PANIC: distsql_builtin_test.go:159: testEvalSuite.TestEval
[2020-04-16T09:05:14.887Z]
[2020-04-16T09:05:14.887Z] ... Panic: interface conversion: proto.Message is nil, not *tipb.InUnionMetadata (PC=0xFAA711)
[2020-04-16T09:05:14.887Z]
[2020-04-16T09:05:14.887Z] /usr/local/go/src/runtime/panic.go:679
[2020-04-16T09:05:14.887Z] in gopanic
[2020-04-16T09:05:14.887Z] /usr/local/go/src/runtime/iface.go:255
[2020-04-16T09:05:14.887Z] in panicdottypeE
[2020-04-16T09:05:14.887Z] /usr/local/go/src/runtime/iface.go:265
[2020-04-16T09:05:14.887Z] in panicdottypeI
[2020-04-16T09:05:14.887Z] distsql_builtin.go:74
[2020-04-16T09:05:14.887Z] in getSignatureByPB
[2020-04-16T09:05:14.887Z] distsql_builtin.go:1056
[2020-04-16T09:05:14.887Z] in newDistSQLFunctionBySig
[2020-04-16T09:05:14.887Z] distsql_builtin.go:1138
[2020-04-16T09:05:14.887Z] in PBToExpr
[2020-04-16T09:05:14.887Z] distsql_builtin_test.go:856
[2020-04-16T09:05:14.887Z] in testEvalSuite.TestEval
[2020-04-16T09:05:14.887Z] /usr/local/go/src/reflect/value.go:321
[2020-04-16T09:05:14.887Z] in Value.Call
[2020-04-16T09:05:14.887Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2@2/go/pkg/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:850
[2020-04-16T09:05:14.887Z] in suiteRunner.forkTest.func1
[2020-04-16T09:05:14.887Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2@2/go/pkg/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:739
[2020-04-16T09:05:14.887Z] in suiteRunner.forkCall.func1
[2020-04-16T09:05:14.887Z] /usr/local/go/src/runtime/asm_amd64.s:1357
[2020-04-16T09:05:14.887Z] in goexit |
Contributor
Author
|
@XuHuaiyu @breeswish PTAL. Thanks! |
Contributor
|
/merge |
Contributor
|
/run-all-tests |
Contributor
|
/run-all-tests |
Contributor
|
@Reminiscent merge failed. |
Member
|
Do we need to fix at TiKV side as well? Otherwise the results will be different so that copr-test will fail. |
Contributor
Author
|
After an offline discussion, we decided to use another method to solve this problem. We will close this PR and reopen a new one. |
This was referenced Apr 20, 2020
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?
Close: #15718 #15987
Related PR: #12173
Need to review TiPB176 first
Related to #13962
What is changed and how it works?
See an example of this comment
Before this PR:
After this PR:
The cause of this problem is that when the order by expression in the
topNexecutor islogicalAndorlogicalOr,keepNullshould be set to true when thetopNexecutor is pushed down.Check List
Tests