Skip to content

Commit

Permalink
query/physicalplan: Draw SchemaScan for explain (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
metalmatze authored Mar 26, 2024
1 parent 62717fc commit 33934e0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions query/physicalplan/physicalplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,15 @@ type SchemaScan struct {
}

func (s *SchemaScan) Draw() *Diagram {
// var children []*Diagram
// for _, plan := range s.plans {
// children = append(children, plan.Draw())
// }
return &Diagram{Details: "SchemaScan"}
details := "SchemaScan"
var child *Diagram
if children := len(s.plans); children > 0 {
child = s.plans[0].Draw()
if children > 1 {
details += " [concurrent]"
}
}
return &Diagram{Details: details, Child: child}
}

func (s *SchemaScan) Execute(ctx context.Context, pool memory.Allocator) error {
Expand Down

0 comments on commit 33934e0

Please sign in to comment.