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

plan: fix a bug in index join #7150

Merged
merged 10 commits into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
1,300 changes: 1,300 additions & 0 deletions cmd/explaintest/r/tpch.result

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/customer.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/lineitem.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/nation.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/orders.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/part.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/partsupp.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/region.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/explaintest/s/tpch_stats/supplier.json

Large diffs are not rendered by default.

1,002 changes: 1,002 additions & 0 deletions cmd/explaintest/t/tpch.test

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plan/exhaust_physical_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func (p *LogicalJoin) constructIndexJoin(prop *requiredProp, innerJoinKeys, oute
newInnerKeys := make([]*expression.Column, 0, len(innerJoinKeys))
newOuterKeys := make([]*expression.Column, 0, len(outerJoinKeys))
newKeyOff := make([]int, 0, len(keyOff2IdxOff))
newOtherConds := make([]expression.Expression, 0, len(p.OtherConditions)+len(p.EqualConditions))
newOtherConds := make([]expression.Expression, len(p.OtherConditions), len(p.OtherConditions)+len(p.EqualConditions))
copy(newOtherConds, p.OtherConditions)
for keyOff, idxOff := range keyOff2IdxOff {
if keyOff2IdxOff[keyOff] < 0 {
Expand Down