-
Notifications
You must be signed in to change notification settings - Fork 96
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 resolution DAG cases.
- Loading branch information
Showing
7 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...gs.py/GroupByItemResolutionDag/test_snapshot__accumulate_last_2_months_metric__gbir_6.xml
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,21 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_6 --> | ||
<!-- metrics_in_query = --> | ||
<!-- ["MetricReference(element_name='accumulate_last_2_months_metric')"] --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_11 --> | ||
<!-- metric_reference = --> | ||
<!-- MetricReference(element_name='accumulate_last_2_months_metric') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_9 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_0') --> | ||
<!-- child_metric_reference = --> | ||
<!-- MetricReference(element_name='accumulate_last_2_months_metric') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |
36 changes: 36 additions & 0 deletions
36
...ResolutionDag/test_snapshot__derived_metric_with_different_parent_time_grains__gbir_5.xml
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,36 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_5 --> | ||
<!-- metrics_in_query = --> | ||
<!-- ["MetricReference(element_name='derived_metric_with_different_parent_time_grains')"] --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_10 --> | ||
<!-- metric_reference = --> | ||
<!-- MetricReference(element_name='derived_metric_with_different_parent_time_grains') --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_8 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_7 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_9 --> | ||
<!-- metric_reference = MetricReference(element_name='yearly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_8 --> | ||
<!-- measure_reference = MeasureReference(element_name='yearly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='yearly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
</MetricGroupByItemResolutionNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |
36 changes: 36 additions & 0 deletions
36
...yItemResolutionDag/test_snapshot__derived_metric_with_same_parent_time_grains__gbir_4.xml
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,36 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_4 --> | ||
<!-- metrics_in_query = --> | ||
<!-- ["MetricReference(element_name='derived_metric_with_same_parent_time_grains')"] --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_7 --> | ||
<!-- metric_reference = --> | ||
<!-- MetricReference(element_name='derived_metric_with_same_parent_time_grains') --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_5 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_5 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_6 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_1') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_6 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_1') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_1') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
</MetricGroupByItemResolutionNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |
31 changes: 31 additions & 0 deletions
31
...py/GroupByItemResolutionDag/test_snapshot__metrics_with_different_time_grains__gbir_3.xml
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,31 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_3 --> | ||
<!-- metrics_in_query = --> | ||
<!-- ["MetricReference(element_name='monthly_metric_0')", --> | ||
<!-- "MetricReference(element_name='yearly_metric_0')"] --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_3 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_3 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_4 --> | ||
<!-- metric_reference = MetricReference(element_name='yearly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_4 --> | ||
<!-- measure_reference = MeasureReference(element_name='yearly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='yearly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |
31 changes: 31 additions & 0 deletions
31
...dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_same_time_grains__gbir_2.xml
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,31 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_2 --> | ||
<!-- metrics_in_query = --> | ||
<!-- ["MetricReference(element_name='monthly_metric_0')", --> | ||
<!-- "MetricReference(element_name='monthly_metric_1')"] --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_1 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_1 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_2 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_1') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_2 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_1') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_1') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |
12 changes: 12 additions & 0 deletions
12
...ts/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__no_metrics__gbir_0.xml
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,12 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_0 --> | ||
<!-- metrics_in_query = [] --> | ||
<NoMetricsGroupByItemSourceNode> | ||
<!-- description = --> | ||
<!-- Output the available group-by-items for a query without any metrics. --> | ||
<!-- node_id = vr_0 --> | ||
</NoMetricsGroupByItemSourceNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |
18 changes: 18 additions & 0 deletions
18
...test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__simple_metric__gbir_1.xml
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,18 @@ | ||
<GroupByItemResolutionDag> | ||
<QueryGroupByItemResolutionNode> | ||
<!-- description = Output the group-by items for query. --> | ||
<!-- node_id = qr_1 --> | ||
<!-- metrics_in_query = ["MetricReference(element_name='monthly_metric_0')"] --> | ||
<MetricGroupByItemResolutionNode> | ||
<!-- description = Output group-by-items available for this metric. --> | ||
<!-- node_id = mtr_0 --> | ||
<!-- metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
<MeasureGroupByItemSourceNode> | ||
<!-- description = Output group-by-items available for this measure. --> | ||
<!-- node_id = msr_0 --> | ||
<!-- measure_reference = MeasureReference(element_name='monthly_measure_0') --> | ||
<!-- child_metric_reference = MetricReference(element_name='monthly_metric_0') --> | ||
</MeasureGroupByItemSourceNode> | ||
</MetricGroupByItemResolutionNode> | ||
</QueryGroupByItemResolutionNode> | ||
</GroupByItemResolutionDag> |