From d6c2dea92961fafc46912d10b73410d554cadb2f Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 17 Jul 2024 16:53:04 -0700 Subject: [PATCH] Update fields in `LinkableElement`-related classes to use tuples (#1336) Currently, serialization of sets is not supported so this PR changes the `properties` field of a few `LinkableElement` related classes to a tuple-based implementation. --- .../model/linkable_element_property.py | 9 ++- .../model/semantics/linkable_element.py | 70 +++++++++++++++++-- .../model/semantics/linkable_element_set.py | 18 ++--- .../model/semantics/linkable_spec_resolver.py | 20 +++--- .../semantics/test_linkable_element_set.py | 28 ++++---- .../model/test_where_filter_spec.py | 18 ++--- ...ccumulate_last_2_months_metric__result.txt | 2 +- ...h_different_parent_time_grains__result.txt | 7 +- ...c_with_same_parent_time_grains__result.txt | 2 +- ...ics_with_different_time_grains__result.txt | 7 +- ..._metrics_with_same_time_grains__result.txt | 2 +- ...me_in_query_filter__no_metrics__result.txt | 2 +- ...in_query_filter__simple_metric__result.txt | 2 +- ...validate_where_constraint_dims__result.txt | 6 +- ...cs_with_common_filtered_metric__result.txt | 12 ++-- ...tion_for_invalid_metric_filter__result.txt | 14 ++-- ...or_invalid_metric_input_filter__result.txt | 14 ++-- ...lution_for_valid_metric_filter__result.txt | 6 +- ..._for_valid_metric_input_filter__result.txt | 6 +- ...ccumulate_last_2_months_metric__result.txt | 6 +- ...h_different_parent_time_grains__result.txt | 14 ++-- ...c_with_same_parent_time_grains__result.txt | 6 +- ...ics_with_different_time_grains__result.txt | 14 ++-- ..._metrics_with_same_time_grains__result.txt | 6 +- ...spec_resolution__simple_metric__result.txt | 6 +- .../test_dataflow_to_sql_plan.py | 2 +- .../test_distinct_values_plan__dfp_0.xml | 2 +- ..._distinct_values_plan_with_join__dfp_0.xml | 2 +- ...join_to_time_spine_with_filters__dfp_0.xml | 6 +- .../test_measure_constraint_plan__dfp_0.xml | 8 +-- ...traint_with_reused_measure_plan__dfp_0.xml | 4 +- ...ry_have_different_granularities__dfp_0.xml | 6 +- ...ry_have_different_granularities__dfp_0.xml | 10 +-- .../test_where_constrained_plan__dfp_0.xml | 4 +- ...constrained_plan_time_dimension__dfp_0.xml | 4 +- ...ained_with_common_linkable_plan__dfp_0.xml | 4 +- ...rsion_metric_predicate_pushdown__dfp_0.xml | 4 +- ...sion_metric_predicate_pushdown__dfpo_0.xml | 4 +- ...ative_metric_predicate_pushdown__dfp_0.xml | 4 +- ...tive_metric_predicate_pushdown__dfpo_0.xml | 4 +- ...spine_metric_predicate_pushdown__dfp_0.xml | 10 +-- ...pine_metric_predicate_pushdown__dfpo_0.xml | 10 +-- ...ost_agg_join_predicate_pushdown__dfp_0.xml | 14 ++-- ...st_agg_join_predicate_pushdown__dfpo_0.xml | 14 ++-- ...ffset_metric_predicate_pushdown__dfp_0.xml | 10 +-- ...fset_metric_predicate_pushdown__dfpo_0.xml | 10 +-- ...imple_join_categorical_pushdown__dfp_0.xml | 4 +- ...mple_join_categorical_pushdown__dfpo_0.xml | 4 +- ..._time_pushdown_with_two_targets__dfp_0.xml | 4 +- ...time_pushdown_with_two_targets__dfpo_0.xml | 4 +- ...constrained_metric_not_combined__dfp_0.xml | 2 +- ...onstrained_metric_not_combined__dfpo_0.xml | 2 +- 52 files changed, 257 insertions(+), 196 deletions(-) diff --git a/metricflow-semantics/metricflow_semantics/model/linkable_element_property.py b/metricflow-semantics/metricflow_semantics/model/linkable_element_property.py index eb6325e7e1..b8a3ebf20b 100644 --- a/metricflow-semantics/metricflow_semantics/model/linkable_element_property.py +++ b/metricflow-semantics/metricflow_semantics/model/linkable_element_property.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum -from typing import FrozenSet +from typing import Any, FrozenSet class LinkableElementProperty(Enum): @@ -31,3 +31,10 @@ class LinkableElementProperty(Enum): @staticmethod def all_properties() -> FrozenSet[LinkableElementProperty]: # noqa: D102 return frozenset({linkable_element_property for linkable_element_property in LinkableElementProperty}) + + def __lt__(self, other: Any) -> bool: # type: ignore[misc] + """When ordering, order by the enum name.""" + if not isinstance(other, LinkableElementProperty): + return NotImplemented + + return self.name < other.name diff --git a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py index b1270b92f1..8cde724a67 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py @@ -1,10 +1,12 @@ from __future__ import annotations +import collections import logging from abc import ABC, abstractmethod from dataclasses import dataclass from enum import Enum -from typing import FrozenSet, Optional, Sequence, Tuple +from functools import cached_property +from typing import FrozenSet, Iterable, Optional, Sequence, Tuple from dbt_semantic_interfaces.dataclass_serialization import SerializableDataclass from dbt_semantic_interfaces.enum_extension import assert_values_exhausted @@ -98,6 +100,19 @@ class SemanticModelJoinPathElement(SerializableDataclass): class LinkableElement(SemanticModelDerivation, SerializableDataclass, ABC): """An entity / dimension that may have been joined by entities.""" + properties: Tuple[LinkableElementProperty, ...] + + def __post_init__(self) -> None: # noqa: D105 + if len(self.property_set) != len(self.properties): + duplicate_properties = [item for item, count in collections.Counter(self.properties).items() if count > 1] + assert False, f"Found duplicate properties {duplicate_properties} in {self.properties}" + + assert self.properties == tuple(sorted(self.properties)), f"Properties are not sorted: {self.properties}" + + @cached_property + def property_set(self) -> FrozenSet[LinkableElementProperty]: # noqa: D102 + return frozenset(self.properties) + @property @abstractmethod def element_type(self) -> LinkableElementType: @@ -126,10 +141,31 @@ class LinkableDimension(LinkableElement, SerializableDataclass): dimension_type: DimensionType entity_links: Tuple[EntityReference, ...] join_path: SemanticModelJoinPath - properties: FrozenSet[LinkableElementProperty] time_granularity: Optional[TimeGranularity] date_part: Optional[DatePart] + @staticmethod + def create( # noqa: D102 + properties: Iterable[LinkableElementProperty], + defined_in_semantic_model: Optional[SemanticModelReference], + element_name: str, + dimension_type: DimensionType, + entity_links: Tuple[EntityReference, ...], + join_path: SemanticModelJoinPath, + time_granularity: Optional[TimeGranularity], + date_part: Optional[DatePart], + ) -> LinkableDimension: + return LinkableDimension( + properties=tuple(sorted(set(properties))), + defined_in_semantic_model=defined_in_semantic_model, + element_name=element_name, + dimension_type=dimension_type, + entity_links=entity_links, + join_path=join_path, + time_granularity=time_granularity, + date_part=date_part, + ) + @property @override def element_type(self) -> LinkableElementType: @@ -185,10 +221,25 @@ class LinkableEntity(LinkableElement, SerializableDataclass): # The semantic model where this entity was defined. defined_in_semantic_model: SemanticModelReference element_name: str - properties: FrozenSet[LinkableElementProperty] entity_links: Tuple[EntityReference, ...] join_path: SemanticModelJoinPath + @staticmethod + def create( # noqa: D102 + properties: Iterable[LinkableElementProperty], + defined_in_semantic_model: SemanticModelReference, + element_name: str, + entity_links: Tuple[EntityReference, ...], + join_path: SemanticModelJoinPath, + ) -> LinkableEntity: + return LinkableEntity( + properties=tuple(sorted(set(properties))), + defined_in_semantic_model=defined_in_semantic_model, + element_name=element_name, + entity_links=entity_links, + join_path=join_path, + ) + @property @override def element_type(self) -> LinkableElementType: @@ -221,15 +272,24 @@ def semantic_model_origin(self) -> SemanticModelReference: class LinkableMetric(LinkableElement, SerializableDataclass): """Describes how a metric can be realized by joining based on entity links.""" - properties: FrozenSet[LinkableElementProperty] join_path: SemanticModelToMetricSubqueryJoinPath + @staticmethod + def create( # noqa: D102 + properties: Iterable[LinkableElementProperty], join_path: SemanticModelToMetricSubqueryJoinPath + ) -> LinkableMetric: + return LinkableMetric( + properties=tuple(sorted(set(properties))), + join_path=join_path, + ) + def __post_init__(self) -> None: """Ensure expected LinkableElementProperties have been set. LinkableMetrics always require a join to a metric subquery. """ - assert {LinkableElementProperty.METRIC, LinkableElementProperty.JOINED}.issubset(self.properties) + super().__post_init__() + assert {LinkableElementProperty.METRIC, LinkableElementProperty.JOINED}.issubset(self.property_set) @property @override diff --git a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py index 40fca4a9c8..1c1a8aa6f5 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py @@ -237,11 +237,11 @@ def filter( filtered_linkable_dimensions = tuple( linkable_dimension for linkable_dimension in linkable_dimensions - if len(linkable_dimension.properties.intersection(with_any_of)) > 0 - and len(linkable_dimension.properties.intersection(without_any_of)) == 0 + if len(linkable_dimension.property_set.intersection(with_any_of)) > 0 + and len(linkable_dimension.property_set.intersection(without_any_of)) == 0 and ( len(without_all_of) == 0 - or linkable_dimension.properties.intersection(without_all_of) != without_all_of + or linkable_dimension.property_set.intersection(without_all_of) != without_all_of ) ) if len(filtered_linkable_dimensions) > 0: @@ -251,11 +251,11 @@ def filter( filtered_linkable_entities = tuple( linkable_entity for linkable_entity in linkable_entities - if len(linkable_entity.properties.intersection(with_any_of)) > 0 - and len(linkable_entity.properties.intersection(without_any_of)) == 0 + if len(linkable_entity.property_set.intersection(with_any_of)) > 0 + and len(linkable_entity.property_set.intersection(without_any_of)) == 0 and ( len(without_all_of) == 0 - or linkable_entity.properties.intersection(without_all_of) != without_all_of + or linkable_entity.property_set.intersection(without_all_of) != without_all_of ) ) if len(filtered_linkable_entities) > 0: @@ -265,11 +265,11 @@ def filter( filtered_linkable_metrics = tuple( linkable_metric for linkable_metric in linkable_metrics - if len(linkable_metric.properties.intersection(with_any_of)) > 0 - and len(linkable_metric.properties.intersection(without_any_of)) == 0 + if len(linkable_metric.property_set.intersection(with_any_of)) > 0 + and len(linkable_metric.property_set.intersection(without_any_of)) == 0 and ( len(without_all_of) == 0 - or linkable_metric.properties.intersection(without_all_of) != without_all_of + or linkable_metric.property_set.intersection(without_all_of) != without_all_of ) ) if len(filtered_linkable_metrics) > 0: diff --git a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py index 2e6d308cf8..7da7d635a5 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py @@ -69,7 +69,7 @@ def _generate_linkable_time_dimensions( properties.add(LinkableElementProperty.DERIVED_TIME_GRANULARITY) linkable_dimensions.append( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=semantic_model_origin, element_name=dimension.reference.element_name, dimension_type=DimensionType.TIME, @@ -77,7 +77,7 @@ def _generate_linkable_time_dimensions( join_path=join_path, time_granularity=time_granularity, date_part=None, - properties=frozenset(properties), + properties=tuple(sorted(properties)), ) ) @@ -85,7 +85,7 @@ def _generate_linkable_time_dimensions( for date_part in DatePart: if time_granularity.to_int() <= date_part.to_int(): linkable_dimensions.append( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=semantic_model_origin, element_name=dimension.reference.element_name, dimension_type=DimensionType.TIME, @@ -305,7 +305,7 @@ def get_joinable_metrics_for_semantic_model( if join_path_has_path_links and entity_reference in using_join_path.entity_links: continue for metric_subquery_join_path_element in self._joinable_metrics_for_entities[entity_reference]: - linkable_metric = LinkableMetric( + linkable_metric = LinkableMetric.create( properties=properties, join_path=SemanticModelToMetricSubqueryJoinPath( metric_subquery_join_path_element=metric_subquery_join_path_element, @@ -328,7 +328,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link linkable_entities = [] for entity in semantic_model.entities: linkable_entities.append( - LinkableEntity( + LinkableEntity.create( defined_in_semantic_model=semantic_model.reference, element_name=entity.reference.element_name, entity_links=(), @@ -343,7 +343,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link if entity_link == entity.reference: continue linkable_entities.append( - LinkableEntity( + LinkableEntity.create( defined_in_semantic_model=semantic_model.reference, element_name=entity.reference.element_name, entity_links=(entity_link,), @@ -360,7 +360,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link dimension_type = dimension.type if dimension_type is DimensionType.CATEGORICAL: linkable_dimensions.append( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=semantic_model.reference, element_name=dimension.reference.element_name, dimension_type=DimensionType.CATEGORICAL, @@ -492,7 +492,7 @@ def _get_metric_time_elements(self, measure_reference: Optional[MeasureReference date_part=date_part, ) path_key_to_linkable_dimensions[path_key].append( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=measure_semantic_model.reference if measure_semantic_model else None, element_name=MetricFlowReservedKeywords.METRIC_TIME.value, dimension_type=DimensionType.TIME, @@ -719,7 +719,7 @@ def create_linkable_element_set_from_join_path( dimension_type = dimension.type if dimension_type == DimensionType.CATEGORICAL: linkable_dimensions.append( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=semantic_model.reference, element_name=dimension.reference.element_name, dimension_type=DimensionType.CATEGORICAL, @@ -747,7 +747,7 @@ def create_linkable_element_set_from_join_path( # Avoid creating "booking_id__booking_id" if entity.reference != join_path.last_entity_link: linkable_entities.append( - LinkableEntity( + LinkableEntity.create( defined_in_semantic_model=semantic_model.reference, element_name=entity.reference.element_name, entity_links=join_path.entity_links, diff --git a/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py b/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py index c769c5a293..b0af974a6a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py +++ b/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py @@ -56,14 +56,14 @@ # Entities -_base_entity = LinkableEntity( +_base_entity = LinkableEntity.create( element_name=_base_entity_reference.element_name, defined_in_semantic_model=_base_semantic_model, entity_links=(), join_path=SemanticModelJoinPath(left_semantic_model_reference=_measure_semantic_model), properties=frozenset([LinkableElementProperty.ENTITY]), ) -_ambiguous_entity = LinkableEntity( +_ambiguous_entity = LinkableEntity.create( element_name=AMBIGUOUS_NAME, defined_in_semantic_model=_base_semantic_model, entity_links=(_base_entity_reference,), @@ -71,7 +71,7 @@ properties=frozenset([LinkableElementProperty.ENTITY, LinkableElementProperty.LOCAL_LINKED]), ) # For testing deduplication on entities -_ambiguous_entity_with_join_path = LinkableEntity( +_ambiguous_entity_with_join_path = LinkableEntity.create( element_name=AMBIGUOUS_NAME, defined_in_semantic_model=_base_semantic_model, entity_links=(_base_entity_reference,), @@ -88,7 +88,7 @@ ) # Dimensions -_categorical_dimension = LinkableDimension( +_categorical_dimension = LinkableDimension.create( element_name=_base_dimension_reference.element_name, entity_links=(_base_entity_reference,), dimension_type=DimensionType.CATEGORICAL, @@ -98,7 +98,7 @@ time_granularity=None, date_part=None, ) -_time_dimension = LinkableDimension( +_time_dimension = LinkableDimension.create( element_name=_time_dimension_reference.element_name, entity_links=(_base_entity_reference,), dimension_type=DimensionType.TIME, @@ -109,7 +109,7 @@ date_part=None, ) # Resolves to the same local linked name name as _ambiguous_entity -_ambiguous_categorical_dimension = LinkableDimension( +_ambiguous_categorical_dimension = LinkableDimension.create( element_name=AMBIGUOUS_NAME, entity_links=(_base_entity_reference,), dimension_type=DimensionType.CATEGORICAL, @@ -121,7 +121,7 @@ ) # The opposite direction of the join for ambiguous_entity_with_join_path # For testing deduplication on dimensions -_ambiguous_categorical_dimension_with_join_path = LinkableDimension( +_ambiguous_categorical_dimension_with_join_path = LinkableDimension.create( element_name=AMBIGUOUS_NAME, entity_links=(_base_entity_reference,), dimension_type=DimensionType.CATEGORICAL, @@ -140,7 +140,7 @@ ) # Metrics -_base_metric = LinkableMetric( +_base_metric = LinkableMetric.create( properties=frozenset([LinkableElementProperty.METRIC, LinkableElementProperty.JOINED]), join_path=SemanticModelToMetricSubqueryJoinPath( metric_subquery_join_path_element=MetricSubqueryJoinPathElement( @@ -152,7 +152,7 @@ semantic_model_join_path=SemanticModelJoinPath(left_semantic_model_reference=_base_semantic_model), ), ) -_ambiguous_metric = LinkableMetric( +_ambiguous_metric = LinkableMetric.create( properties=frozenset([LinkableElementProperty.METRIC, LinkableElementProperty.JOINED]), join_path=SemanticModelToMetricSubqueryJoinPath( metric_subquery_join_path_element=MetricSubqueryJoinPathElement( @@ -165,7 +165,7 @@ ), ) # For testing deduplication on metrics -_ambiguous_metric_with_join_path = LinkableMetric( +_ambiguous_metric_with_join_path = LinkableMetric.create( properties=frozenset([LinkableElementProperty.METRIC, LinkableElementProperty.JOINED]), join_path=SemanticModelToMetricSubqueryJoinPath( metric_subquery_join_path_element=MetricSubqueryJoinPathElement( @@ -575,7 +575,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 entity_links=(entity_0,), element_type=LinkableElementType.DIMENSION, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("dimension_source"), element_name="dimension_element", dimension_type=DimensionType.CATEGORICAL, @@ -600,7 +600,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 element_type=LinkableElementType.TIME_DIMENSION, time_granularity=TimeGranularity.DAY, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("time_dimension_source"), element_name="time_dimension_element", dimension_type=DimensionType.TIME, @@ -626,7 +626,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 entity_links=(entity_2,), element_type=LinkableElementType.ENTITY, ): ( - LinkableEntity( + LinkableEntity.create( defined_in_semantic_model=SemanticModelReference("entity_source"), element_name="entity_element", entity_links=(entity_2,), @@ -650,7 +650,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 element_type=LinkableElementType.METRIC, metric_subquery_entity_links=(entity_2,), ): ( - LinkableMetric( + LinkableMetric.create( properties=frozenset([LinkableElementProperty.METRIC, LinkableElementProperty.JOINED]), join_path=SemanticModelToMetricSubqueryJoinPath( metric_subquery_join_path_element=MetricSubqueryJoinPathElement( diff --git a/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py b/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py index 41ce535132..48bae8d141 100644 --- a/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py +++ b/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py @@ -112,7 +112,7 @@ def test_dimension_in_filter( # noqa: D103 time_granularity=None, date_part=None, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.CATEGORICAL, element_name="country_latest", @@ -170,7 +170,7 @@ def test_dimension_in_filter_with_grain( # noqa: D103 time_granularity=TimeGranularity.WEEK, date_part=None, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("listings_source"), dimension_type=DimensionType.TIME, element_name="created_at", @@ -234,7 +234,7 @@ def test_time_dimension_in_filter( # noqa: D103 time_granularity=TimeGranularity.MONTH, date_part=None, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("listings_source"), dimension_type=DimensionType.CATEGORICAL, element_name="created_at", @@ -298,7 +298,7 @@ def test_time_dimension_with_grain_in_name( # noqa: D103 time_granularity=TimeGranularity.MONTH, date_part=None, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("listings_source"), dimension_type=DimensionType.CATEGORICAL, element_name="created_at", @@ -363,7 +363,7 @@ def test_date_part_in_filter( # noqa: D103 time_granularity=TimeGranularity.DAY, date_part=DatePart.YEAR, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.TIME, element_name="metric_time", @@ -431,7 +431,7 @@ def resolved_spec_lookup() -> FilterSpecResolutionLookUp: time_granularity=TimeGranularity.WEEK, date_part=DatePart.YEAR, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.TIME, element_name="metric_time", @@ -553,7 +553,7 @@ def test_entity_in_filter( # noqa: D103 time_granularity=TimeGranularity.DAY, date_part=DatePart.YEAR, ): ( - LinkableEntity( + LinkableEntity.create( defined_in_semantic_model=SemanticModelReference("bookings"), element_name="user", entity_links=(EntityReference("listing"),), @@ -606,7 +606,7 @@ def test_metric_in_filter( # noqa: D103 date_part=None, metric_subquery_entity_links=(EntityReference("listing"),), ): ( - LinkableMetric( + LinkableMetric.create( properties=frozenset({LinkableElementProperty.METRIC, LinkableElementProperty.JOINED}), join_path=SemanticModelToMetricSubqueryJoinPath( metric_subquery_join_path_element=MetricSubqueryJoinPathElement( @@ -664,7 +664,7 @@ def get_spec(dimension: str) -> WhereFilterSpec: time_granularity=TimeGranularity.DAY, date_part=DatePart.YEAR, ): ( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.TIME, element_name=METRIC_TIME_ELEMENT_NAME, diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt index 36027af385..0450476a29 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( + properties=(METRIC_TIME,), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -18,7 +19,6 @@ GroupByItemResolution( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt index 2c2ce3e910..c0ab4fe216 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=YEAR, ): ( LinkableDimension( + properties=(DERIVED_TIME_GRANULARITY, METRIC_TIME), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -18,13 +19,10 @@ GroupByItemResolution( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'DERIVED_TIME_GRANULARITY', - 'METRIC_TIME', - ), time_granularity=YEAR, ), LinkableDimension( + properties=(METRIC_TIME,), defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), @@ -35,7 +33,6 @@ GroupByItemResolution( semantic_model_name='yearly_measure_source', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=YEAR, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt index 36027af385..0450476a29 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( + properties=(METRIC_TIME,), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -18,7 +19,6 @@ GroupByItemResolution( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt index 2c2ce3e910..c0ab4fe216 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=YEAR, ): ( LinkableDimension( + properties=(DERIVED_TIME_GRANULARITY, METRIC_TIME), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -18,13 +19,10 @@ GroupByItemResolution( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'DERIVED_TIME_GRANULARITY', - 'METRIC_TIME', - ), time_granularity=YEAR, ), LinkableDimension( + properties=(METRIC_TIME,), defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), @@ -35,7 +33,6 @@ GroupByItemResolution( semantic_model_name='yearly_measure_source', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=YEAR, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt index 36027af385..0450476a29 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( + properties=(METRIC_TIME,), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -18,7 +19,6 @@ GroupByItemResolution( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt index ba95597560..ac202ecaf3 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=DAY, ): ( LinkableDimension( + properties=(METRIC_TIME,), element_name='metric_time', dimension_type=TIME, join_path=SemanticModelJoinPath( @@ -15,7 +16,6 @@ GroupByItemResolution( semantic_model_name='__VIRTUAL__', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=DAY, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt index 36027af385..0450476a29 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt @@ -8,6 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( + properties=(METRIC_TIME,), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -18,7 +19,6 @@ GroupByItemResolution( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset('METRIC_TIME',), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt index f2fbc47b39..fd2b78fa5b 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt @@ -54,6 +54,9 @@ ParseQueryResult( ), ): ( LinkableDimension( + properties=( + LOCAL, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='bookings_source', ), @@ -69,9 +72,6 @@ ParseQueryResult( semantic_model_name='bookings_source', ), ), - properties=frozenset( - 'LOCAL', - ), ), ), }, diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt index 055d3e87f4..d7a7c80b37 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt @@ -30,6 +30,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,9 +43,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), @@ -93,6 +93,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -103,9 +106,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt index 80b32c7364..8f6610729e 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt @@ -30,6 +30,10 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( + properties=( + DERIVED_TIME_GRANULARITY, + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,13 +44,12 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'DERIVED_TIME_GRANULARITY', - 'METRIC_TIME', - ), time_granularity=YEAR, ), LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), @@ -57,9 +60,6 @@ FilterSpecResolutionLookUp( semantic_model_name='yearly_measure_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=YEAR, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt index 139eba5580..afb915c0fa 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt @@ -30,6 +30,10 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( + properties=( + DERIVED_TIME_GRANULARITY, + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,13 +44,12 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'DERIVED_TIME_GRANULARITY', - 'METRIC_TIME', - ), time_granularity=YEAR, ), LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), @@ -57,9 +60,6 @@ FilterSpecResolutionLookUp( semantic_model_name='yearly_measure_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=YEAR, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt index 02a9dbc33f..88091fbb61 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt @@ -30,6 +30,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,9 +43,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt index b0d2033359..dbb7165ae2 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt @@ -30,6 +30,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,9 +43,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt index af6392ade2..0c24cd6674 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt @@ -30,6 +30,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,9 +43,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt index affa1a709f..4f7d466824 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt @@ -30,6 +30,10 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( + properties=( + DERIVED_TIME_GRANULARITY, + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,13 +44,12 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'DERIVED_TIME_GRANULARITY', - 'METRIC_TIME', - ), time_granularity=YEAR, ), LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), @@ -57,9 +60,6 @@ FilterSpecResolutionLookUp( semantic_model_name='yearly_measure_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=YEAR, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt index 2979f426e1..19e5bd1ede 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt @@ -30,6 +30,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,9 +43,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt index 2dd9caf21d..d6d07856bb 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt @@ -33,6 +33,10 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( + properties=( + DERIVED_TIME_GRANULARITY, + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -43,13 +47,12 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'DERIVED_TIME_GRANULARITY', - 'METRIC_TIME', - ), time_granularity=YEAR, ), LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), @@ -60,9 +63,6 @@ FilterSpecResolutionLookUp( semantic_model_name='yearly_measure_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=YEAR, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt index f17cf39eb9..9ded545300 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt @@ -33,6 +33,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -43,9 +46,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt index f587df8fc9..a64ddd65bd 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt @@ -30,6 +30,9 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( + properties=( + METRIC_TIME, + ), defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), @@ -40,9 +43,6 @@ FilterSpecResolutionLookUp( semantic_model_name='monthly_measures_source', ), ), - properties=frozenset( - 'METRIC_TIME', - ), time_granularity=MONTH, ), ), diff --git a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py index 1363328d53..51b2c5e49a 100644 --- a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py +++ b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py @@ -202,7 +202,7 @@ def test_filter_with_where_constraint_node( ), ), linkable_elements=( - LinkableDimension( + LinkableDimension.create( defined_in_semantic_model=SemanticModelReference("bookings_source"), element_name="ds", dimension_type=DimensionType.TIME, diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml index 542d5be751..f039f0314d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml @@ -32,6 +32,7 @@ + @@ -43,7 +44,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml index e4eb53ea7e..50b3b39021 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml @@ -37,6 +37,7 @@ + @@ -48,7 +49,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml index 2af5d836a4..0fcb48e01e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -24,7 +25,6 @@ - @@ -53,6 +53,7 @@ + @@ -63,7 +64,6 @@ - @@ -103,6 +103,7 @@ + @@ -113,7 +114,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml index b7316dcade..530e7fe8a3 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml @@ -21,6 +21,7 @@ + @@ -44,7 +45,6 @@ - @@ -80,6 +80,7 @@ + @@ -101,7 +102,6 @@ - @@ -198,6 +198,7 @@ + @@ -221,7 +222,6 @@ - @@ -257,6 +257,7 @@ + @@ -278,7 +279,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml index 5cae6fe5da..5493c9567b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml @@ -21,6 +21,7 @@ + @@ -34,7 +35,6 @@ - @@ -71,6 +71,7 @@ + @@ -82,7 +83,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml index 83cfb6e9df..fc523cbe42 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -24,7 +25,6 @@ - @@ -51,6 +51,7 @@ + @@ -61,7 +62,6 @@ - @@ -96,6 +96,7 @@ + @@ -106,7 +107,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml index 8c4815d37b..df0916e167 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -24,7 +25,6 @@ - @@ -54,6 +54,7 @@ + @@ -64,7 +65,6 @@ - @@ -98,6 +98,7 @@ + @@ -108,7 +109,6 @@ - @@ -170,6 +170,7 @@ + @@ -180,7 +181,6 @@ - @@ -213,6 +213,7 @@ + @@ -223,7 +224,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml index 467d3bf909..030ef8858e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -35,7 +36,6 @@ - @@ -75,6 +75,7 @@ + @@ -96,7 +97,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml index c950f9385b..a8534dc245 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -24,7 +25,6 @@ - @@ -61,6 +61,7 @@ + @@ -71,7 +72,6 @@ - diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml index a6e585715e..6b09223c20 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -35,7 +36,6 @@ - @@ -65,6 +65,7 @@ + @@ -86,7 +87,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml index ced298e06e..ac8f9caa43 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -70,6 +70,7 @@ + @@ -81,7 +82,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml index b0146bac81..9080ee6cb2 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -112,6 +112,7 @@ + @@ -127,7 +128,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml index f7660b833d..55ef251546 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -66,6 +66,7 @@ + @@ -77,7 +78,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml index 353671b14e..03476ae806 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -113,6 +113,7 @@ + @@ -128,7 +129,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml index 7700fbd293..1e4bbb55f5 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -58,6 +58,7 @@ + @@ -71,7 +72,6 @@ - @@ -123,6 +123,7 @@ + @@ -134,7 +135,6 @@ - @@ -242,6 +242,7 @@ + @@ -255,7 +256,6 @@ - @@ -309,6 +309,7 @@ + @@ -320,7 +321,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml index 13c15b531d..7fe6f20492 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -58,6 +58,7 @@ + @@ -71,7 +72,6 @@ - @@ -166,6 +166,7 @@ + @@ -181,7 +182,6 @@ - @@ -246,6 +246,7 @@ + @@ -259,7 +260,6 @@ - @@ -313,6 +313,7 @@ + @@ -324,7 +325,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml index da8700c14b..cb09f8635c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -58,6 +58,7 @@ + @@ -71,7 +72,6 @@ - @@ -98,6 +98,7 @@ + @@ -109,7 +110,6 @@ - @@ -148,6 +148,7 @@ + @@ -159,7 +160,6 @@ - @@ -267,6 +267,7 @@ + @@ -280,7 +281,6 @@ - @@ -309,6 +309,7 @@ + @@ -320,7 +321,6 @@ - @@ -359,6 +359,7 @@ + @@ -370,7 +371,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml index a86e08210b..b4dae39c36 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -58,6 +58,7 @@ + @@ -71,7 +72,6 @@ - @@ -98,6 +98,7 @@ + @@ -109,7 +110,6 @@ - @@ -191,6 +191,7 @@ + @@ -206,7 +207,6 @@ - @@ -271,6 +271,7 @@ + @@ -284,7 +285,6 @@ - @@ -313,6 +313,7 @@ + @@ -324,7 +325,6 @@ - @@ -363,6 +363,7 @@ + @@ -374,7 +375,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml index e2717cf4a6..89d77406f9 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -58,6 +58,7 @@ + @@ -71,7 +72,6 @@ - @@ -113,6 +113,7 @@ + @@ -124,7 +125,6 @@ - @@ -231,6 +231,7 @@ + @@ -244,7 +245,6 @@ - @@ -288,6 +288,7 @@ + @@ -299,7 +300,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml index f98353aaa3..f65e8c7405 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -58,6 +58,7 @@ + @@ -71,7 +72,6 @@ - @@ -155,6 +155,7 @@ + @@ -170,7 +171,6 @@ - @@ -233,6 +233,7 @@ + @@ -246,7 +247,6 @@ - @@ -290,6 +290,7 @@ + @@ -301,7 +302,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml index 654b0fdff1..7ef726b5ff 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -65,6 +65,7 @@ + @@ -76,7 +77,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml index 749a3094f5..1b46d39dab 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - @@ -101,6 +101,7 @@ + @@ -112,7 +113,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml index 5f2249ddf6..b80c7d4f6e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml @@ -14,6 +14,7 @@ + @@ -24,7 +25,6 @@ - @@ -61,6 +61,7 @@ + @@ -71,7 +72,6 @@ - diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml index 8d1a057c86..f0c77ffc08 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml @@ -14,6 +14,7 @@ + @@ -24,7 +25,6 @@ - @@ -61,6 +61,7 @@ + @@ -71,7 +72,6 @@ - diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml index 0aaf6df1f0..759dbd4241 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml @@ -53,6 +53,7 @@ + @@ -64,7 +65,6 @@ - diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml index 2e687c4068..399c28896b 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml @@ -53,6 +53,7 @@ + @@ -64,7 +65,6 @@ -