Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: profile sentence missing data #20

Merged
merged 1 commit into from
Jun 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions service/dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@ func Execute(nsid string, gql string) (result ExecuteResult, err error) {
resp := response.Result
if resp.IsSetPlanDesc() {
format := string(resp.GetPlanDesc().GetFormat())
var rowValue = make(map[string]common.Any)
if format == "row" {
result.Headers = []string{"id", "name", "dependencies", "profiling data", "operator info"}
rows := resp.MakePlanByRow()
for i := 0; i < len(rows); i++ {
var rowValue = make(map[string]common.Any)
rowValue["id"] = rows[i][0]
rowValue["name"] = rows[i][1]
rowValue["dependencies"] = rows[i][2]
Expand All @@ -322,14 +322,14 @@ func Execute(nsid string, gql string) (result ExecuteResult, err error) {
result.Tables = append(result.Tables, rowValue)
}
return result, err
} else if format == "dot" {
result.Headers = append(result.Headers, "format")
rowValue["format"] = resp.MakeDotGraph()
result.Tables = append(result.Tables, rowValue)
return result, err
} else if format == "dot:struct" {
} else {
var rowValue = make(map[string]common.Any)
result.Headers = append(result.Headers, "format")
rowValue["format"] = resp.MakeDotGraphByStruct()
if format == "dot" {
rowValue["format"] = resp.MakeDotGraph()
} else if format == "dot:struct" {
rowValue["format"] = resp.MakeDotGraphByStruct()
}
result.Tables = append(result.Tables, rowValue)
return result, err
}
Expand Down