Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Query Comment Tests #137

Merged
merged 4 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## Under the Hood

- [#64](https://github.com/dremio/dbt-dremio/issues/64) Add BaseArrayTests and throw exceptions for unsupported Array Macros.
- [#117](https://github.com/dremio/dbt-dremio/issues/117) Add support for Query Comment Tests and Python 3.11

## Dependency

Expand Down
2 changes: 1 addition & 1 deletion THIRD_PARTY_LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Name Version License
commonmark 0.9.1 BSD License
dbt-core 1.3.2 Apache Software License
dbt-extractor 0.4.1 Apache Software License
dbt-tests-adapter 1.3.2 Apache Software License
dbt-tests-adapter 1.4.1 Apache Software License
decorator 5.1.1 BSD License
distlib 0.3.6 Python Software Foundation License
docutils 0.19 BSD License; GNU General Public License (GPL); Public Domain; Python Software Foundation License
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/dremio/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version = "1.3.2"
version = "1.4.1"
8 changes: 5 additions & 3 deletions dbt/adapters/dremio/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from dataclasses import dataclass
from dataclasses import dataclass, field
from dbt.adapters.base.relation import (
BaseRelation,
Policy,
Expand All @@ -37,8 +37,10 @@ class DremioIncludePolicy(Policy):

@dataclass(frozen=True, eq=False, repr=False)
class DremioRelation(BaseRelation):
quote_policy: DremioQuotePolicy = DremioQuotePolicy()
include_policy: DremioIncludePolicy = DremioIncludePolicy()
quote_policy: DremioQuotePolicy = field(default_factory=lambda: DremioQuotePolicy())
include_policy: DremioIncludePolicy = field(
default_factory=lambda: DremioIncludePolicy()
)
no_schema = "no_schema"
format: Optional[str] = None
format_clause: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ agate==1.6.3
bandit
black==22.10.0
bumpversion
dbt-core==1.3.2
dbt-tests-adapter==1.3.2
dbt-core==1.4.1
dbt-tests-adapter==1.4.1
black==22.10.0
bumpversion
flake8
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from setuptools import find_namespace_packages, setup

package_name = "dbt-dremio"
package_version = "1.3.2"
package_version = "1.4.1"
description = """The Dremio adapter plugin for dbt"""

setup(
Expand All @@ -27,7 +27,7 @@
packages=find_namespace_packages(include=["dbt", "dbt.*"]),
include_package_data=True,
install_requires=[
"dbt-core>=1.2, <=1.3.2",
"dbt-core>=1.2, <=1.4.1",
],
classifiers=[
"License :: OSI Approved :: Apache Software License",
Expand Down
34 changes: 34 additions & 0 deletions tests/functional/adapter/query_comment/test_query_comment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import pytest
from dbt.tests.adapter.query_comment.test_query_comment import (
BaseQueryComments,
BaseMacroQueryComments,
BaseMacroArgsQueryComments,
BaseMacroInvalidQueryComments,
BaseNullQueryComments,
BaseEmptyQueryComments,
)
from tests.fixtures.profiles import unique_schema, dbt_profile_data


class TestQueryCommentsDremio(BaseQueryComments):
pass


class TestMacroQueryCommentsDremio(BaseMacroQueryComments):
pass


class TestMacroArgsQueryCommentsDremio(BaseMacroArgsQueryComments):
pass


class TestMacroInvalidQueryCommentsDremio(BaseMacroInvalidQueryComments):
pass


class TestNullQueryCommentsDremio(BaseNullQueryComments):
pass


class TestEmptyQueryCommentsDremio(BaseEmptyQueryComments):
pass