From 7cee3f86543b0812f977c191f629e5624c753a28 Mon Sep 17 00:00:00 2001 From: Josh Wills Date: Thu, 11 Jul 2024 09:16:27 -0700 Subject: [PATCH] Fixes #412 by not requiring aliases for limit 0 clauses in dbt-duckdb --- dbt/adapters/duckdb/relation.py | 1 + tests/functional/adapter/test_empty.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/functional/adapter/test_empty.py diff --git a/dbt/adapters/duckdb/relation.py b/dbt/adapters/duckdb/relation.py index 01542316..6c902701 100644 --- a/dbt/adapters/duckdb/relation.py +++ b/dbt/adapters/duckdb/relation.py @@ -13,6 +13,7 @@ @dataclass(frozen=True, eq=False, repr=False) class DuckDBRelation(BaseRelation): + require_alias: bool = False external: Optional[str] = None @classmethod diff --git a/tests/functional/adapter/test_empty.py b/tests/functional/adapter/test_empty.py new file mode 100644 index 00000000..4e115606 --- /dev/null +++ b/tests/functional/adapter/test_empty.py @@ -0,0 +1,9 @@ +from dbt.tests.adapter.empty.test_empty import BaseTestEmpty, BaseTestEmptyInlineSourceRef + + +class TestDuckDBEmpty(BaseTestEmpty): + pass + + +class TestDuckDBEmptyInlineSourceRef(BaseTestEmptyInlineSourceRef): + pass