Skip to content

Commit

Permalink
let command output rows format of execution plan (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
jievince authored Jul 26, 2021
1 parent e58b56a commit bacb3b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions printer/plan_desc_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ func (p *PlanDescPrinter) PrintPlanDesc(res *nebula.ResultSet) {
switch format {
case "row":
rows := res.MakePlanByRow()
fmt.Println(p.renderByRow(rows))
s = p.renderByRow(rows)
fmt.Println(s)
case "dot":
s = res.MakeDotGraph()
fmt.Println(p.renderDotGraph(s))
Expand All @@ -129,8 +130,7 @@ func (p *PlanDescPrinter) PrintPlanDesc(res *nebula.ResultSet) {
fmt.Println(p.renderDotGraphByStruct(s))
}

outputDot := format != "row"
if p.fd != nil && outputDot {
if p.fd != nil {
go func() {
p.fd.Truncate(0)
p.fd.Seek(0, 0)
Expand Down

0 comments on commit bacb3b7

Please sign in to comment.