From e8cfa484bfd377c019cf3293d30e9af0705c3b01 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Wed, 18 Dec 2024 09:44:54 -0800 Subject: [PATCH] Update SQL engine snapshots for add time expr test Not totally relevant to this PR, but these seem to have been removed somehow. --- .../SqlPlan/BigQuery/test_add_time_expr__plan0.sql | 10 ++++++++++ .../SqlPlan/Databricks/test_add_time_expr__plan0.sql | 10 ++++++++++ .../SqlPlan/DuckDB/test_add_time_expr__plan0.sql | 10 ++++++++++ .../SqlPlan/Postgres/test_add_time_expr__plan0.sql | 10 ++++++++++ .../SqlPlan/Redshift/test_add_time_expr__plan0.sql | 10 ++++++++++ .../SqlPlan/Snowflake/test_add_time_expr__plan0.sql | 10 ++++++++++ .../SqlPlan/Trino/test_add_time_expr__plan0.sql | 10 ++++++++++ 7 files changed, 70 insertions(+) create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/BigQuery/test_add_time_expr__plan0.sql create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Databricks/test_add_time_expr__plan0.sql create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/DuckDB/test_add_time_expr__plan0.sql create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Postgres/test_add_time_expr__plan0.sql create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Redshift/test_add_time_expr__plan0.sql create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Snowflake/test_add_time_expr__plan0.sql create mode 100644 tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Trino/test_add_time_expr__plan0.sql diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/BigQuery/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/BigQuery/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..90fc09ace --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/BigQuery/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: BigQuery +--- +-- Test Add Time Expression +SELECT + DATE_ADD(CAST('2020-01-01' AS DATETIME), INTERVAL SqlExpressionRenderResult(sql='1', bind_parameter_set=SqlBindParameterSet(param_items=())) quarter) AS add_time +FROM foo.bar a diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Databricks/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Databricks/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..3f6f5e12d --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Databricks/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: Databricks +--- +-- Test Add Time Expression +SELECT + DATEADD(month, (1 * 3), '2020-01-01') AS add_time +FROM foo.bar a diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/DuckDB/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/DuckDB/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..984e2096f --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/DuckDB/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: DuckDB +--- +-- Test Add Time Expression +SELECT + '2020-01-01' + INTERVAL (1 * 3) month AS add_time +FROM foo.bar a diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Postgres/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Postgres/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..3bac32e01 --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Postgres/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: Postgres +--- +-- Test Add Time Expression +SELECT + '2020-01-01' + MAKE_INTERVAL(months => (1)) AS add_time +FROM foo.bar a diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Redshift/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Redshift/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..bac4dc733 --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Redshift/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: Redshift +--- +-- Test Add Time Expression +SELECT + DATEADD(month, (1 * 3), '2020-01-01') AS add_time +FROM foo.bar a diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Snowflake/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Snowflake/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..b83e17338 --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Snowflake/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: Snowflake +--- +-- Test Add Time Expression +SELECT + DATEADD(month, (1 * 3), '2020-01-01') AS add_time +FROM foo.bar a diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Trino/test_add_time_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Trino/test_add_time_expr__plan0.sql new file mode 100644 index 000000000..61e35c5e0 --- /dev/null +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlPlan/Trino/test_add_time_expr__plan0.sql @@ -0,0 +1,10 @@ +test_name: test_add_time_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the SqlAddTimeExpr in a query. +sql_engine: Trino +--- +-- Test Add Time Expression +SELECT + DATE_ADD('month', (1), '2020-01-01') AS add_time +FROM foo.bar a