-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snapshots for filter spec resolution tests.
- Loading branch information
Showing
11 changed files
with
402 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
...hots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
FilterSpecResolutionLookUp( | ||
issue_set=MetricFlowQueryResolutionIssueSet( | ||
issues=( | ||
NoCommonItemsInParents( | ||
issue_type=ERROR, | ||
query_resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=(MetricGroupByItemResolutionNode(node_id=mtr_2),), | ||
), | ||
parent_candidate_sets=( | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=MONTH, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_0), | ||
MeasureGroupByItemSourceNode(node_id=msr_0), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_0), | ||
), | ||
), | ||
), | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=YEAR, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_1), | ||
MeasureGroupByItemSourceNode(node_id=msr_1), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_1), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
) |
60 changes: 60 additions & 0 deletions
60
...est_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
FilterSpecResolutionLookUp( | ||
issue_set=MetricFlowQueryResolutionIssueSet( | ||
issues=( | ||
NoCommonItemsInParents( | ||
issue_type=ERROR, | ||
query_resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=(MetricGroupByItemResolutionNode(node_id=mtr_2),), | ||
), | ||
parent_candidate_sets=( | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=MONTH, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_0), | ||
MeasureGroupByItemSourceNode(node_id=msr_0), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_0), | ||
), | ||
), | ||
), | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=YEAR, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_1), | ||
MeasureGroupByItemSourceNode(node_id=msr_1), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
MetricGroupByItemResolutionNode(node_id=mtr_1), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
) |
27 changes: 27 additions & 0 deletions
27
...pshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FilterSpecResolutionLookUp( | ||
spec_resolutions=( | ||
FilterSpecResolution( | ||
lookup_key=ResolvedSpecLookUpKey( | ||
filter_location=WhereFilterLocation( | ||
metric_references=( | ||
MetricReference( | ||
element_name='derived_metric_with_same_parent_time_grains', | ||
), | ||
), | ||
), | ||
call_parameter_set=TimeDimensionCallParameterSet( | ||
time_dimension_reference=TimeDimensionReference( | ||
element_name='metric_time', | ||
), | ||
), | ||
), | ||
resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_0), | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
), | ||
), | ||
resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), | ||
), | ||
), | ||
) |
28 changes: 28 additions & 0 deletions
28
.../test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FilterSpecResolutionLookUp( | ||
spec_resolutions=( | ||
FilterSpecResolution( | ||
lookup_key=ResolvedSpecLookUpKey( | ||
filter_location=WhereFilterLocation( | ||
metric_references=( | ||
MetricReference( | ||
element_name='derived_metric_with_same_parent_time_grains', | ||
), | ||
), | ||
), | ||
call_parameter_set=TimeDimensionCallParameterSet( | ||
time_dimension_reference=TimeDimensionReference( | ||
element_name='metric_time', | ||
), | ||
), | ||
), | ||
resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_0), | ||
MetricGroupByItemResolutionNode(node_id=mtr_3), | ||
MetricGroupByItemResolutionNode(node_id=mtr_2), | ||
), | ||
), | ||
resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), | ||
), | ||
), | ||
) |
24 changes: 24 additions & 0 deletions
24
...ec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FilterSpecResolutionLookUp( | ||
spec_resolutions=( | ||
FilterSpecResolution( | ||
lookup_key=ResolvedSpecLookUpKey( | ||
filter_location=WhereFilterLocation( | ||
metric_references=( | ||
MetricReference( | ||
element_name='accumulate_last_2_months_metric', | ||
), | ||
), | ||
), | ||
call_parameter_set=TimeDimensionCallParameterSet( | ||
time_dimension_reference=TimeDimensionReference( | ||
element_name='metric_time', | ||
), | ||
), | ||
), | ||
resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=(QueryGroupByItemResolutionNode(node_id=qr_6),), | ||
), | ||
resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), | ||
), | ||
), | ||
) |
67 changes: 67 additions & 0 deletions
67
...test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
FilterSpecResolutionLookUp( | ||
issue_set=MetricFlowQueryResolutionIssueSet( | ||
issues=( | ||
NoCommonItemsInParents( | ||
issue_type=ERROR, | ||
query_resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_5), | ||
MetricGroupByItemResolutionNode(node_id=mtr_10), | ||
), | ||
), | ||
parent_candidate_sets=( | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=MONTH, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_5), | ||
MetricGroupByItemResolutionNode(node_id=mtr_10), | ||
MetricGroupByItemResolutionNode(node_id=mtr_8), | ||
MeasureGroupByItemSourceNode(node_id=msr_7), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_5), | ||
MetricGroupByItemResolutionNode(node_id=mtr_10), | ||
MetricGroupByItemResolutionNode(node_id=mtr_8), | ||
), | ||
), | ||
), | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=YEAR, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_5), | ||
MetricGroupByItemResolutionNode(node_id=mtr_10), | ||
MetricGroupByItemResolutionNode(node_id=mtr_9), | ||
MeasureGroupByItemSourceNode(node_id=msr_8), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_5), | ||
MetricGroupByItemResolutionNode(node_id=mtr_10), | ||
MetricGroupByItemResolutionNode(node_id=mtr_9), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
) |
24 changes: 24 additions & 0 deletions
24
.../str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FilterSpecResolutionLookUp( | ||
spec_resolutions=( | ||
FilterSpecResolution( | ||
lookup_key=ResolvedSpecLookUpKey( | ||
filter_location=WhereFilterLocation( | ||
metric_references=( | ||
MetricReference( | ||
element_name='derived_metric_with_same_parent_time_grains', | ||
), | ||
), | ||
), | ||
call_parameter_set=TimeDimensionCallParameterSet( | ||
time_dimension_reference=TimeDimensionReference( | ||
element_name='metric_time', | ||
), | ||
), | ||
), | ||
resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=(QueryGroupByItemResolutionNode(node_id=qr_4),), | ||
), | ||
resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), | ||
), | ||
), | ||
) |
60 changes: 60 additions & 0 deletions
60
...lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
FilterSpecResolutionLookUp( | ||
issue_set=MetricFlowQueryResolutionIssueSet( | ||
issues=( | ||
NoCommonItemsInParents( | ||
issue_type=ERROR, | ||
query_resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=(QueryGroupByItemResolutionNode(node_id=qr_3),), | ||
), | ||
parent_candidate_sets=( | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=MONTH, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_3), | ||
MetricGroupByItemResolutionNode(node_id=mtr_3), | ||
MeasureGroupByItemSourceNode(node_id=msr_3), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_3), | ||
MetricGroupByItemResolutionNode(node_id=mtr_3), | ||
), | ||
), | ||
), | ||
GroupByItemCandidateSet( | ||
specs=( | ||
TimeDimensionSpec( | ||
element_name='metric_time', | ||
time_granularity=YEAR, | ||
), | ||
), | ||
measure_paths=( | ||
MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_3), | ||
MetricGroupByItemResolutionNode(node_id=mtr_4), | ||
MeasureGroupByItemSourceNode(node_id=msr_4), | ||
), | ||
), | ||
), | ||
path_from_leaf_node=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=( | ||
QueryGroupByItemResolutionNode(node_id=qr_3), | ||
MetricGroupByItemResolutionNode(node_id=mtr_4), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
) |
27 changes: 27 additions & 0 deletions
27
...spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FilterSpecResolutionLookUp( | ||
spec_resolutions=( | ||
FilterSpecResolution( | ||
lookup_key=ResolvedSpecLookUpKey( | ||
filter_location=WhereFilterLocation( | ||
metric_references=( | ||
MetricReference( | ||
element_name='monthly_metric_0', | ||
), | ||
MetricReference( | ||
element_name='monthly_metric_1', | ||
), | ||
), | ||
), | ||
call_parameter_set=TimeDimensionCallParameterSet( | ||
time_dimension_reference=TimeDimensionReference( | ||
element_name='metric_time', | ||
), | ||
), | ||
), | ||
resolution_path=MetricFlowQueryResolutionPath( | ||
resolution_path_nodes=(QueryGroupByItemResolutionNode(node_id=qr_2),), | ||
), | ||
resolved_spec=TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH), | ||
), | ||
), | ||
) |
1 change: 1 addition & 0 deletions
1
...est/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__no_metrics__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FilterSpecResolutionLookUp() |
Oops, something went wrong.