Skip to content

Commit

Permalink
change json field names
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Sep 16, 2024
1 parent 52e8961 commit 4cbf3c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go/vt/vtgate/engine/plan_description.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func (pd PrimitiveDescription) MarshalJSON() ([]byte, error) {
return nil, err
}

if err := marshalAdd(prepend, buf, "AvgRowSize", average(pd.Stats)); err != nil {
if err := marshalAdd(prepend, buf, "AvgNumberOfRows", average(pd.Stats)); err != nil {
return nil, err
}
if err := marshalAdd(prepend, buf, "MedianRowSize", median(pd.Stats)); err != nil {
if err := marshalAdd(prepend, buf, "MedianNumberOfRows", median(pd.Stats)); err != nil {
return nil, err
}
}
Expand Down
8 changes: 4 additions & 4 deletions go/vt/vtgate/executor_vexplain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func TestSimpleVexplainTrace(t *testing.T) {
"OperatorType": "Aggregate",
"Variant": "Ordered",
"NoOfCalls": 1,
"AvgRowSize": 4,
"MedianRowSize": 4,
"AvgNumberOfRows": 4,
"MedianNumberOfRows": 4,
"Aggregates": "sum_count_star(0) AS count(*)",
"GroupBy": "(1|2)",
"ResultColumns": 2,
Expand All @@ -95,8 +95,8 @@ func TestSimpleVexplainTrace(t *testing.T) {
"Sharded": true
},
"NoOfCalls": 2,
"AvgRowSize": 16,
"MedianRowSize": 16,
"AvgNumberOfRows": 16,
"MedianNumberOfRows": 16,
"FieldQuery": "select count(*), col2, weight_string(col2) from music where 1 != 1 group by col2, weight_string(col2)",
"OrderBy": "(1|2) ASC",
"Query": "select count(*), col2, weight_string(col2) from music group by col2, weight_string(col2) order by col2 asc",
Expand Down

0 comments on commit 4cbf3c5

Please sign in to comment.