From 46cf604c14542a9e0acb44cbb53811c8eb698c36 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 29 Oct 2024 15:22:56 -0700 Subject: [PATCH] Update call sites to use `DimensionLookup`. --- metricflow/dataflow/builder/partitions.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/metricflow/dataflow/builder/partitions.py b/metricflow/dataflow/builder/partitions.py index 7222100f7a..97380e3cd1 100644 --- a/metricflow/dataflow/builder/partitions.py +++ b/metricflow/dataflow/builder/partitions.py @@ -38,15 +38,15 @@ def __init__(self, semantic_model_lookup: SemanticModelLookup) -> None: # noqa: def _get_partitions(self, spec_set: InstanceSpecSet) -> PartitionSpecSet: """Returns the specs from the instance set that correspond to partition specs.""" partition_dimension_specs = tuple( - x - for x in spec_set.dimension_specs - if self._semantic_model_lookup.get_dimension(dimension_reference=x.reference).is_partition + dimension_spec + for dimension_spec in spec_set.dimension_specs + if self._semantic_model_lookup.dimension_lookup.get_invariant(dimension_spec.reference).is_partition ) partition_time_dimension_specs = tuple( - x - for x in spec_set.time_dimension_specs - if x.reference != DataSet.metric_time_dimension_reference() - and self._semantic_model_lookup.get_time_dimension(time_dimension_reference=x.reference).is_partition + time_dimension_spec + for time_dimension_spec in spec_set.time_dimension_specs + if time_dimension_spec.reference != DataSet.metric_time_dimension_reference() + and self._semantic_model_lookup.dimension_lookup.get_invariant(time_dimension_spec.reference).is_partition ) return PartitionSpecSet(