diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index f2bd1bad0..0462e6897 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -413,7 +413,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 0ab8123cd..f9299a4fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -10,14 +10,14 @@ SELECT subq_12.martian_day AS user__bio_added_ts__martian_day , subq_11.martian_day AS metric_time__martian_day , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, month) AS user__bio_added_ts__month - , DATETIME_TRUNC(time_spine_src_28006.ds, day) AS metric_time__day + , time_spine_src_28006.ds AS metric_time__day FROM ***************************.dim_users users_ds_source_src_28000 CROSS JOIN ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_11 ON - DATETIME_TRUNC(time_spine_src_28006.ds, day) = subq_11.ds + time_spine_src_28006.ds = subq_11.ds LEFT OUTER JOIN ***************************.mf_time_spine subq_12 ON diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql index 059eed683..b1ef40cf6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index c79e24f13..d0ad89a1c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_4 ON - DATETIME_TRUNC(time_spine_src_28006.ds, day) = subq_4.ds + time_spine_src_28006.ds = subq_4.ds GROUP BY metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index da4f20ce6..ebd4ec9d5 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -413,7 +413,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 91a4d3a5c..5e6182ae6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -10,14 +10,14 @@ SELECT subq_12.martian_day AS user__bio_added_ts__martian_day , subq_11.martian_day AS metric_time__martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month - , DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + , time_spine_src_28006.ds AS metric_time__day FROM ***************************.dim_users users_ds_source_src_28000 CROSS JOIN ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_11 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds + time_spine_src_28006.ds = subq_11.ds LEFT OUTER JOIN ***************************.mf_time_spine subq_12 ON @@ -26,4 +26,4 @@ GROUP BY subq_12.martian_day , subq_11.martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) - , DATE_TRUNC('day', time_spine_src_28006.ds) + , time_spine_src_28006.ds diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql index 3afa45323..b058c8129 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index 510f4fce1..4b117f7c8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_4 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds + time_spine_src_28006.ds = subq_4.ds GROUP BY subq_4.martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 08fb093ca..0d67edcdf 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -413,7 +413,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f456f17c1..653f324f9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -10,14 +10,14 @@ SELECT subq_12.martian_day AS user__bio_added_ts__martian_day , subq_11.martian_day AS metric_time__martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month - , DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + , time_spine_src_28006.ds AS metric_time__day FROM ***************************.dim_users users_ds_source_src_28000 CROSS JOIN ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_11 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds + time_spine_src_28006.ds = subq_11.ds LEFT OUTER JOIN ***************************.mf_time_spine subq_12 ON @@ -26,4 +26,4 @@ GROUP BY subq_12.martian_day , subq_11.martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) - , DATE_TRUNC('day', time_spine_src_28006.ds) + , time_spine_src_28006.ds diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql index a4f123600..95ba609d9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index f881ddc13..380aa8983 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_4 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds + time_spine_src_28006.ds = subq_4.ds GROUP BY subq_4.martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index f0cd2b74f..1a4710aba 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -413,7 +413,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 4448310b1..1bc0258fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -10,14 +10,14 @@ SELECT subq_12.martian_day AS user__bio_added_ts__martian_day , subq_11.martian_day AS metric_time__martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month - , DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + , time_spine_src_28006.ds AS metric_time__day FROM ***************************.dim_users users_ds_source_src_28000 CROSS JOIN ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_11 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds + time_spine_src_28006.ds = subq_11.ds LEFT OUTER JOIN ***************************.mf_time_spine subq_12 ON @@ -26,4 +26,4 @@ GROUP BY subq_12.martian_day , subq_11.martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) - , DATE_TRUNC('day', time_spine_src_28006.ds) + , time_spine_src_28006.ds diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql index 12f9a80c4..22b6d8988 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index 302c60ffb..8fdfeeaff 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_4 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds + time_spine_src_28006.ds = subq_4.ds GROUP BY subq_4.martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 4cef56366..57bc6b120 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -413,7 +413,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 961e69d45..139e5479a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -10,14 +10,14 @@ SELECT subq_12.martian_day AS user__bio_added_ts__martian_day , subq_11.martian_day AS metric_time__martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month - , DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + , time_spine_src_28006.ds AS metric_time__day FROM ***************************.dim_users users_ds_source_src_28000 CROSS JOIN ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_11 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds + time_spine_src_28006.ds = subq_11.ds LEFT OUTER JOIN ***************************.mf_time_spine subq_12 ON @@ -26,4 +26,4 @@ GROUP BY subq_12.martian_day , subq_11.martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) - , DATE_TRUNC('day', time_spine_src_28006.ds) + , time_spine_src_28006.ds diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql index b823b8b6f..e06791c75 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index 407b07dfa..68d6d40cb 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_4 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds + time_spine_src_28006.ds = subq_4.ds GROUP BY subq_4.martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index a560f03bd..121db942f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -413,7 +413,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 3af119502..90640bb4d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -10,14 +10,14 @@ SELECT subq_12.martian_day AS user__bio_added_ts__martian_day , subq_11.martian_day AS metric_time__martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month - , DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + , time_spine_src_28006.ds AS metric_time__day FROM ***************************.dim_users users_ds_source_src_28000 CROSS JOIN ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_11 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds + time_spine_src_28006.ds = subq_11.ds LEFT OUTER JOIN ***************************.mf_time_spine subq_12 ON @@ -26,4 +26,4 @@ GROUP BY subq_12.martian_day , subq_11.martian_day , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) - , DATE_TRUNC('day', time_spine_src_28006.ds) + , time_spine_src_28006.ds diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql index ebf291021..fe81fe296 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index abe4c357b..9fee5399e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006 LEFT OUTER JOIN ***************************.mf_time_spine subq_4 ON - DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds + time_spine_src_28006.ds = subq_4.ds GROUP BY subq_4.martian_day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql index 526a223b4..f0e2100f1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql @@ -41,7 +41,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_millisecond' SELECT - DATETIME_TRUNC(time_spine_src_28002.ts, millisecond) AS ts__millisecond + time_spine_src_28002.ts AS ts__millisecond , DATETIME_TRUNC(time_spine_src_28002.ts, second) AS ts__second , DATETIME_TRUNC(time_spine_src_28002.ts, minute) AS ts__minute , DATETIME_TRUNC(time_spine_src_28002.ts, hour) AS ts__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql index 5afa70585..01adc93d6 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: BigQuery -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] SELECT - DATETIME_TRUNC(ts, millisecond) AS metric_time__millisecond + ts AS metric_time__millisecond FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 GROUP BY metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql index 76ab641df..d23120a10 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -70,7 +70,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_second' SELECT - DATETIME_TRUNC(time_spine_src_28003.ts, second) AS ts__second + time_spine_src_28003.ts AS ts__second , DATETIME_TRUNC(time_spine_src_28003.ts, minute) AS ts__minute , DATETIME_TRUNC(time_spine_src_28003.ts, hour) AS ts__hour , DATETIME_TRUNC(time_spine_src_28003.ts, day) AS ts__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index bb805e7bb..ce7057102 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -7,8 +7,8 @@ sql_engine: BigQuery -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] -- Pass Only Elements: ['metric_time__second',] SELECT - DATETIME_TRUNC(ts, second) AS metric_time__second + ts AS metric_time__second FROM ***************************.mf_time_spine_second time_spine_src_28003 -WHERE DATETIME_TRUNC(ts, second) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' +WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' GROUP BY metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql index 741feb683..72f044094 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql @@ -41,7 +41,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_millisecond' SELECT - DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + time_spine_src_28002.ts AS ts__millisecond , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql index c630b8c5d..c9967312a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Databricks -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] SELECT - DATE_TRUNC('millisecond', ts) AS metric_time__millisecond + ts AS metric_time__millisecond FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 GROUP BY - DATE_TRUNC('millisecond', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql index 072d4be07..fae663a8c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -70,7 +70,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_second' SELECT - DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second + time_spine_src_28003.ts AS ts__second , DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour , DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index c84265d19..dbfb173c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -7,8 +7,8 @@ sql_engine: Databricks -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] -- Pass Only Elements: ['metric_time__second',] SELECT - DATE_TRUNC('second', ts) AS metric_time__second + ts AS metric_time__second FROM ***************************.mf_time_spine_second time_spine_src_28003 -WHERE DATE_TRUNC('second', ts) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' +WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' GROUP BY - DATE_TRUNC('second', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql index 42256c457..7d548d677 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql @@ -41,7 +41,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_millisecond' SELECT - DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + time_spine_src_28002.ts AS ts__millisecond , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql index 3a7db9be7..1b241ced5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Postgres -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] SELECT - DATE_TRUNC('millisecond', ts) AS metric_time__millisecond + ts AS metric_time__millisecond FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 GROUP BY - DATE_TRUNC('millisecond', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql index c24d95610..e9c10cfcb 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -70,7 +70,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_second' SELECT - DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second + time_spine_src_28003.ts AS ts__second , DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour , DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index f7e83dfc4..dff63d8de 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -7,8 +7,8 @@ sql_engine: Postgres -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] -- Pass Only Elements: ['metric_time__second',] SELECT - DATE_TRUNC('second', ts) AS metric_time__second + ts AS metric_time__second FROM ***************************.mf_time_spine_second time_spine_src_28003 -WHERE DATE_TRUNC('second', ts) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' +WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' GROUP BY - DATE_TRUNC('second', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql index 70ee6f110..8d45cb78d 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql @@ -41,7 +41,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_millisecond' SELECT - DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + time_spine_src_28002.ts AS ts__millisecond , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql index 0390430b2..fb84f3325 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Redshift -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] SELECT - DATE_TRUNC('millisecond', ts) AS metric_time__millisecond + ts AS metric_time__millisecond FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 GROUP BY - DATE_TRUNC('millisecond', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql index 83e45cba5..60c9294d3 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -70,7 +70,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_second' SELECT - DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second + time_spine_src_28003.ts AS ts__second , DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour , DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index 8d5f22e9a..0ce2906c6 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -7,8 +7,8 @@ sql_engine: Redshift -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] -- Pass Only Elements: ['metric_time__second',] SELECT - DATE_TRUNC('second', ts) AS metric_time__second + ts AS metric_time__second FROM ***************************.mf_time_spine_second time_spine_src_28003 -WHERE DATE_TRUNC('second', ts) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' +WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' GROUP BY - DATE_TRUNC('second', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql index f04969898..a60843bb7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql @@ -41,7 +41,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_millisecond' SELECT - DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + time_spine_src_28002.ts AS ts__millisecond , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql index 4115c3557..9ea914683 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Snowflake -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] SELECT - DATE_TRUNC('millisecond', ts) AS metric_time__millisecond + ts AS metric_time__millisecond FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 GROUP BY - DATE_TRUNC('millisecond', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql index 6dae54466..01f30c25f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -70,7 +70,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_second' SELECT - DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second + time_spine_src_28003.ts AS ts__second , DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour , DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index ae3580bbd..d485ef703 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -7,8 +7,8 @@ sql_engine: Snowflake -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] -- Pass Only Elements: ['metric_time__second',] SELECT - DATE_TRUNC('second', ts) AS metric_time__second + ts AS metric_time__second FROM ***************************.mf_time_spine_second time_spine_src_28003 -WHERE DATE_TRUNC('second', ts) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' +WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08' GROUP BY - DATE_TRUNC('second', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql index 20b53144b..adccf749f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql @@ -41,7 +41,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_millisecond' SELECT - DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + time_spine_src_28002.ts AS ts__millisecond , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql index b246c4a22..01cc5609f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Trino -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] SELECT - DATE_TRUNC('millisecond', ts) AS metric_time__millisecond + ts AS metric_time__millisecond FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 GROUP BY - DATE_TRUNC('millisecond', ts) + ts diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql index 0ad00d294..7075b2156 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -70,7 +70,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine_second' SELECT - DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second + time_spine_src_28003.ts AS ts__second , DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute , DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour , DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index 6a8c7968f..0edc9ed91 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -7,8 +7,8 @@ sql_engine: Trino -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] -- Pass Only Elements: ['metric_time__second',] SELECT - DATE_TRUNC('second', ts) AS metric_time__second + ts AS metric_time__second FROM ***************************.mf_time_spine_second time_spine_src_28003 -WHERE DATE_TRUNC('second', ts) BETWEEN timestamp '2020-01-01 00:00:02' AND timestamp '2020-01-01 00:00:08' +WHERE ts BETWEEN timestamp '2020-01-01 00:00:02' AND timestamp '2020-01-01 00:00:08' GROUP BY - DATE_TRUNC('second', ts) + ts diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql index dd9c991ac..204fa0945 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql @@ -224,7 +224,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql index 6d88dc1f1..f6afbb3b9 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: BigQuery -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,7 +16,7 @@ FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATETIME_TRUNC(time_spine_src_28006.ds, day) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE time_spine_src_28006.ds BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY metric_time__day , listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql index 03f1e60d7..db2e1ba1e 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql index a28135efb..9c583cd36 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql @@ -8,7 +8,7 @@ sql_engine: BigQuery -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATETIME_TRUNC(ds, day) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql index 1e36bab5d..8f232846b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql @@ -35,7 +35,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql index d417da1fa..7763a36b2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql @@ -163,7 +163,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql index a812644fa..2087e24eb 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -5,7 +5,7 @@ sql_engine: BigQuery -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql index 13d7fa7ff..f67b139ba 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql @@ -224,7 +224,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql index 2cf42ce5d..6d943cc04 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Databricks -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,8 +16,8 @@ FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE time_spine_src_28006.ds BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql index 752986b2d..df27d3f1c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql index 233227bf1..561074791 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql @@ -8,7 +8,7 @@ sql_engine: Databricks -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql index 60cb8f349..88745af88 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql @@ -35,7 +35,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql index f3a1bdc2d..a8a94d849 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql @@ -163,7 +163,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql index 9adb12669..b2c876e43 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -5,7 +5,7 @@ sql_engine: Databricks -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,6 +16,6 @@ FULL OUTER JOIN ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql index 9a32af410..d2d6325ae 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql @@ -224,7 +224,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql index 3ab1c2cd7..421b597cb 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Postgres -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,8 +16,8 @@ FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE time_spine_src_28006.ds BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql index 9e6c0f439..5dac36939 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql index d30aeb8ce..ceee9d957 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql @@ -8,7 +8,7 @@ sql_engine: Postgres -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql index 02a2fbe20..34046690b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql @@ -35,7 +35,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql index 82e33f4b0..e79d804b4 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql @@ -163,7 +163,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql index 63d1ce8f6..248ec8ab1 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -5,7 +5,7 @@ sql_engine: Postgres -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,6 +16,6 @@ FULL OUTER JOIN ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql index 86ad34143..5ca4d4e68 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql @@ -224,7 +224,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql index f0c7b115c..c656e87b2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Redshift -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,8 +16,8 @@ FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE time_spine_src_28006.ds BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql index 9a16e4019..196f557ba 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql index 35ee89b9e..716a39e7b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql @@ -8,7 +8,7 @@ sql_engine: Redshift -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql index b6be7d7c0..fbdba485b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql @@ -35,7 +35,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql index 48588917e..6c1d35895 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql @@ -163,7 +163,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql index 449918ddd..096ee1c6c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -5,7 +5,7 @@ sql_engine: Redshift -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,6 +16,6 @@ FULL OUTER JOIN ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql index 4892a897b..b64d5e9eb 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql @@ -224,7 +224,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql index f61217729..4cba1e7f8 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Snowflake -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,8 +16,8 @@ FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE time_spine_src_28006.ds BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql index ff8ad8419..3f15fa642 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql index edff68d5e..0fb73d204 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql @@ -8,7 +8,7 @@ sql_engine: Snowflake -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql index d9ea85e51..13fa2c885 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql @@ -35,7 +35,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql index e6303f3ba..ef0c2368a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql @@ -163,7 +163,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql index 8cc860f7f..22ed9e9e6 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -5,7 +5,7 @@ sql_engine: Snowflake -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,6 +16,6 @@ FULL OUTER JOIN ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql index 1323d82a3..49e96f2dd 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql @@ -224,7 +224,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql index 63ccc44d0..682daba14 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -6,7 +6,7 @@ sql_engine: Trino -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,8 +16,8 @@ FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN timestamp '2020-01-01' AND timestamp '2020-01-03' +WHERE time_spine_src_28006.ds BETWEEN timestamp '2020-01-01' AND timestamp '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql index f93f9fda8..dcdcb6c78 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql @@ -37,7 +37,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql index 1a2575775..9df66baf6 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql @@ -8,7 +8,7 @@ sql_engine: Trino -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql index b17fa8e91..bbe069fe2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql @@ -35,7 +35,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql index 54cbee6aa..ab7805e1e 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql @@ -163,7 +163,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql index 43d59ec97..3a295e45c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -5,7 +5,7 @@ sql_engine: Trino -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day + time_spine_src_28006.ds AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 @@ -16,6 +16,6 @@ FULL OUTER JOIN ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28006.ds) + time_spine_src_28006.ds , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql index e63da94ce..c5a238d46 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql index f067853ff..880ab8b58 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql @@ -13,7 +13,7 @@ FROM ( -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATETIME_TRUNC(ds, day) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql index 0a3b4a087..99fb54f88 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + time_spine_src_28006.ds AS ds__day , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql index fbc7d58b0..68327fbec 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql index 8dd1eb2e9..ed8ed107b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql @@ -13,8 +13,8 @@ FROM ( -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql index f3b44dc14..7b4f92711 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql index 4bc028bcb..41e1db11d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql index 13f1bc8b9..e0c32113f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql @@ -13,8 +13,8 @@ FROM ( -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql index c6fef2e1e..6144d5b14 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql index 1e33d2184..f03cc14a7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql index 6563a305b..830a7f9a4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql @@ -13,8 +13,8 @@ FROM ( -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql index a17846030..709be0898 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql index 4d6e8b283..d4cebb1bf 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql index 70404201b..4eccdb3cf 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql @@ -13,8 +13,8 @@ FROM ( -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql index 09ba241b3..e14f87776 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql index 2492a9693..ee9846830 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql index 5e802093d..9d4a93b54 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql @@ -13,8 +13,8 @@ FROM ( -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] SELECT - DATE_TRUNC('day', ds) AS metric_time__day + ds AS metric_time__day FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY - DATE_TRUNC('day', ds) + ds ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql index 89e34683d..296bb6b2d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql @@ -42,7 +42,7 @@ FROM ( FROM ( -- Read From Time Spine 'mf_time_spine' SELECT - DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + time_spine_src_28006.ds AS ds__day , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter