From 9321f9ba71f663752bc139d15ae48665d2940e75 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Tue, 27 Aug 2024 19:30:15 -0700 Subject: [PATCH] Update snapshots for expr change --- .../test_semi_additive_join_node__plan0.sql | 48 +++++++++---------- ...mi_additive_join_node__plan0_optimized.sql | 24 +++++----- ...dditive_join_node_with_grouping__plan0.sql | 48 +++++++++---------- ...in_node_with_grouping__plan0_optimized.sql | 24 +++++----- ...join_node_with_queried_group_by__plan0.sql | 48 +++++++++---------- ...with_queried_group_by__plan0_optimized.sql | 24 +++++----- 6 files changed, 108 insertions(+), 108 deletions(-) diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql index 805106de66..48cbe70b30 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql @@ -60,12 +60,12 @@ FROM ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , accounts_source_src_28000.account_type , DATE_TRUNC('day', accounts_source_src_28000.ds) AS account__ds__day , DATE_TRUNC('week', accounts_source_src_28000.ds) AS account__ds__week @@ -78,12 +78,12 @@ FROM ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS account__ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , accounts_source_src_28000.account_type AS account__account_type , accounts_source_src_28000.user_id AS user , accounts_source_src_28000.user_id AS account__user @@ -111,12 +111,12 @@ INNER JOIN ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , accounts_source_src_28000.account_type , DATE_TRUNC('day', accounts_source_src_28000.ds) AS account__ds__day , DATE_TRUNC('week', accounts_source_src_28000.ds) AS account__ds__week @@ -129,12 +129,12 @@ INNER JOIN ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS account__ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , accounts_source_src_28000.account_type AS account__account_type , accounts_source_src_28000.user_id AS user , accounts_source_src_28000.user_id AS account__user diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql index 094aa95c1a..342fd6dbf5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql @@ -60,12 +60,12 @@ FROM ( , EXTRACT(day FROM ds) AS ds__extract_day , EXTRACT(isodow FROM ds) AS ds__extract_dow , EXTRACT(doy FROM ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , account_type , DATE_TRUNC('day', ds) AS account__ds__day , DATE_TRUNC('week', ds) AS account__ds__week @@ -78,12 +78,12 @@ FROM ( , EXTRACT(day FROM ds) AS account__ds__extract_day , EXTRACT(isodow FROM ds) AS account__ds__extract_dow , EXTRACT(doy FROM ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , account_type AS account__account_type , user_id AS user , user_id AS account__user diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql index c094a704f6..dd1ea08581 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql @@ -60,12 +60,12 @@ FROM ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , accounts_source_src_28000.account_type , DATE_TRUNC('day', accounts_source_src_28000.ds) AS account__ds__day , DATE_TRUNC('week', accounts_source_src_28000.ds) AS account__ds__week @@ -78,12 +78,12 @@ FROM ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS account__ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , accounts_source_src_28000.account_type AS account__account_type , accounts_source_src_28000.user_id AS user , accounts_source_src_28000.user_id AS account__user @@ -112,12 +112,12 @@ INNER JOIN ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , accounts_source_src_28000.account_type , DATE_TRUNC('day', accounts_source_src_28000.ds) AS account__ds__day , DATE_TRUNC('week', accounts_source_src_28000.ds) AS account__ds__week @@ -130,12 +130,12 @@ INNER JOIN ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS account__ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , accounts_source_src_28000.account_type AS account__account_type , accounts_source_src_28000.user_id AS user , accounts_source_src_28000.user_id AS account__user diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index 56e46a7184..776f847b9b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -60,12 +60,12 @@ FROM ( , EXTRACT(day FROM ds) AS ds__extract_day , EXTRACT(isodow FROM ds) AS ds__extract_dow , EXTRACT(doy FROM ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , account_type , DATE_TRUNC('day', ds) AS account__ds__day , DATE_TRUNC('week', ds) AS account__ds__week @@ -78,12 +78,12 @@ FROM ( , EXTRACT(day FROM ds) AS account__ds__extract_day , EXTRACT(isodow FROM ds) AS account__ds__extract_dow , EXTRACT(doy FROM ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , account_type AS account__account_type , user_id AS user , user_id AS account__user diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql index ee582853ce..0a73c96e05 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -60,12 +60,12 @@ FROM ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , accounts_source_src_28000.account_type , DATE_TRUNC('day', accounts_source_src_28000.ds) AS account__ds__day , DATE_TRUNC('week', accounts_source_src_28000.ds) AS account__ds__week @@ -78,12 +78,12 @@ FROM ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS account__ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , accounts_source_src_28000.account_type AS account__account_type , accounts_source_src_28000.user_id AS user , accounts_source_src_28000.user_id AS account__user @@ -112,12 +112,12 @@ INNER JOIN ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , accounts_source_src_28000.account_type , DATE_TRUNC('day', accounts_source_src_28000.ds) AS account__ds__day , DATE_TRUNC('week', accounts_source_src_28000.ds) AS account__ds__week @@ -130,12 +130,12 @@ INNER JOIN ( , EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day , EXTRACT(isodow FROM accounts_source_src_28000.ds) AS account__ds__extract_dow , EXTRACT(doy FROM accounts_source_src_28000.ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , accounts_source_src_28000.account_type AS account__account_type , accounts_source_src_28000.user_id AS user , accounts_source_src_28000.user_id AS account__user diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index 51c1b822b2..299780514c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -60,12 +60,12 @@ FROM ( , EXTRACT(day FROM ds) AS ds__extract_day , EXTRACT(isodow FROM ds) AS ds__extract_dow , EXTRACT(doy FROM ds) AS ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month , account_type , DATE_TRUNC('day', ds) AS account__ds__day , DATE_TRUNC('week', ds) AS account__ds__week @@ -78,12 +78,12 @@ FROM ( , EXTRACT(day FROM ds) AS account__ds__extract_day , EXTRACT(isodow FROM ds) AS account__ds__extract_dow , EXTRACT(doy FROM ds) AS account__ds__extract_doy - , DATE_TRUNC('month', DATE_TRUNC(ds, 'month')) AS account__ds_month__month - , DATE_TRUNC('quarter', DATE_TRUNC(ds, 'month')) AS account__ds_month__quarter - , DATE_TRUNC('year', DATE_TRUNC(ds, 'month')) AS account__ds_month__year - , EXTRACT(year FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_year - , EXTRACT(quarter FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_quarter - , EXTRACT(month FROM DATE_TRUNC(ds, 'month')) AS account__ds_month__extract_month + , DATE_TRUNC('month', DATE_TRUNC('month', ds)) AS account__ds_month__month + , DATE_TRUNC('quarter', DATE_TRUNC('month', ds)) AS account__ds_month__quarter + , DATE_TRUNC('year', DATE_TRUNC('month', ds)) AS account__ds_month__year + , EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year + , EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter + , EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month , account_type AS account__account_type , user_id AS user , user_id AS account__user