From 47ef1cadaae63d5be4898687f87bed6c49bdf7ea Mon Sep 17 00:00:00 2001 From: Egor Riashin Date: Thu, 11 Jan 2024 15:35:17 +0300 Subject: [PATCH] Added types for Druid Parquet exporting (#3828) * added types for Druid Parquet exporting * added types for Druid Parquet exporting --------- Co-authored-by: Egor Ryashin --- runtime/queries/metricsview_comparison_toplist.go | 6 ++++++ runtime/queries/metricsview_comparison_toplist_test.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/queries/metricsview_comparison_toplist.go b/runtime/queries/metricsview_comparison_toplist.go index 6227d3fc427..5585dbe6977 100644 --- a/runtime/queries/metricsview_comparison_toplist.go +++ b/runtime/queries/metricsview_comparison_toplist.go @@ -915,26 +915,32 @@ func (q *MetricsViewComparison) generalExport(ctx context.Context, rt *runtime.R } meta[0] = &runtimev1.MetricsViewColumn{ Name: dimName, + Type: runtimev1.Type_CODE_STRING.String(), } if comparison { for i, m := range q.Result.Rows[0].MeasureValues { meta[1+i*4] = &runtimev1.MetricsViewColumn{ Name: labelMap[m.MeasureName], + Type: runtimev1.Type_CODE_FLOAT64.String(), } meta[2+i*4] = &runtimev1.MetricsViewColumn{ Name: fmt.Sprintf("%s (prev)", labelMap[m.MeasureName]), + Type: runtimev1.Type_CODE_FLOAT64.String(), } meta[3+i*4] = &runtimev1.MetricsViewColumn{ Name: fmt.Sprintf("%s (Δ)", labelMap[m.MeasureName]), + Type: runtimev1.Type_CODE_FLOAT64.String(), } meta[4+i*4] = &runtimev1.MetricsViewColumn{ Name: fmt.Sprintf("%s (Δ%%)", labelMap[m.MeasureName]), + Type: runtimev1.Type_CODE_FLOAT64.String(), } } } else { for i, m := range q.Result.Rows[0].MeasureValues { meta[1+i] = &runtimev1.MetricsViewColumn{ Name: labelMap[m.MeasureName], + Type: runtimev1.Type_CODE_FLOAT64.String(), } } } diff --git a/runtime/queries/metricsview_comparison_toplist_test.go b/runtime/queries/metricsview_comparison_toplist_test.go index e04e20cede3..22ca6a6da4e 100644 --- a/runtime/queries/metricsview_comparison_toplist_test.go +++ b/runtime/queries/metricsview_comparison_toplist_test.go @@ -509,7 +509,7 @@ func TestMetricsViewsComparison_measure_filters_with_compare_aliases(t *testing. require.Equal(t, "instagram.com", q.Result.Rows[2].DimensionValue.GetStringValue()) } -func TestMetricsViewsCompariso_export_xlsx(t *testing.T) { +func TestMetricsViewsComparison_export_xlsx(t *testing.T) { t.Parallel() rt, instanceId := testruntime.NewInstanceForProject(t, "ad_bids_2rows")