Skip to content
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: support index_lookup_merge_join in physical plan. #11338

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d647ff5
support index_lookup_merge_join in physical plan
lzmhhh123 Jul 19, 2019
3b69d4b
Merge branch 'master' into dev/support_index_merge_join_in_physical_plan
lzmhhh123 Jul 31, 2019
535f944
fix
lzmhhh123 Jul 31, 2019
38a0de2
fix explain test
lzmhhh123 Aug 1, 2019
d68dcb0
address comments
lzmhhh123 Aug 1, 2019
05b6b5b
add comments for NeedOuterSort, CompareFuncs and OuterCompareFuncs
lzmhhh123 Aug 1, 2019
8ed2c1d
Merge remote-tracking branch 'origin/master' into dev/support_index_m…
lzmhhh123 Aug 8, 2019
4465c5b
fix a little
lzmhhh123 Aug 8, 2019
976913c
if some columns need keep order. No need to construct index join
lzmhhh123 Aug 12, 2019
5e41112
fix error and bug in cost model
lzmhhh123 Aug 12, 2019
a22974c
address comment
lzmhhh123 Aug 12, 2019
09494b0
Merge branch 'master' into dev/support_index_merge_join_in_physical_plan
lzmhhh123 Aug 12, 2019
cdfec19
Merge remote-tracking branch 'origin/master' into dev/support_index_m…
lzmhhh123 Aug 21, 2019
57c411d
fix test
lzmhhh123 Aug 21, 2019
b2387dd
address comments
lzmhhh123 Aug 22, 2019
a94acf7
Merge branch 'master' into dev/support_index_merge_join_in_physical_plan
lzmhhh123 Aug 22, 2019
55bd051
commit suggestion
lzmhhh123 Aug 23, 2019
f8c5f9a
commit suggestion
lzmhhh123 Aug 23, 2019
029cc86
commit suggestion
lzmhhh123 Aug 23, 2019
0ad1387
fix
lzmhhh123 Aug 30, 2019
5b5200b
Merge remote-tracking branch 'origin/master' into dev/support_index_m…
lzmhhh123 Aug 30, 2019
45dacec
Merge remote-tracking branch 'origin/master' into dev/support_index_m…
lzmhhh123 Sep 3, 2019
3d7dc49
rm log.txt
lzmhhh123 Sep 4, 2019
3927127
Merge branch 'master' into dev/support_index_merge_join_in_physical_plan
lzmhhh123 Sep 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
lzmhhh123 committed Jul 31, 2019
commit 535f944c4fb65c69509e99598052f4c96ece2759
4 changes: 2 additions & 2 deletions planner/core/physical_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1541,12 +1541,12 @@ func (s *testPlanSuite) TestIndexJoinHint(c *C) {
}{
{
sql: "select /*+ TIDB_INLJ(t1) */ t1.a, t2.a, t3.a from t t1, t t2, t t3 where t1.a = t2.a and t2.a = t3.a;",
best: "MergeInnerJoin{TableReader(Table(t))->IndexJoin{TableReader(Table(t))->TableReader(Table(t))}(test.t2.a,test.t1.a)}(test.t3.a,test.t2.a)->Projection",
best: "IndexMergeJoin{TableReader(Table(t))->IndexMergeJoin{TableReader(Table(t))->TableReader(Table(t))}(test.t2.a,test.t1.a)}(test.t2.a,test.t3.a)->Projection",
warning: "",
},
{
sql: "select /*+ TIDB_INLJ(t1) */ t1.b, t2.a from t t1, t t2 where t1.b = t2.a;",
best: "LeftHashJoin{TableReader(Table(t))->TableReader(Table(t))}(test.t1.b,test.t2.a)",
best: "IndexMergeJoin{TableReader(Table(t))->TableReader(Table(t))}(test.t1.b,test.t2.a)",
warning: "[planner:1815]Optimizer Hint /*+ TIDB_INLJ(t1) */ is inapplicable",
},
}
Expand Down
2 changes: 0 additions & 2 deletions planner/core/physical_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ type PhysicalIndexJoin struct {
type PhysicalIndexMergeJoin struct {
PhysicalIndexJoin

// IsMergejoin represents whether the index join is index merge join. NeedOuterSort, CompareFuncs and OuterCompareFuncs are
// the properties of index merge join.
NeedOuterSort bool
CompareFuncs []expression.CompareFunc
OuterCompareFuncs []expression.CompareFunc
Expand Down