From e19db7454d28e60bc4fd5e5c0c96af92823b9962 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Wed, 9 Oct 2024 20:59:38 -0700 Subject: [PATCH] fixup! Add SQL rendering tests --- ...join_to_time_spine_with_filter_not_in_group_by__plan0.sql | 1 - ...me_spine_with_filter_not_in_group_by__plan0_optimized.sql | 1 - ...o_time_spine_with_filter_smaller_than_group_by__plan0.sql | 5 +++-- ...ne_with_filter_smaller_than_group_by__plan0_optimized.sql | 5 +++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 06eba04405..e04c3d1288 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -11,7 +11,6 @@ FROM ( -- Filter Time Spine SELECT subq_8.metric_time__day - , subq_8.metric_time__month FROM ( -- Time Spine SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index bc8140409e..d18abb16dc 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -7,7 +7,6 @@ FROM ( -- Filter Time Spine SELECT metric_time__day - , metric_time__month FROM ( -- Time Spine SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 6b276de5d7..9c928c4dce 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -10,8 +10,7 @@ FROM ( FROM ( -- Filter Time Spine SELECT - subq_8.metric_time__hour - , subq_8.metric_time__day + subq_8.metric_time__day FROM ( -- Time Spine SELECT @@ -24,6 +23,8 @@ FROM ( ) AND ( metric_time__day = '2020-01-01' ) + GROUP BY + subq_8.metric_time__day ) subq_6 LEFT OUTER JOIN ( -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 1eb1a2b359..8e318e894d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -6,8 +6,7 @@ SELECT FROM ( -- Filter Time Spine SELECT - metric_time__hour - , metric_time__day + metric_time__day FROM ( -- Time Spine SELECT @@ -20,6 +19,8 @@ FROM ( ) AND ( metric_time__day = '2020-01-01' ) + GROUP BY + metric_time__day ) subq_16 LEFT OUTER JOIN ( -- Constrain Output with WHERE