Skip to content

Commit

Permalink
Add snapshots for resolution DAG cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Dec 7, 2023
1 parent 30c391f commit 8bb8e87
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 0 deletions.
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>
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>
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>
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>
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>
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>
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>

0 comments on commit 8bb8e87

Please sign in to comment.