From 75d0e42368aa659c8f2d5891b5677e2feef9e365 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Fri, 20 Dec 2024 13:37:58 -0800 Subject: [PATCH] Update snapshots for other engines --- ..._metric_with_non_default_grains__plan0.sql | 32 +++++++++---------- ...th_non_default_grains__plan0_optimized.sql | 20 ++++++------ ..._metric_with_non_default_grains__plan0.sql | 32 +++++++++---------- ...th_non_default_grains__plan0_optimized.sql | 20 ++++++------ ..._metric_with_non_default_grains__plan0.sql | 32 +++++++++---------- ...th_non_default_grains__plan0_optimized.sql | 20 ++++++------ ..._metric_with_non_default_grains__plan0.sql | 32 +++++++++---------- ...th_non_default_grains__plan0_optimized.sql | 20 ++++++------ ..._metric_with_non_default_grains__plan0.sql | 32 +++++++++---------- ...th_non_default_grains__plan0_optimized.sql | 20 ++++++------ ..._metric_with_non_default_grains__plan0.sql | 32 +++++++++---------- ...th_non_default_grains__plan0_optimized.sql | 20 ++++++------ ..._metric_grouped_by_custom_grain__plan0.sql | 4 +-- ..._with_custom_granularity_filter__plan0.sql | 8 ++--- ...nularity_filter_not_in_group_by__plan0.sql | 6 ++-- ..._metric_grouped_by_custom_grain__plan0.sql | 4 +-- ..._with_custom_granularity_filter__plan0.sql | 8 ++--- ...nularity_filter_not_in_group_by__plan0.sql | 6 ++-- ..._metric_grouped_by_custom_grain__plan0.sql | 4 +-- ..._with_custom_granularity_filter__plan0.sql | 8 ++--- ...nularity_filter_not_in_group_by__plan0.sql | 6 ++-- ..._metric_grouped_by_custom_grain__plan0.sql | 4 +-- ..._with_custom_granularity_filter__plan0.sql | 8 ++--- ...nularity_filter_not_in_group_by__plan0.sql | 6 ++-- ..._metric_grouped_by_custom_grain__plan0.sql | 4 +-- ..._with_custom_granularity_filter__plan0.sql | 8 ++--- ...nularity_filter_not_in_group_by__plan0.sql | 6 ++-- ..._metric_grouped_by_custom_grain__plan0.sql | 4 +-- ..._with_custom_granularity_filter__plan0.sql | 8 ++--- ...nularity_filter_not_in_group_by__plan0.sql | 6 ++-- ...nth_dimension_and_offset_window__plan0.sql | 4 +-- ...h_offset_window_and_granularity__plan0.sql | 2 +- ...offset_to_grain_and_granularity__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...n_metric_multiple_granularities__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...w_metric_multiple_granularities__plan0.sql | 4 +-- ...nth_dimension_and_offset_window__plan0.sql | 4 +-- ...h_offset_window_and_granularity__plan0.sql | 2 +- ...offset_to_grain_and_granularity__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...n_metric_multiple_granularities__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...w_metric_multiple_granularities__plan0.sql | 4 +-- ...nth_dimension_and_offset_window__plan0.sql | 4 +-- ...h_offset_window_and_granularity__plan0.sql | 2 +- ...offset_to_grain_and_granularity__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...n_metric_multiple_granularities__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...w_metric_multiple_granularities__plan0.sql | 4 +-- ...nth_dimension_and_offset_window__plan0.sql | 4 +-- ...h_offset_window_and_granularity__plan0.sql | 2 +- ...offset_to_grain_and_granularity__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...n_metric_multiple_granularities__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...w_metric_multiple_granularities__plan0.sql | 4 +-- ...nth_dimension_and_offset_window__plan0.sql | 4 +-- ...h_offset_window_and_granularity__plan0.sql | 2 +- ...offset_to_grain_and_granularity__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...n_metric_multiple_granularities__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...w_metric_multiple_granularities__plan0.sql | 4 +-- ...nth_dimension_and_offset_window__plan0.sql | 4 +-- ...h_offset_window_and_granularity__plan0.sql | 2 +- ...offset_to_grain_and_granularity__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...n_metric_multiple_granularities__plan0.sql | 4 +-- ...ry_have_different_granularities__plan0.sql | 2 +- ...w_metric_multiple_granularities__plan0.sql | 4 +-- ...ine_with_filter_not_in_group_by__plan0.sql | 8 ++--- ..._not_in_group_by_using_agg_time__plan0.sql | 10 +++--- ..._using_agg_time_and_metric_time__plan0.sql | 8 ++--- ...th_filter_smaller_than_group_by__plan0.sql | 10 +++--- ...smaller_than_group_by__plan0_optimized.sql | 4 +-- ...join_to_time_spine_with_filters__plan0.sql | 12 +++---- ..._simple_fill_nulls_with_0_month__plan0.sql | 4 +-- ...ine_with_filter_not_in_group_by__plan0.sql | 8 ++--- ..._not_in_group_by_using_agg_time__plan0.sql | 10 +++--- ..._using_agg_time_and_metric_time__plan0.sql | 8 ++--- ...th_filter_smaller_than_group_by__plan0.sql | 10 +++--- ...smaller_than_group_by__plan0_optimized.sql | 4 +-- ...join_to_time_spine_with_filters__plan0.sql | 12 +++---- ..._simple_fill_nulls_with_0_month__plan0.sql | 4 +-- ...ine_with_filter_not_in_group_by__plan0.sql | 8 ++--- ..._not_in_group_by_using_agg_time__plan0.sql | 10 +++--- ..._using_agg_time_and_metric_time__plan0.sql | 8 ++--- ...th_filter_smaller_than_group_by__plan0.sql | 10 +++--- ...smaller_than_group_by__plan0_optimized.sql | 4 +-- ...join_to_time_spine_with_filters__plan0.sql | 12 +++---- ..._simple_fill_nulls_with_0_month__plan0.sql | 4 +-- ...ine_with_filter_not_in_group_by__plan0.sql | 8 ++--- ..._not_in_group_by_using_agg_time__plan0.sql | 10 +++--- ..._using_agg_time_and_metric_time__plan0.sql | 8 ++--- ...th_filter_smaller_than_group_by__plan0.sql | 10 +++--- ...smaller_than_group_by__plan0_optimized.sql | 4 +-- ...join_to_time_spine_with_filters__plan0.sql | 12 +++---- ..._simple_fill_nulls_with_0_month__plan0.sql | 4 +-- ...ine_with_filter_not_in_group_by__plan0.sql | 8 ++--- ..._not_in_group_by_using_agg_time__plan0.sql | 10 +++--- ..._using_agg_time_and_metric_time__plan0.sql | 8 ++--- ...th_filter_smaller_than_group_by__plan0.sql | 10 +++--- ...smaller_than_group_by__plan0_optimized.sql | 4 +-- ...join_to_time_spine_with_filters__plan0.sql | 12 +++---- ..._simple_fill_nulls_with_0_month__plan0.sql | 4 +-- ...ine_with_filter_not_in_group_by__plan0.sql | 8 ++--- ..._not_in_group_by_using_agg_time__plan0.sql | 10 +++--- ..._using_agg_time_and_metric_time__plan0.sql | 8 ++--- ...th_filter_smaller_than_group_by__plan0.sql | 10 +++--- ...smaller_than_group_by__plan0_optimized.sql | 4 +-- ...join_to_time_spine_with_filters__plan0.sql | 12 +++---- ..._simple_fill_nulls_with_0_month__plan0.sql | 4 +-- ...st_offset_window_with_date_part__plan0.sql | 2 +- ...ily_time_constraint_with_metric__plan0.sql | 4 +-- ...st_offset_window_with_date_part__plan0.sql | 2 +- ...ily_time_constraint_with_metric__plan0.sql | 4 +-- ...st_offset_window_with_date_part__plan0.sql | 2 +- ...ily_time_constraint_with_metric__plan0.sql | 4 +-- ...st_offset_window_with_date_part__plan0.sql | 2 +- ...ily_time_constraint_with_metric__plan0.sql | 4 +-- ...st_offset_window_with_date_part__plan0.sql | 2 +- ...ily_time_constraint_with_metric__plan0.sql | 4 +-- ...st_offset_window_with_date_part__plan0.sql | 2 +- ...ily_time_constraint_with_metric__plan0.sql | 4 +-- ...est_derived_metric_alias__query_output.txt | 18 +++++------ .../test_metric_alias__query_output.txt | 18 +++++------ ...est_derived_metric_alias__query_output.txt | 18 +++++------ .../test_metric_alias__query_output.txt | 18 +++++------ ...est_derived_metric_alias__query_output.txt | 18 +++++------ .../test_metric_alias__query_output.txt | 18 +++++------ ...est_derived_metric_alias__query_output.txt | 18 +++++------ .../test_metric_alias__query_output.txt | 18 +++++------ .../test_derived_metric_alias__plan0.sql | 4 +-- ..._derived_metric_alias__plan0_optimized.sql | 4 +-- .../BigQuery/test_metric_alias__plan0.sql | 4 +-- .../test_metric_alias__plan0_optimized.sql | 4 +-- .../test_derived_metric_alias__plan0.sql | 4 +-- ..._derived_metric_alias__plan0_optimized.sql | 4 +-- .../Databricks/test_metric_alias__plan0.sql | 4 +-- .../test_metric_alias__plan0_optimized.sql | 4 +-- .../test_derived_metric_alias__plan0.sql | 4 +-- ..._derived_metric_alias__plan0_optimized.sql | 4 +-- .../Redshift/test_metric_alias__plan0.sql | 4 +-- .../test_metric_alias__plan0_optimized.sql | 4 +-- .../test_derived_metric_alias__plan0.sql | 4 +-- ..._derived_metric_alias__plan0_optimized.sql | 4 +-- .../Snowflake/test_metric_alias__plan0.sql | 4 +-- .../test_metric_alias__plan0_optimized.sql | 4 +-- ...e_with_input_measure_constraint__plan0.sql | 4 +-- ...ne_with_queried_time_constraint__plan0.sql | 4 +-- ...e_with_input_measure_constraint__plan0.sql | 4 +-- ...ne_with_queried_time_constraint__plan0.sql | 4 +-- ...e_with_input_measure_constraint__plan0.sql | 4 +-- ...ne_with_queried_time_constraint__plan0.sql | 4 +-- ...e_with_input_measure_constraint__plan0.sql | 4 +-- ...ne_with_queried_time_constraint__plan0.sql | 4 +-- ...e_with_input_measure_constraint__plan0.sql | 4 +-- ...ne_with_queried_time_constraint__plan0.sql | 4 +-- 160 files changed, 586 insertions(+), 586 deletions(-) diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql index d34c8f316d..b80296ef87 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql @@ -8,47 +8,47 @@ sql_engine: BigQuery --- -- Re-aggregate Metric via Group By SELECT - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 FROM ( -- Window Function for Metric Re-aggregation SELECT - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month , FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER ( PARTITION BY - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month ORDER BY subq_11.metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions SELECT - subq_10.booking__ds__month + subq_10.metric_time__day , subq_10.metric_time__week - , subq_10.metric_time__day + , subq_10.booking__ds__month , COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - subq_9.booking__ds__month AS booking__ds__month + subq_9.metric_time__day AS metric_time__day , subq_9.metric_time__week AS metric_time__week - , subq_9.metric_time__day AS metric_time__day + , subq_9.booking__ds__month AS booking__ds__month , subq_6.bookers AS bookers FROM ( -- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day'] SELECT - subq_8.booking__ds__month + subq_8.metric_time__day , subq_8.metric_time__week - , subq_8.metric_time__day + , subq_8.booking__ds__month FROM ( -- Change Column Aliases SELECT - subq_7.ds__month AS booking__ds__month + subq_7.ds__day AS metric_time__day , subq_7.ds__week AS metric_time__week - , subq_7.ds__day AS metric_time__day + , subq_7.ds__month AS booking__ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -414,6 +414,6 @@ FROM ( ) subq_11 ) subq_12 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql index 2773539027..829c5b9c7f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -8,28 +8,28 @@ sql_engine: BigQuery --- -- Re-aggregate Metric via Group By SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions -- Window Function for Metric Re-aggregation SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , FIRST_VALUE(COALESCE(bookers, 0)) OVER ( PARTITION BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month ORDER BY metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, month) AS booking__ds__month + time_spine_src_28006.ds AS metric_time__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS metric_time__week - , time_spine_src_28006.ds AS metric_time__day + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS booking__ds__month , subq_19.bookers AS bookers FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ( @@ -60,6 +60,6 @@ FROM ( ) subq_23 ) subq_25 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql index 460a9a1f96..14e7619fbc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql @@ -8,47 +8,47 @@ sql_engine: Databricks --- -- Re-aggregate Metric via Group By SELECT - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 FROM ( -- Window Function for Metric Re-aggregation SELECT - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month , FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER ( PARTITION BY - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month ORDER BY subq_11.metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions SELECT - subq_10.booking__ds__month + subq_10.metric_time__day , subq_10.metric_time__week - , subq_10.metric_time__day + , subq_10.booking__ds__month , COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - subq_9.booking__ds__month AS booking__ds__month + subq_9.metric_time__day AS metric_time__day , subq_9.metric_time__week AS metric_time__week - , subq_9.metric_time__day AS metric_time__day + , subq_9.booking__ds__month AS booking__ds__month , subq_6.bookers AS bookers FROM ( -- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day'] SELECT - subq_8.booking__ds__month + subq_8.metric_time__day , subq_8.metric_time__week - , subq_8.metric_time__day + , subq_8.booking__ds__month FROM ( -- Change Column Aliases SELECT - subq_7.ds__month AS booking__ds__month + subq_7.ds__day AS metric_time__day , subq_7.ds__week AS metric_time__week - , subq_7.ds__day AS metric_time__day + , subq_7.ds__month AS booking__ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -414,6 +414,6 @@ FROM ( ) subq_11 ) subq_12 GROUP BY - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql index 9a4804c24e..8727e7d31c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -8,28 +8,28 @@ sql_engine: Databricks --- -- Re-aggregate Metric via Group By SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions -- Window Function for Metric Re-aggregation SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , FIRST_VALUE(COALESCE(bookers, 0)) OVER ( PARTITION BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month ORDER BY metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month + time_spine_src_28006.ds AS metric_time__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week - , time_spine_src_28006.ds AS metric_time__day + , DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month , subq_19.bookers AS bookers FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ( @@ -60,6 +60,6 @@ FROM ( ) subq_23 ) subq_25 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql index 148fc930cb..37bd232b10 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql @@ -8,47 +8,47 @@ sql_engine: Postgres --- -- Re-aggregate Metric via Group By SELECT - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 FROM ( -- Window Function for Metric Re-aggregation SELECT - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month , FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER ( PARTITION BY - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month ORDER BY subq_11.metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions SELECT - subq_10.booking__ds__month + subq_10.metric_time__day , subq_10.metric_time__week - , subq_10.metric_time__day + , subq_10.booking__ds__month , COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - subq_9.booking__ds__month AS booking__ds__month + subq_9.metric_time__day AS metric_time__day , subq_9.metric_time__week AS metric_time__week - , subq_9.metric_time__day AS metric_time__day + , subq_9.booking__ds__month AS booking__ds__month , subq_6.bookers AS bookers FROM ( -- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day'] SELECT - subq_8.booking__ds__month + subq_8.metric_time__day , subq_8.metric_time__week - , subq_8.metric_time__day + , subq_8.booking__ds__month FROM ( -- Change Column Aliases SELECT - subq_7.ds__month AS booking__ds__month + subq_7.ds__day AS metric_time__day , subq_7.ds__week AS metric_time__week - , subq_7.ds__day AS metric_time__day + , subq_7.ds__month AS booking__ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -414,6 +414,6 @@ FROM ( ) subq_11 ) subq_12 GROUP BY - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql index 983a2828ca..cc60bb9014 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -8,28 +8,28 @@ sql_engine: Postgres --- -- Re-aggregate Metric via Group By SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions -- Window Function for Metric Re-aggregation SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , FIRST_VALUE(COALESCE(bookers, 0)) OVER ( PARTITION BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month ORDER BY metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month + time_spine_src_28006.ds AS metric_time__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week - , time_spine_src_28006.ds AS metric_time__day + , DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month , subq_19.bookers AS bookers FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ( @@ -60,6 +60,6 @@ FROM ( ) subq_23 ) subq_25 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql index b8b61ce77d..c55d61cf46 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql @@ -8,47 +8,47 @@ sql_engine: Redshift --- -- Re-aggregate Metric via Group By SELECT - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 FROM ( -- Window Function for Metric Re-aggregation SELECT - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month , FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER ( PARTITION BY - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month ORDER BY subq_11.metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions SELECT - subq_10.booking__ds__month + subq_10.metric_time__day , subq_10.metric_time__week - , subq_10.metric_time__day + , subq_10.booking__ds__month , COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - subq_9.booking__ds__month AS booking__ds__month + subq_9.metric_time__day AS metric_time__day , subq_9.metric_time__week AS metric_time__week - , subq_9.metric_time__day AS metric_time__day + , subq_9.booking__ds__month AS booking__ds__month , subq_6.bookers AS bookers FROM ( -- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day'] SELECT - subq_8.booking__ds__month + subq_8.metric_time__day , subq_8.metric_time__week - , subq_8.metric_time__day + , subq_8.booking__ds__month FROM ( -- Change Column Aliases SELECT - subq_7.ds__month AS booking__ds__month + subq_7.ds__day AS metric_time__day , subq_7.ds__week AS metric_time__week - , subq_7.ds__day AS metric_time__day + , subq_7.ds__month AS booking__ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -414,6 +414,6 @@ FROM ( ) subq_11 ) subq_12 GROUP BY - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql index 48882b6b0c..9ea0b17537 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -8,28 +8,28 @@ sql_engine: Redshift --- -- Re-aggregate Metric via Group By SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions -- Window Function for Metric Re-aggregation SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , FIRST_VALUE(COALESCE(bookers, 0)) OVER ( PARTITION BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month ORDER BY metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month + time_spine_src_28006.ds AS metric_time__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week - , time_spine_src_28006.ds AS metric_time__day + , DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month , subq_19.bookers AS bookers FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ( @@ -60,6 +60,6 @@ FROM ( ) subq_23 ) subq_25 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql index 9b5d199cb0..2160300141 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql @@ -8,47 +8,47 @@ sql_engine: Snowflake --- -- Re-aggregate Metric via Group By SELECT - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 FROM ( -- Window Function for Metric Re-aggregation SELECT - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month , FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER ( PARTITION BY - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month ORDER BY subq_11.metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions SELECT - subq_10.booking__ds__month + subq_10.metric_time__day , subq_10.metric_time__week - , subq_10.metric_time__day + , subq_10.booking__ds__month , COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - subq_9.booking__ds__month AS booking__ds__month + subq_9.metric_time__day AS metric_time__day , subq_9.metric_time__week AS metric_time__week - , subq_9.metric_time__day AS metric_time__day + , subq_9.booking__ds__month AS booking__ds__month , subq_6.bookers AS bookers FROM ( -- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day'] SELECT - subq_8.booking__ds__month + subq_8.metric_time__day , subq_8.metric_time__week - , subq_8.metric_time__day + , subq_8.booking__ds__month FROM ( -- Change Column Aliases SELECT - subq_7.ds__month AS booking__ds__month + subq_7.ds__day AS metric_time__day , subq_7.ds__week AS metric_time__week - , subq_7.ds__day AS metric_time__day + , subq_7.ds__month AS booking__ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -414,6 +414,6 @@ FROM ( ) subq_11 ) subq_12 GROUP BY - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql index 4a5e31a4fc..69ca59ef0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -8,28 +8,28 @@ sql_engine: Snowflake --- -- Re-aggregate Metric via Group By SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions -- Window Function for Metric Re-aggregation SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , FIRST_VALUE(COALESCE(bookers, 0)) OVER ( PARTITION BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month ORDER BY metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month + time_spine_src_28006.ds AS metric_time__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week - , time_spine_src_28006.ds AS metric_time__day + , DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month , subq_19.bookers AS bookers FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ( @@ -60,6 +60,6 @@ FROM ( ) subq_23 ) subq_25 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql index a895385e11..683266f1a4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql @@ -8,47 +8,47 @@ sql_engine: Trino --- -- Re-aggregate Metric via Group By SELECT - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 FROM ( -- Window Function for Metric Re-aggregation SELECT - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month , FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER ( PARTITION BY - subq_11.booking__ds__month - , subq_11.metric_time__week + subq_11.metric_time__week + , subq_11.booking__ds__month ORDER BY subq_11.metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions SELECT - subq_10.booking__ds__month + subq_10.metric_time__day , subq_10.metric_time__week - , subq_10.metric_time__day + , subq_10.booking__ds__month , COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - subq_9.booking__ds__month AS booking__ds__month + subq_9.metric_time__day AS metric_time__day , subq_9.metric_time__week AS metric_time__week - , subq_9.metric_time__day AS metric_time__day + , subq_9.booking__ds__month AS booking__ds__month , subq_6.bookers AS bookers FROM ( -- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day'] SELECT - subq_8.booking__ds__month + subq_8.metric_time__day , subq_8.metric_time__week - , subq_8.metric_time__day + , subq_8.booking__ds__month FROM ( -- Change Column Aliases SELECT - subq_7.ds__month AS booking__ds__month + subq_7.ds__day AS metric_time__day , subq_7.ds__week AS metric_time__week - , subq_7.ds__day AS metric_time__day + , subq_7.ds__month AS booking__ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -414,6 +414,6 @@ FROM ( ) subq_11 ) subq_12 GROUP BY - subq_12.booking__ds__month - , subq_12.metric_time__week + subq_12.metric_time__week + , subq_12.booking__ds__month , subq_12.every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql index 86b0938c51..82242858a4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -8,28 +8,28 @@ sql_engine: Trino --- -- Re-aggregate Metric via Group By SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 FROM ( -- Compute Metrics via Expressions -- Window Function for Metric Re-aggregation SELECT - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , FIRST_VALUE(COALESCE(bookers, 0)) OVER ( PARTITION BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month ORDER BY metric_time__day ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS every_two_days_bookers_fill_nulls_with_0 FROM ( -- Join to Time Spine Dataset SELECT - DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month + time_spine_src_28006.ds AS metric_time__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week - , time_spine_src_28006.ds AS metric_time__day + , DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month , subq_19.bookers AS bookers FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ( @@ -60,6 +60,6 @@ FROM ( ) subq_23 ) subq_25 GROUP BY - booking__ds__month - , metric_time__week + metric_time__week + , booking__ds__month , every_two_days_bookers_fill_nulls_with_0 diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index f5c717f0e4..1d00bd7796 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -18,8 +18,7 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_5.ds__martian_day AS metric_time__martian_day - , subq_5.ds__day AS metric_time__day + subq_5.ds__day AS metric_time__day , subq_5.ds__week , subq_5.ds__month , subq_5.ds__quarter @@ -30,6 +29,7 @@ FROM ( , subq_5.ds__extract_day , subq_5.ds__extract_dow , subq_5.ds__extract_doy + , subq_5.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql index 0cf0886a44..e56180a7be 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -29,12 +30,10 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.metric_time__martian_day - , subq_7.metric_time__day FROM ( -- Change Column Aliases SELECT - subq_6.ds__martian_day AS metric_time__martian_day - , subq_6.ds__day AS metric_time__day + subq_6.ds__day AS metric_time__day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 318501924a..b140eb6b2e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/BigQuery/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -28,13 +29,11 @@ FROM ( , subq_7.ds__extract_day , subq_7.ds__extract_dow , subq_7.ds__extract_doy - , subq_7.metric_time__day , subq_7.metric_time__martian_day FROM ( -- Change Column Aliases SELECT subq_6.ds__day AS metric_time__day - , subq_6.ds__martian_day AS metric_time__martian_day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 18a5d12a01..1114fa9224 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -18,8 +18,7 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_5.ds__martian_day AS metric_time__martian_day - , subq_5.ds__day AS metric_time__day + subq_5.ds__day AS metric_time__day , subq_5.ds__week , subq_5.ds__month , subq_5.ds__quarter @@ -30,6 +29,7 @@ FROM ( , subq_5.ds__extract_day , subq_5.ds__extract_dow , subq_5.ds__extract_doy + , subq_5.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql index 78e1b6c1ba..3e3de4ddbf 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -29,12 +30,10 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.metric_time__martian_day - , subq_7.metric_time__day FROM ( -- Change Column Aliases SELECT - subq_6.ds__martian_day AS metric_time__martian_day - , subq_6.ds__day AS metric_time__day + subq_6.ds__day AS metric_time__day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 62557cf252..00cf119558 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Databricks/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -28,13 +29,11 @@ FROM ( , subq_7.ds__extract_day , subq_7.ds__extract_dow , subq_7.ds__extract_doy - , subq_7.metric_time__day , subq_7.metric_time__martian_day FROM ( -- Change Column Aliases SELECT subq_6.ds__day AS metric_time__day - , subq_6.ds__martian_day AS metric_time__martian_day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 11c4ba0783..4803c1bd39 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -18,8 +18,7 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_5.ds__martian_day AS metric_time__martian_day - , subq_5.ds__day AS metric_time__day + subq_5.ds__day AS metric_time__day , subq_5.ds__week , subq_5.ds__month , subq_5.ds__quarter @@ -30,6 +29,7 @@ FROM ( , subq_5.ds__extract_day , subq_5.ds__extract_dow , subq_5.ds__extract_doy + , subq_5.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql index e2a23dff43..8db63e2710 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -29,12 +30,10 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.metric_time__martian_day - , subq_7.metric_time__day FROM ( -- Change Column Aliases SELECT - subq_6.ds__martian_day AS metric_time__martian_day - , subq_6.ds__day AS metric_time__day + subq_6.ds__day AS metric_time__day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index f07c9626f8..5b69d62c82 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Postgres/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -28,13 +29,11 @@ FROM ( , subq_7.ds__extract_day , subq_7.ds__extract_dow , subq_7.ds__extract_doy - , subq_7.metric_time__day , subq_7.metric_time__martian_day FROM ( -- Change Column Aliases SELECT subq_6.ds__day AS metric_time__day - , subq_6.ds__martian_day AS metric_time__martian_day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index b0493a7319..5b13dc4bf3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -18,8 +18,7 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_5.ds__martian_day AS metric_time__martian_day - , subq_5.ds__day AS metric_time__day + subq_5.ds__day AS metric_time__day , subq_5.ds__week , subq_5.ds__month , subq_5.ds__quarter @@ -30,6 +29,7 @@ FROM ( , subq_5.ds__extract_day , subq_5.ds__extract_dow , subq_5.ds__extract_doy + , subq_5.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql index 875524e29b..d671199e9f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -29,12 +30,10 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.metric_time__martian_day - , subq_7.metric_time__day FROM ( -- Change Column Aliases SELECT - subq_6.ds__martian_day AS metric_time__martian_day - , subq_6.ds__day AS metric_time__day + subq_6.ds__day AS metric_time__day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 57417cffb6..6da6fff672 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Redshift/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -28,13 +29,11 @@ FROM ( , subq_7.ds__extract_day , subq_7.ds__extract_dow , subq_7.ds__extract_doy - , subq_7.metric_time__day , subq_7.metric_time__martian_day FROM ( -- Change Column Aliases SELECT subq_6.ds__day AS metric_time__day - , subq_6.ds__martian_day AS metric_time__martian_day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 48f02fff02..6ae1938bf2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -18,8 +18,7 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_5.ds__martian_day AS metric_time__martian_day - , subq_5.ds__day AS metric_time__day + subq_5.ds__day AS metric_time__day , subq_5.ds__week , subq_5.ds__month , subq_5.ds__quarter @@ -30,6 +29,7 @@ FROM ( , subq_5.ds__extract_day , subq_5.ds__extract_dow , subq_5.ds__extract_doy + , subq_5.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql index 53a3efafdd..bf6615536d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -29,12 +30,10 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.metric_time__martian_day - , subq_7.metric_time__day FROM ( -- Change Column Aliases SELECT - subq_6.ds__martian_day AS metric_time__martian_day - , subq_6.ds__day AS metric_time__day + subq_6.ds__day AS metric_time__day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index e0b4097b29..fbfc517893 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Snowflake/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -28,13 +29,11 @@ FROM ( , subq_7.ds__extract_day , subq_7.ds__extract_dow , subq_7.ds__extract_doy - , subq_7.metric_time__day , subq_7.metric_time__martian_day FROM ( -- Change Column Aliases SELECT subq_6.ds__day AS metric_time__day - , subq_6.ds__martian_day AS metric_time__martian_day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 4a8496cf04..3697d16be1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -18,8 +18,7 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_5.ds__martian_day AS metric_time__martian_day - , subq_5.ds__day AS metric_time__day + subq_5.ds__day AS metric_time__day , subq_5.ds__week , subq_5.ds__month , subq_5.ds__quarter @@ -30,6 +29,7 @@ FROM ( , subq_5.ds__extract_day , subq_5.ds__extract_dow , subq_5.ds__extract_doy + , subq_5.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql index 25bd7b0afc..3567ba827e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -29,12 +30,10 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.metric_time__martian_day - , subq_7.metric_time__day FROM ( -- Change Column Aliases SELECT - subq_6.ds__martian_day AS metric_time__martian_day - , subq_6.ds__day AS metric_time__day + subq_6.ds__day AS metric_time__day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 0ded27ae77..f0d59bb8f1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlPlan/Trino/test_join_to_timespine_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -18,7 +18,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__week + subq_7.metric_time__day + , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year @@ -28,13 +29,11 @@ FROM ( , subq_7.ds__extract_day , subq_7.ds__extract_dow , subq_7.ds__extract_doy - , subq_7.metric_time__day , subq_7.metric_time__martian_day FROM ( -- Change Column Aliases SELECT subq_6.ds__day AS metric_time__day - , subq_6.ds__martian_day AS metric_time__martian_day , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter @@ -45,6 +44,7 @@ FROM ( , subq_6.ds__extract_day , subq_6.ds__extract_dow , subq_6.ds__extract_doy + , subq_6.ds__martian_day AS metric_time__martian_day FROM ( -- Read From Time Spine 'mf_time_spine' SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 6cd456a008..cb1f92e2ec 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -52,9 +52,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_2.ds__month AS metric_time__month - , subq_2.ds__day + subq_2.ds__day , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 6f74beb8aa..8d70034ab2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -352,9 +352,9 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__week , subq_7.ds__month + , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__year , subq_7.ds__extract_year , subq_7.ds__extract_quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 6386f07c5a..5312eb623c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -137,10 +137,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__year AS metric_time__year , subq_2.ds__week , subq_2.ds__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month @@ -496,10 +496,10 @@ FROM ( -- Change Column Aliases SELECT subq_11.ds__day AS metric_time__day - , subq_11.ds__year AS metric_time__year , subq_11.ds__week , subq_11.ds__month , subq_11.ds__quarter + , subq_11.ds__year AS metric_time__year , subq_11.ds__extract_year , subq_11.ds__extract_quarter , subq_11.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index a784c088fa..547de71995 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -234,8 +234,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 52142a1cb9..f1d4e684bd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -142,10 +142,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index fb697bd2a0..e4f9595506 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -240,8 +240,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql index 49e10bf041..b27620ee89 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql @@ -150,10 +150,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 633620fbbd..35f6953cab 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -52,9 +52,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_2.ds__month AS metric_time__month - , subq_2.ds__day + subq_2.ds__day , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 3a194c4c98..b6b50a8890 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -352,9 +352,9 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__week , subq_7.ds__month + , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__year , subq_7.ds__extract_year , subq_7.ds__extract_quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 7b6af2867f..0dbc5726f7 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -137,10 +137,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__year AS metric_time__year , subq_2.ds__week , subq_2.ds__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month @@ -496,10 +496,10 @@ FROM ( -- Change Column Aliases SELECT subq_11.ds__day AS metric_time__day - , subq_11.ds__year AS metric_time__year , subq_11.ds__week , subq_11.ds__month , subq_11.ds__quarter + , subq_11.ds__year AS metric_time__year , subq_11.ds__extract_year , subq_11.ds__extract_quarter , subq_11.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index a724cfc021..27975db1da 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -234,8 +234,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 45777e8389..de40e46184 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -142,10 +142,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 1cd9069be2..5d503c52de 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -240,8 +240,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql index 6134a9a518..b544d1c2e1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql @@ -150,10 +150,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 52652753fc..eac35b9c72 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -52,9 +52,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_2.ds__month AS metric_time__month - , subq_2.ds__day + subq_2.ds__day , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql index ed7b75c923..54e3dc332a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -352,9 +352,9 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__week , subq_7.ds__month + , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__year , subq_7.ds__extract_year , subq_7.ds__extract_quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index ae0f821ebd..676c004637 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -137,10 +137,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__year AS metric_time__year , subq_2.ds__week , subq_2.ds__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month @@ -496,10 +496,10 @@ FROM ( -- Change Column Aliases SELECT subq_11.ds__day AS metric_time__day - , subq_11.ds__year AS metric_time__year , subq_11.ds__week , subq_11.ds__month , subq_11.ds__quarter + , subq_11.ds__year AS metric_time__year , subq_11.ds__extract_year , subq_11.ds__extract_quarter , subq_11.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index de44b7a580..6dafa7824b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -234,8 +234,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 5f35ae002c..0085a34249 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -142,10 +142,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 5129d9082d..e90ee146a0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -240,8 +240,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql index 0eccdef2c0..c0c78b4cb8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql @@ -150,10 +150,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 57d9183e45..c3367ad326 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -52,9 +52,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_2.ds__month AS metric_time__month - , subq_2.ds__day + subq_2.ds__day , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 4f37b04e1f..8d6f2bf761 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -352,9 +352,9 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__week , subq_7.ds__month + , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__year , subq_7.ds__extract_year , subq_7.ds__extract_quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 976b311928..040cbc1451 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -137,10 +137,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__year AS metric_time__year , subq_2.ds__week , subq_2.ds__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month @@ -496,10 +496,10 @@ FROM ( -- Change Column Aliases SELECT subq_11.ds__day AS metric_time__day - , subq_11.ds__year AS metric_time__year , subq_11.ds__week , subq_11.ds__month , subq_11.ds__quarter + , subq_11.ds__year AS metric_time__year , subq_11.ds__extract_year , subq_11.ds__extract_quarter , subq_11.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index 05e34bda24..ad856e2b27 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -234,8 +234,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 664e828140..82a1353710 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -142,10 +142,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index d8a6659318..ea523a7236 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -240,8 +240,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql index b5fc46108d..397152b218 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql @@ -150,10 +150,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 6b4b0ccc6d..1ba9c65ad6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -52,9 +52,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_2.ds__month AS metric_time__month - , subq_2.ds__day + subq_2.ds__day , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 8970e9b9d5..1a4ff9a7df 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -352,9 +352,9 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__week , subq_7.ds__month + , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__year , subq_7.ds__extract_year , subq_7.ds__extract_quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 09ec10dc8f..154cac500f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -137,10 +137,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__year AS metric_time__year , subq_2.ds__week , subq_2.ds__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month @@ -496,10 +496,10 @@ FROM ( -- Change Column Aliases SELECT subq_11.ds__day AS metric_time__day - , subq_11.ds__year AS metric_time__year , subq_11.ds__week , subq_11.ds__month , subq_11.ds__quarter + , subq_11.ds__year AS metric_time__year , subq_11.ds__extract_year , subq_11.ds__extract_quarter , subq_11.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index 214a58d167..fd05f68e43 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -234,8 +234,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql index f842a708d4..f7dc3b25ee 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -142,10 +142,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index b2d078c006..c2ef593b24 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -240,8 +240,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql index 44b1df1c8e..a90cec7282 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql @@ -150,10 +150,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index baa085b5ac..bff81aba9c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -52,9 +52,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_2.ds__month AS metric_time__month - , subq_2.ds__day + subq_2.ds__day , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 99402f2d85..5358c9010c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -352,9 +352,9 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__week , subq_7.ds__month + , subq_7.ds__quarter AS metric_time__quarter , subq_7.ds__year , subq_7.ds__extract_year , subq_7.ds__extract_quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index bf94ae2594..9272a64b62 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -137,10 +137,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__year AS metric_time__year , subq_2.ds__week , subq_2.ds__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month @@ -496,10 +496,10 @@ FROM ( -- Change Column Aliases SELECT subq_11.ds__day AS metric_time__day - , subq_11.ds__year AS metric_time__year , subq_11.ds__week , subq_11.ds__month , subq_11.ds__quarter + , subq_11.ds__year AS metric_time__year , subq_11.ds__extract_year , subq_11.ds__extract_quarter , subq_11.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index 7fde19919b..3f7d78cbae 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -234,8 +234,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql index e535958381..0e7c229f9a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -142,10 +142,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index d68ba86524..a1567a6ec0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -240,8 +240,8 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter , subq_2.ds__year , subq_2.ds__extract_year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql index a578445a7f..6f451b8767 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql @@ -150,10 +150,10 @@ FROM ( -- Change Column Aliases SELECT subq_2.ds__day AS metric_time__day - , subq_2.ds__month AS metric_time__month - , subq_2.ds__year AS metric_time__year , subq_2.ds__week + , subq_2.ds__month AS metric_time__month , subq_2.ds__quarter + , subq_2.ds__year AS metric_time__year , subq_2.ds__extract_year , subq_2.ds__extract_quarter , subq_2.ds__extract_month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 96edca34db..3b4d330573 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.metric_time__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.metric_time__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS metric_time__month , subq_5.ds__week + , subq_5.ds__month AS metric_time__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index f400517cac..542d034781 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -18,7 +18,10 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.booking__ds__day + , subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,16 +31,13 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.booking__ds__day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS booking__ds__day , subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 6c870c0226..ec0cb9e0da 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index a1c206a72e..9795e3e3d3 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ts__week + subq_6.metric_time__hour + , subq_6.metric_time__day + , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter , subq_6.ts__year @@ -28,13 +30,11 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__day - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT - subq_5.ts__day AS metric_time__day - , subq_5.ts__hour AS metric_time__hour + subq_5.ts__hour AS metric_time__hour + , subq_5.ts__day AS metric_time__day , subq_5.ts__week , subq_5.ts__month , subq_5.ts__quarter diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 16b7b528f7..16dc5afafe 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -16,8 +16,8 @@ FROM ( -- Read From Time Spine 'mf_time_spine_hour' -- Change Column Aliases SELECT - DATETIME_TRUNC(ts, day) AS metric_time__day - , ts AS metric_time__hour + ts AS metric_time__hour + , DATETIME_TRUNC(ts, day) AS metric_time__day FROM ***************************.mf_time_spine_hour time_spine_src_28005 ) subq_16 WHERE (metric_time__hour > '2020-01-01 00:09:00') AND (metric_time__day = '2020-01-01') diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql index 27a3341e0a..b91456b9a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql @@ -23,7 +23,9 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_8.ds__month + subq_8.metric_time__day + , subq_8.metric_time__week + , subq_8.ds__month , subq_8.ds__quarter , subq_8.ds__year , subq_8.ds__extract_year @@ -33,12 +35,12 @@ FROM ( , subq_8.ds__extract_dow , subq_8.ds__extract_doy , subq_8.ds__martian_day - , subq_8.metric_time__day - , subq_8.metric_time__week FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__month + subq_7.metric_time__day + , subq_7.metric_time__week + , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -48,8 +50,6 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day - , subq_7.metric_time__day - , subq_7.metric_time__week FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql index a0292d4cea..aa0e75701e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql @@ -18,9 +18,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_4.ds__month AS metric_time__month - , subq_4.ds__day + subq_4.ds__day , subq_4.ds__week + , subq_4.ds__month AS metric_time__month , subq_4.ds__quarter , subq_4.ds__year , subq_4.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index d48cf9db24..e1af9aeb58 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.metric_time__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.metric_time__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS metric_time__month , subq_5.ds__week + , subq_5.ds__month AS metric_time__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index 86e9b8c9ce..3f0af2107b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -18,7 +18,10 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.booking__ds__day + , subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,16 +31,13 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.booking__ds__day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS booking__ds__day , subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index dd874f6c50..ce41018eee 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index ce82121f18..47f5cd58be 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ts__week + subq_6.metric_time__hour + , subq_6.metric_time__day + , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter , subq_6.ts__year @@ -28,13 +30,11 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__day - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT - subq_5.ts__day AS metric_time__day - , subq_5.ts__hour AS metric_time__hour + subq_5.ts__hour AS metric_time__hour + , subq_5.ts__day AS metric_time__day , subq_5.ts__week , subq_5.ts__month , subq_5.ts__quarter diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 70b215bba9..8f7b68b166 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -16,8 +16,8 @@ FROM ( -- Read From Time Spine 'mf_time_spine_hour' -- Change Column Aliases SELECT - DATE_TRUNC('day', ts) AS metric_time__day - , ts AS metric_time__hour + ts AS metric_time__hour + , DATE_TRUNC('day', ts) AS metric_time__day FROM ***************************.mf_time_spine_hour time_spine_src_28005 ) subq_16 WHERE (metric_time__hour > '2020-01-01 00:09:00') AND (metric_time__day = '2020-01-01') diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql index d1c4005409..da884c4046 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql @@ -23,7 +23,9 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_8.ds__month + subq_8.metric_time__day + , subq_8.metric_time__week + , subq_8.ds__month , subq_8.ds__quarter , subq_8.ds__year , subq_8.ds__extract_year @@ -33,12 +35,12 @@ FROM ( , subq_8.ds__extract_dow , subq_8.ds__extract_doy , subq_8.ds__martian_day - , subq_8.metric_time__day - , subq_8.metric_time__week FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__month + subq_7.metric_time__day + , subq_7.metric_time__week + , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -48,8 +50,6 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day - , subq_7.metric_time__day - , subq_7.metric_time__week FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql index b733b1e1e7..8170944d86 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql @@ -18,9 +18,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_4.ds__month AS metric_time__month - , subq_4.ds__day + subq_4.ds__day , subq_4.ds__week + , subq_4.ds__month AS metric_time__month , subq_4.ds__quarter , subq_4.ds__year , subq_4.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 613ff9b9f7..25971a0351 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.metric_time__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.metric_time__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS metric_time__month , subq_5.ds__week + , subq_5.ds__month AS metric_time__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index a436bd0273..cb94b85045 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -18,7 +18,10 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.booking__ds__day + , subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,16 +31,13 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.booking__ds__day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS booking__ds__day , subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index caaba9e357..024bfed62d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 83cc067fbb..f2f9ee17dc 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ts__week + subq_6.metric_time__hour + , subq_6.metric_time__day + , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter , subq_6.ts__year @@ -28,13 +30,11 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__day - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT - subq_5.ts__day AS metric_time__day - , subq_5.ts__hour AS metric_time__hour + subq_5.ts__hour AS metric_time__hour + , subq_5.ts__day AS metric_time__day , subq_5.ts__week , subq_5.ts__month , subq_5.ts__quarter diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index e77eda9809..fe97d6ccc3 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -16,8 +16,8 @@ FROM ( -- Read From Time Spine 'mf_time_spine_hour' -- Change Column Aliases SELECT - DATE_TRUNC('day', ts) AS metric_time__day - , ts AS metric_time__hour + ts AS metric_time__hour + , DATE_TRUNC('day', ts) AS metric_time__day FROM ***************************.mf_time_spine_hour time_spine_src_28005 ) subq_16 WHERE (metric_time__hour > '2020-01-01 00:09:00') AND (metric_time__day = '2020-01-01') diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql index 1d71a3fa39..a012a4779e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql @@ -23,7 +23,9 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_8.ds__month + subq_8.metric_time__day + , subq_8.metric_time__week + , subq_8.ds__month , subq_8.ds__quarter , subq_8.ds__year , subq_8.ds__extract_year @@ -33,12 +35,12 @@ FROM ( , subq_8.ds__extract_dow , subq_8.ds__extract_doy , subq_8.ds__martian_day - , subq_8.metric_time__day - , subq_8.metric_time__week FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__month + subq_7.metric_time__day + , subq_7.metric_time__week + , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -48,8 +50,6 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day - , subq_7.metric_time__day - , subq_7.metric_time__week FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql index 1395a904cc..8e5e82a756 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql @@ -18,9 +18,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_4.ds__month AS metric_time__month - , subq_4.ds__day + subq_4.ds__day , subq_4.ds__week + , subq_4.ds__month AS metric_time__month , subq_4.ds__quarter , subq_4.ds__year , subq_4.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 05d55b4642..756c463784 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.metric_time__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.metric_time__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS metric_time__month , subq_5.ds__week + , subq_5.ds__month AS metric_time__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index 8a919d4840..3a0e305f72 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -18,7 +18,10 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.booking__ds__day + , subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,16 +31,13 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.booking__ds__day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS booking__ds__day , subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 570e63b540..d7944f7332 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 3e6568ab61..1b8edd8b69 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ts__week + subq_6.metric_time__hour + , subq_6.metric_time__day + , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter , subq_6.ts__year @@ -28,13 +30,11 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__day - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT - subq_5.ts__day AS metric_time__day - , subq_5.ts__hour AS metric_time__hour + subq_5.ts__hour AS metric_time__hour + , subq_5.ts__day AS metric_time__day , subq_5.ts__week , subq_5.ts__month , subq_5.ts__quarter diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 911deb7948..17f35d96bc 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -16,8 +16,8 @@ FROM ( -- Read From Time Spine 'mf_time_spine_hour' -- Change Column Aliases SELECT - DATE_TRUNC('day', ts) AS metric_time__day - , ts AS metric_time__hour + ts AS metric_time__hour + , DATE_TRUNC('day', ts) AS metric_time__day FROM ***************************.mf_time_spine_hour time_spine_src_28005 ) subq_16 WHERE (metric_time__hour > '2020-01-01 00:09:00') AND (metric_time__day = '2020-01-01') diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql index 960df99a07..6ff201115e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql @@ -23,7 +23,9 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_8.ds__month + subq_8.metric_time__day + , subq_8.metric_time__week + , subq_8.ds__month , subq_8.ds__quarter , subq_8.ds__year , subq_8.ds__extract_year @@ -33,12 +35,12 @@ FROM ( , subq_8.ds__extract_dow , subq_8.ds__extract_doy , subq_8.ds__martian_day - , subq_8.metric_time__day - , subq_8.metric_time__week FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__month + subq_7.metric_time__day + , subq_7.metric_time__week + , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -48,8 +50,6 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day - , subq_7.metric_time__day - , subq_7.metric_time__week FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql index bf636fce3c..bfc6f4027f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql @@ -18,9 +18,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_4.ds__month AS metric_time__month - , subq_4.ds__day + subq_4.ds__day , subq_4.ds__week + , subq_4.ds__month AS metric_time__month , subq_4.ds__quarter , subq_4.ds__year , subq_4.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 6a1816a439..aa655a7880 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.metric_time__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.metric_time__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS metric_time__month , subq_5.ds__week + , subq_5.ds__month AS metric_time__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index f565ab4493..02ae18658b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -18,7 +18,10 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.booking__ds__day + , subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,16 +31,13 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.booking__ds__day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS booking__ds__day , subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 67b0945186..e769c3f01c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index ccde941e08..a119263e21 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ts__week + subq_6.metric_time__hour + , subq_6.metric_time__day + , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter , subq_6.ts__year @@ -28,13 +30,11 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__day - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT - subq_5.ts__day AS metric_time__day - , subq_5.ts__hour AS metric_time__hour + subq_5.ts__hour AS metric_time__hour + , subq_5.ts__day AS metric_time__day , subq_5.ts__week , subq_5.ts__month , subq_5.ts__quarter diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index e9e63dd182..8b3acbd417 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -16,8 +16,8 @@ FROM ( -- Read From Time Spine 'mf_time_spine_hour' -- Change Column Aliases SELECT - DATE_TRUNC('day', ts) AS metric_time__day - , ts AS metric_time__hour + ts AS metric_time__hour + , DATE_TRUNC('day', ts) AS metric_time__day FROM ***************************.mf_time_spine_hour time_spine_src_28005 ) subq_16 WHERE (metric_time__hour > '2020-01-01 00:09:00') AND (metric_time__day = '2020-01-01') diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql index ccb0af5b45..007fc30da5 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql @@ -23,7 +23,9 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_8.ds__month + subq_8.metric_time__day + , subq_8.metric_time__week + , subq_8.ds__month , subq_8.ds__quarter , subq_8.ds__year , subq_8.ds__extract_year @@ -33,12 +35,12 @@ FROM ( , subq_8.ds__extract_dow , subq_8.ds__extract_doy , subq_8.ds__martian_day - , subq_8.metric_time__day - , subq_8.metric_time__week FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__month + subq_7.metric_time__day + , subq_7.metric_time__week + , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -48,8 +50,6 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day - , subq_7.metric_time__day - , subq_7.metric_time__week FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql index f3f30f32cd..0aabe553b7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql @@ -18,9 +18,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_4.ds__month AS metric_time__month - , subq_4.ds__day + subq_4.ds__day , subq_4.ds__week + , subq_4.ds__month AS metric_time__month , subq_4.ds__quarter , subq_4.ds__year , subq_4.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 6275f67b93..63cbb01169 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.metric_time__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.metric_time__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS metric_time__month , subq_5.ds__week + , subq_5.ds__month AS metric_time__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index 29385ce13a..5ce2d0995e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -18,7 +18,10 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.booking__ds__day + , subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,16 +31,13 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.booking__ds__day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS booking__ds__day , subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index a24e70996b..444b052eac 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week + , subq_6.booking__ds__month , subq_6.ds__quarter , subq_6.ds__year , subq_6.ds__extract_year @@ -28,14 +30,12 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day - , subq_6.booking__ds__month FROM ( -- Change Column Aliases SELECT subq_5.ds__day AS metric_time__day - , subq_5.ds__month AS booking__ds__month , subq_5.ds__week + , subq_5.ds__month AS booking__ds__month , subq_5.ds__quarter , subq_5.ds__year , subq_5.ds__extract_year diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 3d3988cf90..2fe7f58dad 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -18,7 +18,9 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ts__week + subq_6.metric_time__hour + , subq_6.metric_time__day + , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter , subq_6.ts__year @@ -28,13 +30,11 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__day - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT - subq_5.ts__day AS metric_time__day - , subq_5.ts__hour AS metric_time__hour + subq_5.ts__hour AS metric_time__hour + , subq_5.ts__day AS metric_time__day , subq_5.ts__week , subq_5.ts__month , subq_5.ts__quarter diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 9225ef5cfc..f848896c2d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -16,8 +16,8 @@ FROM ( -- Read From Time Spine 'mf_time_spine_hour' -- Change Column Aliases SELECT - DATE_TRUNC('day', ts) AS metric_time__day - , ts AS metric_time__hour + ts AS metric_time__hour + , DATE_TRUNC('day', ts) AS metric_time__day FROM ***************************.mf_time_spine_hour time_spine_src_28005 ) subq_16 WHERE (metric_time__hour > '2020-01-01 00:09:00') AND (metric_time__day = '2020-01-01') diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql index 9f9e4912a2..395a3dceeb 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql @@ -23,7 +23,9 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_8.ds__month + subq_8.metric_time__day + , subq_8.metric_time__week + , subq_8.ds__month , subq_8.ds__quarter , subq_8.ds__year , subq_8.ds__extract_year @@ -33,12 +35,12 @@ FROM ( , subq_8.ds__extract_dow , subq_8.ds__extract_doy , subq_8.ds__martian_day - , subq_8.metric_time__day - , subq_8.metric_time__week FROM ( -- Constrain Output with WHERE SELECT - subq_7.ds__month + subq_7.metric_time__day + , subq_7.metric_time__week + , subq_7.ds__month , subq_7.ds__quarter , subq_7.ds__year , subq_7.ds__extract_year @@ -48,8 +50,6 @@ FROM ( , subq_7.ds__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day - , subq_7.metric_time__day - , subq_7.metric_time__week FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql index 380273fae3..7fb571d0a2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql @@ -18,9 +18,9 @@ FROM ( FROM ( -- Change Column Aliases SELECT - subq_4.ds__month AS metric_time__month - , subq_4.ds__day + subq_4.ds__day , subq_4.ds__week + , subq_4.ds__month AS metric_time__month , subq_4.ds__quarter , subq_4.ds__year , subq_4.ds__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_offset_window_with_date_part__plan0.sql index 9ac345a079..7d7f9f9d3a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_offset_window_with_date_part__plan0.sql @@ -352,7 +352,6 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter @@ -361,6 +360,7 @@ FROM ( , subq_7.ds__extract_quarter , subq_7.ds__extract_month , subq_7.ds__extract_day + , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day FROM ( diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql index bc0e7ccf48..49ba7e7cd3 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql @@ -23,7 +23,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] SELECT - subq_6.ts__day + subq_6.metric_time__hour + , subq_6.ts__day , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter @@ -34,7 +35,6 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_offset_window_with_date_part__plan0.sql index 9995adafe8..aef44447d5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_offset_window_with_date_part__plan0.sql @@ -352,7 +352,6 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter @@ -361,6 +360,7 @@ FROM ( , subq_7.ds__extract_quarter , subq_7.ds__extract_month , subq_7.ds__extract_day + , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day FROM ( diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql index fcfed24283..b972426868 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql @@ -23,7 +23,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] SELECT - subq_6.ts__day + subq_6.metric_time__hour + , subq_6.ts__day , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter @@ -34,7 +35,6 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_offset_window_with_date_part__plan0.sql index 7d63ccb295..b407a2080e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_offset_window_with_date_part__plan0.sql @@ -352,7 +352,6 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter @@ -361,6 +360,7 @@ FROM ( , subq_7.ds__extract_quarter , subq_7.ds__extract_month , subq_7.ds__extract_day + , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day FROM ( diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql index 6f5bdbd17b..0b790fb63f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql @@ -23,7 +23,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] SELECT - subq_6.ts__day + subq_6.metric_time__hour + , subq_6.ts__day , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter @@ -34,7 +35,6 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_offset_window_with_date_part__plan0.sql index dfbc4c831f..f9bcd9dc66 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_offset_window_with_date_part__plan0.sql @@ -352,7 +352,6 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter @@ -361,6 +360,7 @@ FROM ( , subq_7.ds__extract_quarter , subq_7.ds__extract_month , subq_7.ds__extract_day + , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day FROM ( diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql index edee599bbf..bb2d3dc609 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql @@ -23,7 +23,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] SELECT - subq_6.ts__day + subq_6.metric_time__hour + , subq_6.ts__day , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter @@ -34,7 +35,6 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_offset_window_with_date_part__plan0.sql index a6882fb7e4..0433dd71e9 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_offset_window_with_date_part__plan0.sql @@ -352,7 +352,6 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter @@ -361,6 +360,7 @@ FROM ( , subq_7.ds__extract_quarter , subq_7.ds__extract_month , subq_7.ds__extract_day + , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day FROM ( diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql index 2c61e86422..5ea52552ed 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql @@ -23,7 +23,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] SELECT - subq_6.ts__day + subq_6.metric_time__hour + , subq_6.ts__day , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter @@ -34,7 +35,6 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_offset_window_with_date_part__plan0.sql index 76c944eca9..352fa3e2d2 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_offset_window_with_date_part__plan0.sql @@ -352,7 +352,6 @@ FROM ( -- Change Column Aliases SELECT subq_7.ds__day AS metric_time__day - , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__week , subq_7.ds__month , subq_7.ds__quarter @@ -361,6 +360,7 @@ FROM ( , subq_7.ds__extract_quarter , subq_7.ds__extract_month , subq_7.ds__extract_day + , subq_7.ds__extract_dow AS metric_time__extract_dow , subq_7.ds__extract_doy , subq_7.ds__martian_day FROM ( diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql index 7801dae2b0..727143509a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql @@ -23,7 +23,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] SELECT - subq_6.ts__day + subq_6.metric_time__hour + , subq_6.ts__day , subq_6.ts__week , subq_6.ts__month , subq_6.ts__quarter @@ -34,7 +35,6 @@ FROM ( , subq_6.ts__extract_day , subq_6.ts__extract_dow , subq_6.ts__extract_doy - , subq_6.metric_time__hour FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_derived_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_derived_metric_alias__query_output.txt index 5e91fda951..0a09b8e0b4 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_derived_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_derived_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_derived_metric_alias test_filename: test_query_output.py --- - bookings_alias metric_time__day ----------------- ------------------- - 132.78 2020-01-02T00:00:00 - 284.93 2019-12-18T00:00:00 - 360.5 2019-12-19T00:00:00 - 136.16 2020-01-01T00:00:00 - 47.56 2019-12-01T00:00:00 - 0 2020-01-03T00:00:00 - 0 2019-12-20T00:00:00 +metric_time__day booking_fees +------------------- -------------- +2020-01-02T00:00:00 132.78 +2019-12-18T00:00:00 284.93 +2019-12-19T00:00:00 360.5 +2020-01-01T00:00:00 136.16 +2019-12-01T00:00:00 47.56 +2020-01-03T00:00:00 0 +2019-12-20T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_metric_alias__query_output.txt index 1e41d90108..4aad7bd478 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/BigQuery/test_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_metric_alias test_filename: test_query_output.py --- - bookings_alias metric_time__day ----------------- ------------------- - 9 2020-01-02T00:00:00 - 10 2019-12-18T00:00:00 - 18 2019-12-19T00:00:00 - 5 2020-01-01T00:00:00 - 1 2019-12-01T00:00:00 - 1 2020-01-03T00:00:00 - 2 2019-12-20T00:00:00 +metric_time__day bookings +------------------- ---------- +2020-01-02T00:00:00 9 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2020-01-01T00:00:00 5 +2019-12-01T00:00:00 1 +2020-01-03T00:00:00 1 +2019-12-20T00:00:00 2 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_derived_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_derived_metric_alias__query_output.txt index 7fabaf3068..d0816681ce 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_derived_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_derived_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_derived_metric_alias test_filename: test_query_output.py --- - bookings_alias metric_time__day ----------------- ------------------- - 132.78 2020-01-02T00:00:00 - 360.5 2019-12-19T00:00:00 - 136.16 2020-01-01T00:00:00 - 0 2020-01-03T00:00:00 - 284.93 2019-12-18T00:00:00 - 0 2019-12-20T00:00:00 - 47.56 2019-12-01T00:00:00 +metric_time__day booking_fees +------------------- -------------- +2020-01-02T00:00:00 132.78 +2019-12-19T00:00:00 360.5 +2020-01-01T00:00:00 136.16 +2020-01-03T00:00:00 0 +2019-12-18T00:00:00 284.93 +2019-12-20T00:00:00 0 +2019-12-01T00:00:00 47.56 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_metric_alias__query_output.txt index 7c39c4ec9c..65405cacab 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/Databricks/test_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_metric_alias test_filename: test_query_output.py --- - bookings_alias metric_time__day ----------------- ------------------- - 9 2020-01-02T00:00:00 - 18 2019-12-19T00:00:00 - 5 2020-01-01T00:00:00 - 1 2020-01-03T00:00:00 - 10 2019-12-18T00:00:00 - 2 2019-12-20T00:00:00 - 1 2019-12-01T00:00:00 +metric_time__day bookings +------------------- ---------- +2020-01-02T00:00:00 9 +2019-12-19T00:00:00 18 +2020-01-01T00:00:00 5 +2020-01-03T00:00:00 1 +2019-12-18T00:00:00 10 +2019-12-20T00:00:00 2 +2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_derived_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_derived_metric_alias__query_output.txt index cd26599005..333f361281 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_derived_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_derived_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_derived_metric_alias test_filename: test_query_output.py --- - bookings_alias metric_time__day ----------------- ------------------- - 0 2019-12-20T00:00:00 - 136.16 2020-01-01T00:00:00 - 132.78 2020-01-02T00:00:00 - 47.56 2019-12-01T00:00:00 - 284.93 2019-12-18T00:00:00 - 360.5 2019-12-19T00:00:00 - 0 2020-01-03T00:00:00 +metric_time__day booking_fees +------------------- -------------- +2019-12-01T00:00:00 47.56 +2019-12-18T00:00:00 284.93 +2019-12-19T00:00:00 360.5 +2020-01-03T00:00:00 0 +2019-12-20T00:00:00 0 +2020-01-01T00:00:00 136.16 +2020-01-02T00:00:00 132.78 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_metric_alias__query_output.txt index 454acbabaa..350572acef 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/Redshift/test_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_metric_alias test_filename: test_query_output.py --- - bookings_alias metric_time__day ----------------- ------------------- - 1 2019-12-01T00:00:00 - 10 2019-12-18T00:00:00 - 18 2019-12-19T00:00:00 - 1 2020-01-03T00:00:00 - 2 2019-12-20T00:00:00 - 5 2020-01-01T00:00:00 - 9 2020-01-02T00:00:00 +metric_time__day bookings +------------------- ---------- +2019-12-20T00:00:00 2 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2019-12-01T00:00:00 1 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2020-01-03T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_derived_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_derived_metric_alias__query_output.txt index ef3b91fe3b..bb6c2cb289 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_derived_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_derived_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_derived_metric_alias test_filename: test_query_output.py --- - BOOKINGS_ALIAS METRIC_TIME__DAY ----------------- ------------------- - 47.56 2019-12-01T00:00:00 - 284.93 2019-12-18T00:00:00 - 360.5 2019-12-19T00:00:00 - 0 2019-12-20T00:00:00 - 136.16 2020-01-01T00:00:00 - 132.78 2020-01-02T00:00:00 - 0 2020-01-03T00:00:00 +METRIC_TIME__DAY BOOKING_FEES +------------------- -------------- +2019-12-01T00:00:00 47.56 +2019-12-18T00:00:00 284.93 +2019-12-19T00:00:00 360.5 +2019-12-20T00:00:00 0 +2020-01-01T00:00:00 136.16 +2020-01-02T00:00:00 132.78 +2020-01-03T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_metric_alias__query_output.txt b/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_metric_alias__query_output.txt index a3aacf2896..ddfe4bf190 100644 --- a/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_metric_alias__query_output.txt +++ b/tests_metricflow/snapshots/test_query_output.py/str/Snowflake/test_metric_alias__query_output.txt @@ -1,12 +1,12 @@ test_name: test_metric_alias test_filename: test_query_output.py --- - BOOKINGS_ALIAS METRIC_TIME__DAY ----------------- ------------------- - 1 2019-12-01T00:00:00 - 10 2019-12-18T00:00:00 - 18 2019-12-19T00:00:00 - 2 2019-12-20T00:00:00 - 5 2020-01-01T00:00:00 - 1 2020-01-03T00:00:00 - 9 2020-01-02T00:00:00 +METRIC_TIME__DAY BOOKINGS +------------------- ---------- +2019-12-01T00:00:00 1 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2020-01-01T00:00:00 5 +2020-01-03T00:00:00 1 +2020-01-02T00:00:00 9 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0.sql index 6842752ea0..84f2b58405 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: BigQuery --- -- Change Column Aliases SELECT - subq_15.booking_fees AS bookings_alias - , subq_15.metric_time__day + subq_15.metric_time__day + , subq_15.booking_fees FROM ( -- Order By ['booking_fees'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0_optimized.sql index 693f36a360..2f7cd7ab16 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_derived_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - booking_fees AS bookings_alias - , metric_time__day AS metric_time__day + metric_time__day AS metric_time__day + , booking_fees AS booking_fees FROM ( -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0.sql index 7b01e4d9b2..6eb9930f2b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: BigQuery --- -- Change Column Aliases SELECT - subq_13.bookings AS bookings_alias - , subq_13.metric_time__month + subq_13.metric_time__month + , subq_13.bookings FROM ( -- Order By ['bookings'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0_optimized.sql index c45213e13d..0bd607a9c0 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/BigQuery/test_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - bookings AS bookings_alias - , metric_time__month AS metric_time__month + metric_time__month AS metric_time__month + , bookings AS bookings FROM ( -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__month'] diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0.sql index 54bc94ce88..3c1019adf8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: Databricks --- -- Change Column Aliases SELECT - subq_15.booking_fees AS bookings_alias - , subq_15.metric_time__day + subq_15.metric_time__day + , subq_15.booking_fees FROM ( -- Order By ['booking_fees'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0_optimized.sql index 39764ecb05..3dc1c5fbfa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_derived_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - booking_fees AS bookings_alias - , metric_time__day AS metric_time__day + metric_time__day AS metric_time__day + , booking_fees AS booking_fees FROM ( -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0.sql index d83c4b9433..d2eb5dd75e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: Databricks --- -- Change Column Aliases SELECT - subq_13.bookings AS bookings_alias - , subq_13.metric_time__month + subq_13.metric_time__month + , subq_13.bookings FROM ( -- Order By ['bookings'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0_optimized.sql index b3eff18216..07d4b9c23d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Databricks/test_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - bookings AS bookings_alias - , metric_time__month AS metric_time__month + metric_time__month AS metric_time__month + , bookings AS bookings FROM ( -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__month'] diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0.sql index 562d6cd224..5b842868e8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: Redshift --- -- Change Column Aliases SELECT - subq_15.booking_fees AS bookings_alias - , subq_15.metric_time__day + subq_15.metric_time__day + , subq_15.booking_fees FROM ( -- Order By ['booking_fees'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0_optimized.sql index 7488e98448..c0d6fd11c5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_derived_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - booking_fees AS bookings_alias - , metric_time__day AS metric_time__day + metric_time__day AS metric_time__day + , booking_fees AS booking_fees FROM ( -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0.sql index 3b0ea796fc..ad819d0f73 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: Redshift --- -- Change Column Aliases SELECT - subq_13.bookings AS bookings_alias - , subq_13.metric_time__month + subq_13.metric_time__month + , subq_13.bookings FROM ( -- Order By ['bookings'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0_optimized.sql index 022e9997b0..c13e18f964 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Redshift/test_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - bookings AS bookings_alias - , metric_time__month AS metric_time__month + metric_time__month AS metric_time__month + , bookings AS bookings FROM ( -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__month'] diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0.sql index 5f6ac0c0fc..78c6305c8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: Snowflake --- -- Change Column Aliases SELECT - subq_15.booking_fees AS bookings_alias - , subq_15.metric_time__day + subq_15.metric_time__day + , subq_15.booking_fees FROM ( -- Order By ['booking_fees'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0_optimized.sql index 351f394fad..2c4927c3d6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_derived_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - booking_fees AS bookings_alias - , metric_time__day AS metric_time__day + metric_time__day AS metric_time__day + , booking_fees AS booking_fees FROM ( -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0.sql index 9ce26dbc76..4e9047b681 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0.sql @@ -6,8 +6,8 @@ sql_engine: Snowflake --- -- Change Column Aliases SELECT - subq_13.bookings AS bookings_alias - , subq_13.metric_time__month + subq_13.metric_time__month + , subq_13.bookings FROM ( -- Order By ['bookings'] SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0_optimized.sql index 39233ff666..03c0d856cc 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlPlan/Snowflake/test_metric_alias__plan0_optimized.sql @@ -17,8 +17,8 @@ WITH sma_28009_cte AS ( ) SELECT - bookings AS bookings_alias - , metric_time__month AS metric_time__month + metric_time__month AS metric_time__month + , bookings AS bookings FROM ( -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__month'] diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 1df5f45cc6..fd297867dc 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -24,7 +24,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -35,7 +36,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index 6a875e67f6..3c3020b5f9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -25,7 +25,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -36,7 +37,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 114757a39f..e65a6a29ef 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -24,7 +24,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -35,7 +36,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index 8a75fa0e60..d9315b72c6 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -25,7 +25,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -36,7 +37,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 920de60edb..62e01364f5 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -24,7 +24,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -35,7 +36,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index c54ea7faa8..6c442f9200 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -25,7 +25,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -36,7 +37,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 4cc8afbcc6..c9da5aaf9a 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -24,7 +24,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -35,7 +36,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index ea63630656..2c1fe1db14 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -25,7 +25,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -36,7 +37,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 7d5fda79f5..21054fd461 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -24,7 +24,8 @@ FROM ( FROM ( -- Constrain Output with WHERE SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -35,7 +36,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index e193fcfa02..3e137fb0b4 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -25,7 +25,8 @@ FROM ( FROM ( -- Constrain Time Range to [2020-01-03T00:00:00, 2020-01-05T00:00:00] SELECT - subq_6.ds__week + subq_6.metric_time__day + , subq_6.ds__week , subq_6.ds__month , subq_6.ds__quarter , subq_6.ds__year @@ -36,7 +37,6 @@ FROM ( , subq_6.ds__extract_dow , subq_6.ds__extract_doy , subq_6.ds__martian_day - , subq_6.metric_time__day FROM ( -- Change Column Aliases SELECT