From 4cbf3c50c9f1e279df2dcb7268dc02f13930dac7 Mon Sep 17 00:00:00 2001 From: Andres Taylor Date: Mon, 16 Sep 2024 08:52:52 +0200 Subject: [PATCH] change json field names Signed-off-by: Andres Taylor --- go/vt/vtgate/engine/plan_description.go | 4 ++-- go/vt/vtgate/executor_vexplain_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go/vt/vtgate/engine/plan_description.go b/go/vt/vtgate/engine/plan_description.go index 863a93b0608..f32a12cebfc 100644 --- a/go/vt/vtgate/engine/plan_description.go +++ b/go/vt/vtgate/engine/plan_description.go @@ -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 } } diff --git a/go/vt/vtgate/executor_vexplain_test.go b/go/vt/vtgate/executor_vexplain_test.go index 6fe0e7777bd..6d9e9e19d16 100644 --- a/go/vt/vtgate/executor_vexplain_test.go +++ b/go/vt/vtgate/executor_vexplain_test.go @@ -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, @@ -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",