Skip to content

Commit 6c0159e

Browse files
authored
planner: remove bce in the attach2Task (#59689)
1 parent d9ebccd commit 6c0159e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/planner/core/task.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ func (p *PhysicalHashJoin) Attach2Task(tasks ...base.Task) base.Task {
209209
if p.storeTp == kv.TiFlash {
210210
return p.attach2TaskForTiFlash(tasks...)
211211
}
212-
lTask := tasks[0].ConvertToRootTask(p.SCtx())
213212
rTask := tasks[1].ConvertToRootTask(p.SCtx())
213+
lTask := tasks[0].ConvertToRootTask(p.SCtx())
214214
p.SetChildren(lTask.Plan(), rTask.Plan())
215215
task := &RootTask{}
216216
task.SetPlan(p)
@@ -391,8 +391,8 @@ func (p *PhysicalHashJoin) convertPartitionKeysIfNeed(lTask, rTask *MppTask) (*M
391391
}
392392

393393
func (p *PhysicalHashJoin) attach2TaskForMpp(tasks ...base.Task) base.Task {
394-
lTask, lok := tasks[0].(*MppTask)
395394
rTask, rok := tasks[1].(*MppTask)
395+
lTask, lok := tasks[0].(*MppTask)
396396
if !lok || !rok {
397397
return base.InvalidTask
398398
}
@@ -499,8 +499,8 @@ func (p *PhysicalHashJoin) attach2TaskForMpp(tasks ...base.Task) base.Task {
499499
}
500500

501501
func (p *PhysicalHashJoin) attach2TaskForTiFlash(tasks ...base.Task) base.Task {
502-
lTask, lok := tasks[0].(*CopTask)
503502
rTask, rok := tasks[1].(*CopTask)
503+
lTask, lok := tasks[0].(*CopTask)
504504
if !lok || !rok {
505505
return p.attach2TaskForMpp(tasks...)
506506
}

0 commit comments

Comments
 (0)