From b2cae173ed09552845a61bf53c474247e5924a2c Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Tue, 16 Jul 2024 15:32:25 -0500 Subject: [PATCH] pull in new basclass and run test, and update local version of macro for add_column for column quoting --- dbt/include/spark/macros/adapters.sql | 2 +- dev-requirements.txt | 2 +- .../adapter/incremental/test_incremental_on_schema_change.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dbt/include/spark/macros/adapters.sql b/dbt/include/spark/macros/adapters.sql index a6404a2de..615f4156d 100644 --- a/dbt/include/spark/macros/adapters.sql +++ b/dbt/include/spark/macros/adapters.sql @@ -422,7 +422,7 @@ {% if add_columns %} add columns {% endif %} {% for column in add_columns %} - {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }} + {{ adapter.quote(column.name )}} {{ column.data_type }}{{ ',' if not loop.last }} {% endfor %} {%- endset -%} diff --git a/dev-requirements.txt b/dev-requirements.txt index f86fb5ef4..8d8ccd6ba 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,7 +2,7 @@ # 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@mcknight/ct-2819 git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter # dev diff --git a/tests/functional/adapter/incremental/test_incremental_on_schema_change.py b/tests/functional/adapter/incremental/test_incremental_on_schema_change.py index 478329668..7e210951d 100644 --- a/tests/functional/adapter/incremental/test_incremental_on_schema_change.py +++ b/tests/functional/adapter/incremental/test_incremental_on_schema_change.py @@ -4,6 +4,7 @@ from dbt.tests.adapter.incremental.test_incremental_on_schema_change import ( BaseIncrementalOnSchemaChangeSetup, + BaseIncrementalCaseSenstivityOnSchemaChange, ) @@ -80,3 +81,7 @@ def test_run_incremental_append_new_columns(self, project): def test_run_incremental_sync_all_columns(self, project): self.run_incremental_sync_all_columns(project) self.run_incremental_sync_remove_only(project) + + +class TestIncrementalCaseSenstivityOnSchemaChange(BaseIncrementalCaseSenstivityOnSchemaChange): + pass