Skip to content

Commit

Permalink
planner: fix the children of ShuffleReceiver not displayed in execu…
Browse files Browse the repository at this point in the history
…tion plan in stmt summary and slow query (pingcap#40475)

* fix

* update

Co-authored-by: Arenatlx <[email protected]>
  • Loading branch information
time-and-fate and AilinKid authored Jan 11, 2023
1 parent df459f1 commit 74fd05e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planner/core/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ func (pn *planEncoder) encodePlan(p Plan, isRoot bool, store kv.StoreType, depth
if copPlan.tablePlan != nil {
pn.encodePlan(copPlan.tablePlan, false, store, depth)
}
case *PhysicalShuffleReceiverStub:
pn.encodePlan(copPlan.DataSource, isRoot, store, depth)
case *PhysicalCTE:
pn.ctes = append(pn.ctes, copPlan)
}
Expand Down
1 change: 1 addition & 0 deletions planner/core/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ func TestEncodeDecodePlan(t *testing.T) {
planTree = getPlanTree()
require.Contains(t, planTree, "Shuffle")
require.Contains(t, planTree, "ShuffleReceiver")
require.Contains(t, planTree, "TableFullScan")
}

func TestNormalizedDigest(t *testing.T) {
Expand Down

0 comments on commit 74fd05e

Please sign in to comment.