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

Metric filters for distinct values queries #1107

Merged
4 changes: 1 addition & 3 deletions metricflow/dataflow/builder/dataflow_plan_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,7 @@ def _build_plan_for_distinct_values(self, query_spec: MetricFlowQuerySpec) -> Da
)

query_level_filter_specs = filter_spec_factory.create_from_where_filter_intersection(
filter_location=WhereFilterLocation.for_query(
tuple(metric_spec.reference for metric_spec in query_spec.metric_specs)
),
filter_location=WhereFilterLocation.for_query(metric_references=tuple()),
Copy link
Contributor

Choose a reason for hiding this comment

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

You know, it took me way too long to figure out why there were no metric specs in this query. 🤦

filter_intersection=query_spec.filter_intersection,
)

Expand Down