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 a687fce8a6..310e9c9004 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 @@ -1 +1,22 @@ -GroupByItemResolution(spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH)) +GroupByItemResolution( + spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + 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 4f335a25f2..a151d9b75c 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 @@ -1,4 +1,5 @@ GroupByItemResolution( + linkable_element_set=LinkableElementSet(), issue_set=MetricFlowQueryResolutionIssueSet( issues=( NoCommonItemsInParents( @@ -11,11 +12,24 @@ GroupByItemResolution( ), parent_candidate_sets=( GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=MONTH, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( @@ -36,11 +50,24 @@ GroupByItemResolution( ), ), GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=YEAR, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=YEAR, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='yearly_measure_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=YEAR, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( 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 a687fce8a6..310e9c9004 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 @@ -1 +1,22 @@ -GroupByItemResolution(spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH)) +GroupByItemResolution( + spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + 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 ca5af91d22..9778252906 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 @@ -1,4 +1,5 @@ GroupByItemResolution( + linkable_element_set=LinkableElementSet(), issue_set=MetricFlowQueryResolutionIssueSet( issues=( NoCommonItemsInParents( @@ -8,11 +9,24 @@ GroupByItemResolution( ), parent_candidate_sets=( GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=MONTH, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( @@ -31,11 +45,24 @@ GroupByItemResolution( ), ), GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=YEAR, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=YEAR, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='yearly_measure_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=YEAR, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( 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 a687fce8a6..310e9c9004 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 @@ -1 +1,22 @@ -GroupByItemResolution(spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH)) +GroupByItemResolution( + spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + 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 d3552b1753..057b0dfe18 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 @@ -1 +1,19 @@ -GroupByItemResolution(spec=TimeDimensionSpec(element_name='metric_time', time_granularity=DAY)) +GroupByItemResolution( + spec=TimeDimensionSpec(element_name='metric_time', time_granularity=DAY), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=DAY, + ): ( + LinkableDimension( + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + 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 a687fce8a6..310e9c9004 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 @@ -1 +1,22 @@ -GroupByItemResolution(spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH)) +GroupByItemResolution( + spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), +) diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt index a0fcdd41f3..21234f22f4 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt @@ -1,4 +1,5 @@ GroupByItemResolution( + linkable_element_set=LinkableElementSet(), issue_set=MetricFlowQueryResolutionIssueSet( issues=( NoMatchingItemsForMeasure( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt index 4eac17bbba..a3774cbe89 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt @@ -1,4 +1,5 @@ GroupByItemResolution( + linkable_element_set=LinkableElementSet(), issue_set=MetricFlowQueryResolutionIssueSet( issues=( NoMatchingItemsForMeasure( 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 e9dded7b67..e4e1f4ce43 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 @@ -22,7 +22,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), @@ -60,7 +78,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), 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 1c8462ad59..063f27b837 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 @@ -22,6 +22,7 @@ FilterSpecResolutionLookUp( ), ], ), + resolved_linkable_element_set=LinkableElementSet(), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), @@ -40,11 +41,24 @@ FilterSpecResolutionLookUp( ), parent_candidate_sets=( GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=MONTH, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( @@ -65,11 +79,24 @@ FilterSpecResolutionLookUp( ), ), GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=YEAR, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=YEAR, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='yearly_measure_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=YEAR, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( 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 d64f856af1..8e6b7a0ca8 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 @@ -22,6 +22,7 @@ FilterSpecResolutionLookUp( ), ], ), + resolved_linkable_element_set=LinkableElementSet(), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), @@ -41,11 +42,24 @@ FilterSpecResolutionLookUp( ), parent_candidate_sets=( GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=MONTH, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( @@ -68,11 +82,24 @@ FilterSpecResolutionLookUp( ), ), GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=YEAR, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=YEAR, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='yearly_measure_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=YEAR, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( 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 ed4de4e885..60b59c8d79 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 @@ -22,7 +22,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), 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 65513b2d5f..cc155e70a5 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 @@ -22,7 +22,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), 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 db27d0f522..7d77ed1031 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 @@ -22,7 +22,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), 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 7d961e2d45..58383f8a08 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 @@ -22,6 +22,7 @@ FilterSpecResolutionLookUp( ), ], ), + resolved_linkable_element_set=LinkableElementSet(), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), @@ -40,11 +41,24 @@ FilterSpecResolutionLookUp( ), parent_candidate_sets=( GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=MONTH, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( @@ -65,11 +79,24 @@ FilterSpecResolutionLookUp( ), ), GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=YEAR, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=YEAR, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='yearly_measure_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=YEAR, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( 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 c9fd95b464..df8b92b453 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 @@ -22,7 +22,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), 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 d8f991770d..2cc7ddb651 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 @@ -25,6 +25,7 @@ FilterSpecResolutionLookUp( ), ], ), + resolved_linkable_element_set=LinkableElementSet(), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), @@ -42,11 +43,24 @@ FilterSpecResolutionLookUp( ), parent_candidate_sets=( GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=MONTH, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( @@ -65,11 +79,24 @@ FilterSpecResolutionLookUp( ), ), GroupByItemCandidateSet( - specs=( - TimeDimensionSpec( - element_name='metric_time', - time_granularity=YEAR, - ), + linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=YEAR, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='yearly_measure_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=YEAR, + ), + ), + }, ), measure_paths=( MetricFlowQueryResolutionPath( 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 d6cbeec091..08165c1164 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 @@ -25,7 +25,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS), 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 b8c3f57c16..30917c4241 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 @@ -22,7 +22,25 @@ FilterSpecResolutionLookUp( ), ], ), - resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), + resolved_linkable_element_set=LinkableElementSet( + path_key_to_linkable_dimensions={ + ElementPathKey( + element_name='metric_time', + element_type=TIME_DIMENSION, + time_granularity=MONTH, + ): ( + LinkableDimension( + semantic_model_origin=SemanticModelReference( + semantic_model_name='monthly_measures_source', + ), + element_name='metric_time', + dimension_type=TIME, + properties=frozenset({}), + time_granularity=MONTH, + ), + ), + }, + ), spec_pattern=TimeDimensionPattern( parameter_set=EntityLinkPatternParameterSet( fields_to_compare=(DATE_PART, ELEMENT_NAME, ENTITY_LINKS),