From 57d0406250a0654e78c75ce7881dbcb349ed4dcd Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 25 Jun 2024 00:06:38 -0700 Subject: [PATCH 1/5] Add test for upstream change. --- dev-requirements.txt | 4 ++-- .../adapter/dbt_show/test_dbt_show.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tests/functional/adapter/dbt_show/test_dbt_show.py diff --git a/dev-requirements.txt b/dev-requirements.txt index f86fb5ef4..323cb82d3 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,8 +2,8 @@ # TODO: how to automate switching from develop to version branches? git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core git+https://github.com/dbt-labs/dbt-common.git -git+https://github.com/dbt-labs/dbt-adapters.git -git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter +git+https://github.com/dbt-labs/dbt-adapters.git@ADAP-207/get_show_sql_has_no_wrapping +git+https://github.com/dbt-labs/dbt-adapters.git@ADAP-207/get_show_sql_has_no_wrapping#subdirectory=dbt-tests-adapter # dev ipdb~=0.13.13 diff --git a/tests/functional/adapter/dbt_show/test_dbt_show.py b/tests/functional/adapter/dbt_show/test_dbt_show.py new file mode 100644 index 000000000..bed4cad8b --- /dev/null +++ b/tests/functional/adapter/dbt_show/test_dbt_show.py @@ -0,0 +1,17 @@ +from dbt.tests.adapter.dbt_show.test_dbt_show import ( + BaseShowSqlHeader, + BaseShowLimit, + BaseShowDoesNotHandleDoubleLimit, +) + + +class TestSparkShowLimit(BaseShowLimit): + pass + + +class TestSparkShowSqlHeader(BaseShowSqlHeader): + pass + + +class TestSparkShowDoesNotHandleDoubleLimit(BaseShowDoesNotHandleDoubleLimit): + pass From e8fdd95889158afa3324c0884d5e9f3c9702b954 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 25 Jun 2024 00:17:49 -0700 Subject: [PATCH 2/5] Skip session since it's not liking the test. --- tests/functional/adapter/dbt_show/test_dbt_show.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/adapter/dbt_show/test_dbt_show.py b/tests/functional/adapter/dbt_show/test_dbt_show.py index bed4cad8b..8a733ef6e 100644 --- a/tests/functional/adapter/dbt_show/test_dbt_show.py +++ b/tests/functional/adapter/dbt_show/test_dbt_show.py @@ -13,5 +13,6 @@ class TestSparkShowSqlHeader(BaseShowSqlHeader): pass +@pytest.mark.skip_profile("spark_session") class TestSparkShowDoesNotHandleDoubleLimit(BaseShowDoesNotHandleDoubleLimit): pass From 5aa02341f869ca36e91cc62ed5cbed6f15d9f116 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 25 Jun 2024 00:25:42 -0700 Subject: [PATCH 3/5] Import pytest to fix skip error. --- tests/functional/adapter/dbt_show/test_dbt_show.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/adapter/dbt_show/test_dbt_show.py b/tests/functional/adapter/dbt_show/test_dbt_show.py index 8a733ef6e..d6b93d639 100644 --- a/tests/functional/adapter/dbt_show/test_dbt_show.py +++ b/tests/functional/adapter/dbt_show/test_dbt_show.py @@ -1,3 +1,5 @@ +import pytest + from dbt.tests.adapter.dbt_show.test_dbt_show import ( BaseShowSqlHeader, BaseShowLimit, From 5d87a883aa49366cebe09797f958e852f9736d62 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 25 Jun 2024 00:46:34 -0700 Subject: [PATCH 4/5] Dial in tests to reflect error messages from spark. --- tests/functional/adapter/dbt_show/test_dbt_show.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/functional/adapter/dbt_show/test_dbt_show.py b/tests/functional/adapter/dbt_show/test_dbt_show.py index d6b93d639..bc56fd908 100644 --- a/tests/functional/adapter/dbt_show/test_dbt_show.py +++ b/tests/functional/adapter/dbt_show/test_dbt_show.py @@ -15,6 +15,8 @@ class TestSparkShowSqlHeader(BaseShowSqlHeader): pass -@pytest.mark.skip_profile("spark_session") +@pytest.mark.skip_profile("apache_spark", "spark_session", "databricks_http_cluster") class TestSparkShowDoesNotHandleDoubleLimit(BaseShowDoesNotHandleDoubleLimit): - pass + """The syntax message is quite variable across clusters, but this hits two at once.""" + + DATABASE_ERROR_MESSAGE = "limit" From 925cc3d511abc44635c14d8dd045c5d7e3ebc037 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 3 Jul 2024 13:51:19 -0400 Subject: [PATCH 5/5] point dev branches back to main --- dev-requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 323cb82d3..f86fb5ef4 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,8 +2,8 @@ # TODO: how to automate switching from develop to version branches? git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core git+https://github.com/dbt-labs/dbt-common.git -git+https://github.com/dbt-labs/dbt-adapters.git@ADAP-207/get_show_sql_has_no_wrapping -git+https://github.com/dbt-labs/dbt-adapters.git@ADAP-207/get_show_sql_has_no_wrapping#subdirectory=dbt-tests-adapter +git+https://github.com/dbt-labs/dbt-adapters.git +git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter # dev ipdb~=0.13.13