-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
planner: fix can not found column bug #28067
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5a925a8
fix can not found column bug
windtalker 31a4f78
add comments
windtalker e23d35c
add tests
windtalker 0fec56e
address comments
windtalker a8e65d8
fix bug
windtalker 59f8ea3
add more tests
windtalker d9a7fcc
Merge branch 'master' into can_not_found_column
ti-chi-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -748,6 +748,55 @@ func (s *testIntegrationSerialSuite) TestMPPShuffledJoin(c *C) { | |
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add en empty line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
func (s *testIntegrationSerialSuite) TestMPPJoinWithCanNotFoundColumnInSchemaColumnsError(c *C) { | ||
tk := testkit.NewTestKit(c, s.store) | ||
tk.MustExec("use test") | ||
tk.MustExec("drop table if exists t1") | ||
tk.MustExec("create table t1(id int, v1 decimal(20,2), v2 decimal(20,2))") | ||
tk.MustExec("create table t2(id int, v1 decimal(10,2), v2 decimal(10,2))") | ||
tk.MustExec("create table t3(id int, v1 decimal(10,2), v2 decimal(10,2))") | ||
tk.MustExec("insert into t1 values(1,1,1),(2,2,2)") | ||
tk.MustExec("insert into t2 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7),(8,8,8)") | ||
tk.MustExec("insert into t3 values(1,1,1)") | ||
tk.MustExec("analyze table t1") | ||
tk.MustExec("analyze table t2") | ||
tk.MustExec("analyze table t3") | ||
|
||
dom := domain.GetDomain(tk.Se) | ||
is := dom.InfoSchema() | ||
db, exists := is.SchemaByName(model.NewCIStr("test")) | ||
c.Assert(exists, IsTrue) | ||
for _, tblInfo := range db.Tables { | ||
if tblInfo.Name.L == "t1" || tblInfo.Name.L == "t2" || tblInfo.Name.L == "t3" { | ||
tblInfo.TiFlashReplica = &model.TiFlashReplicaInfo{ | ||
Count: 1, | ||
Available: true, | ||
} | ||
} | ||
} | ||
|
||
tk.MustExec("set @@session.tidb_isolation_read_engines = 'tiflash'") | ||
tk.MustExec("set @@session.tidb_enforce_mpp = 1") | ||
tk.MustExec("set @@session.tidb_broadcast_join_threshold_size = 0") | ||
tk.MustExec("set @@session.tidb_broadcast_join_threshold_count = 0") | ||
tk.MustExec("set @@session.tidb_opt_mpp_outer_join_fixed_build_side = 0") | ||
|
||
var input []string | ||
var output []struct { | ||
SQL string | ||
Plan []string | ||
} | ||
s.testData.GetTestCases(c, &input, &output) | ||
for i, tt := range input { | ||
s.testData.OnRecord(func() { | ||
output[i].SQL = tt | ||
output[i].Plan = s.testData.ConvertRowsToStrings(tk.MustQuery(tt).Rows()) | ||
}) | ||
res := tk.MustQuery(tt) | ||
res.Check(testkit.Rows(output[i].Plan...)) | ||
} | ||
} | ||
|
||
func (s *testIntegrationSerialSuite) TestJoinNotSupportedByTiFlash(c *C) { | ||
tk := testkit.NewTestKit(c, s.store) | ||
tk.MustExec("use test") | ||
|
This file contains 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
This file contains 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
This file contains 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
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.
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.
do previous tests not cover these cases?
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.
I guess so.