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 d34c8f316..b80296ef8 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 277353902..829c5b9c7 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 460a9a1f9..14e7619fb 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 9a4804c24..8727e7d31 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 148fc930c..37bd232b1 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 983a2828c..cc60bb901 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 b8b61ce77..c55d61cf4 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 48882b6b0..9ea0b1753 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 9b5d199cb..216030014 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 4a5e31a4f..69ca59ef0 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 a895385e1..683266f1a 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 86b0938c5..82242858a 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 f5c717f0e..1d00bd779 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 0cf0886a4..e56180a7b 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 318501924..b140eb6b2 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 18a5d12a0..1114fa922 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 78e1b6c1b..3e3de4ddb 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 62557cf25..00cf11955 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 11c4ba078..4803c1bd3 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 e2a23dff4..8db63e271 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 f07c9626f..5b69d62c8 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 b0493a731..5b13dc4bf 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 875524e29..d671199e9 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 57417cffb..6da6fff67 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 48f02fff0..6ae1938bf 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 53a3efafd..bf6615536 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 e0b4097b2..fbfc51789 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 4a8496cf0..3697d16be 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 25bd7b0af..3567ba827 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 0ded27ae7..f0d59bb8f 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 6cd456a00..cb1f92e2e 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 6f74beb8a..8d70034ab 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 6386f07c5..5312eb623 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 a784c088f..547de7199 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 52142a1cb..f1d4e684b 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 fb697bd2a..e4f959550 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 49e10bf04..b27620ee8 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 633620fbb..35f6953ca 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 3a194c4c9..b6b50a889 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 7b6af2867..0dbc5726f 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 a724cfc02..27975db1d 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 45777e838..de40e4618 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 1cd9069be..5d503c52d 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 6134a9a51..b544d1c2e 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 52652753f..eac35b9c7 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 ed7b75c92..54e3dc332 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 ae0f821eb..676c00463 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 de44b7a58..6dafa7824 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 5f35ae002..0085a3424 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 5129d9082..e90ee146a 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 0eccdef2c..c0c78b4cb 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 57d9183e4..c3367ad32 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 4f37b04e1..8d6f2bf76 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 976b31192..040cbc145 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 05e34bda2..ad856e2b2 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 664e82814..82a135371 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 d8a665931..ea523a723 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 b5fc46108..397152b21 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 6b4b0ccc6..1ba9c65ad 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 8970e9b9d..1a4ff9a7d 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 09ec10dc8..154cac500 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 214a58d16..fd05f68e4 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 f842a708d..f7dc3b25e 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 b2d078c00..c2ef593b2 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 44b1df1c8..a90cec728 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 baa085b5a..bff81aba9 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 99402f2d8..5358c9010 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 bf94ae259..9272a64b6 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 7fde19919..3f7d78cba 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 e53595838..0e7c229f9 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 d68ba8652..a1567a6ec 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 a578445a7..6f451b876 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 96edca34d..3b4d33057 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 f400517ca..542d03478 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 6c870c022..ec0cb9e0d 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 a1c206a72..9795e3e3d 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 16b7b528f..16dc5afaf 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 27a3341e0..b91456b9a 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 a0292d4ce..aa0e75701 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 d48cf9db2..e1af9aeb5 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 86e9b8c9c..3f0af2107 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 dd874f6c5..ce41018ee 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 ce82121f1..47f5cd58b 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 70b215bba..8f7b68b16 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 d1c400540..da884c404 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 b733b1e1e..8170944d8 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 613ff9b9f..25971a035 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 a436bd027..cb94b8504 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 caaba9e35..024bfed62 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 83cc067fb..f2f9ee17d 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 e77eda980..fe97d6ccc 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 1d71a3fa3..a012a4779 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 1395a904c..8e5e82a75 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 05d55b464..756c46378 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 8a919d484..3a0e305f7 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 570e63b54..d7944f733 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 3e6568ab6..1b8edd8b6 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 911deb794..17f35d96b 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 960df99a0..6ff201115 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 bf636fce3..bfc6f4027 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 6a1816a43..aa655a788 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 f565ab449..02ae18658 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 67b094518..e769c3f01 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 ccde941e0..a119263e2 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 e9e63dd18..8b3acbd41 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 ccb0af5b4..007fc30da 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 f3f30f32c..0aabe553b 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 6275f67b9..63cbb0116 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 29385ce13..5ce2d0995 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 a24e70996..444b052ea 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 3d3988cf9..2fe7f58da 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 9225ef5cf..f848896c2 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 9f9e4912a..395a3dcee 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 380273fae..7fb571d0a 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 9ac345a07..7d7f9f9d3 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 bc0e7ccf4..49ba7e7cd 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 9995adafe..aef44447d 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 fcfed2428..b97242686 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 7d63ccb29..b407a2080 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 6f5bdbd17..0b790fb63 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 dfbc4c831..f9bcd9dc6 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 edee599bb..bb2d3dc60 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 a6882fb7e..0433dd71e 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 2c61e8642..5ea52552e 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 76c944eca..352fa3e2d 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 7801dae2b..727143509 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 5e91fda95..0a09b8e0b 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 1e41d9010..4aad7bd47 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 7fabaf306..d0816681c 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 7c39c4ec9..65405caca 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 cd2659900..333f36128 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 454acbaba..350572ace 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 ef3b91fe3..bb6c2cb28 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 a3aacf289..ddfe4bf19 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 6842752ea..84f2b5840 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 693f36a36..2f7cd7ab1 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 7b01e4d9b..6eb9930f2 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 c45213e13..0bd607a9c 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 54bc94ce8..3c1019adf 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 39764ecb0..3dc1c5fbf 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 d83c4b943..d2eb5dd75 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 b3eff1821..07d4b9c23 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 562d6cd22..5b842868e 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 7488e9844..c0d6fd11c 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 3b0ea796f..ad819d0f7 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 022e9997b..c13e18f96 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 5f6ac0c0f..78c6305c8 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 351f394fa..2c4927c3d 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 9ce26dbc7..4e9047b68 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 39233ff66..03c0d856c 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 1df5f45cc..fd297867d 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 6a875e67f..3c3020b5f 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 114757a39..e65a6a29e 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 8a75fa0e6..d9315b72c 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 920de60ed..62e01364f 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 c54ea7faa..6c442f920 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 4cc8afbcc..c9da5aaf9 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 ea6363065..2c1fe1db1 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 7d5fda79f..21054fd46 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 e193fcfa0..3e137fb0b 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