Skip to content

Commit

Permalink
Added types for Druid Parquet exporting (#3828)
Browse files Browse the repository at this point in the history
* added types for Druid Parquet exporting

* added types for Druid Parquet exporting

---------

Co-authored-by: Egor Ryashin <egor.ryashin@rilldata.com>
  • Loading branch information
2 people authored and k-anshul committed Jan 11, 2024
1 parent fe557fc commit 47ef1ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions runtime/queries/metricsview_comparison_toplist.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/metricsview_comparison_toplist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

3 comments on commit 47ef1ca

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://659fe673bd4b070e279f250d--rill-ui.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://65aabaad28484a0a30864e2b--rill-ui.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://65aabbae9663d60a3ed95b65--rill-ui.netlify.app

Please sign in to comment.