Skip to content

Commit

Permalink
address comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Apr 26, 2018
1 parent 8192bfa commit 5d3620f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plan/gen_physical_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,12 @@ func (p *LogicalJoin) getIndexJoinByOuterIdx(prop *requiredProp, outerIdx int) [
accessPaths := x.possibleAccessPaths
if len(accessPaths) > 0 && x.possibleAccessPaths[0].isRowID {
accessPaths = accessPaths[1:]
pkCol := x.getPKIsHandleCol()
if pkCol != nil && innerJoinKeys[0].Equal(nil, pkCol) {
innerPlan := x.forceToTableScan(pkCol)
return p.constructIndexJoin(prop, innerJoinKeys, outerJoinKeys, outerIdx, innerPlan, nil, nil)
if len(innerJoinKeys) == 1 {
pkCol := x.getPKIsHandleCol()
if pkCol != nil && innerJoinKeys[0].Equal(nil, pkCol) {
innerPlan := x.forceToTableScan(pkCol)
return p.constructIndexJoin(prop, innerJoinKeys, outerJoinKeys, outerIdx, innerPlan, nil, nil)
}
}
}
var (
Expand Down

0 comments on commit 5d3620f

Please sign in to comment.