diff --git a/.changes/unreleased/Dependencies-20240507-142214.yaml b/.changes/unreleased/Dependencies-20240507-142214.yaml new file mode 100644 index 00000000..b7670936 --- /dev/null +++ b/.changes/unreleased/Dependencies-20240507-142214.yaml @@ -0,0 +1,7 @@ +kind: Dependencies +body: Updated dependencies and GH actions +time: 2024-05-07T14:22:14.050847+02:00 +custom: + Author: damian3031 + Issue: "" + PR: "408" diff --git a/.changes/unreleased/Dependencies-20240509-213722.yaml b/.changes/unreleased/Dependencies-20240509-213722.yaml new file mode 100644 index 00000000..a1b9d230 --- /dev/null +++ b/.changes/unreleased/Dependencies-20240509-213722.yaml @@ -0,0 +1,7 @@ +kind: Dependencies +body: Updated dbt-core to 1.8.0 +time: 2024-05-09T21:37:22.423116+02:00 +custom: + Author: damian3031 + Issue: "" + PR: "408" diff --git a/.changes/unreleased/Fixes-20240506-130645.yaml b/.changes/unreleased/Fixes-20240506-130645.yaml new file mode 100644 index 00000000..973595f1 --- /dev/null +++ b/.changes/unreleased/Fixes-20240506-130645.yaml @@ -0,0 +1,7 @@ +kind: Fixes +body: Stop adding aliases to subqueries when calling with `--empty` +time: 2024-05-06T13:06:45.642583+02:00 +custom: + Author: damian3031 + Issue: "" + PR: "408" diff --git a/.github/workflows/bot-changelog.yml b/.github/workflows/bot-changelog.yml index f8a489e7..a4a45fee 100644 --- a/.github/workflows/bot-changelog.yml +++ b/.github/workflows/bot-changelog.yml @@ -40,7 +40,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dddcff49..15f8704b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout the source code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Install Python" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 - name: "Install dev requirements" run: pip install -r dev_requirements.txt @@ -57,10 +57,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35c1d79f..55e5953a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,10 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" @@ -32,10 +32,10 @@ jobs: needs: test steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" @@ -72,10 +72,10 @@ jobs: environment: PypiProd steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index eea7b6d9..f343bed5 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Veracode SCA env: SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }} diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 58df5e89..279eede8 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -30,9 +30,9 @@ jobs: echo The version_number: ${{ github.event.inputs.version_number }} - name: Check out the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.8" @@ -87,7 +87,7 @@ jobs: git status - name: Commit version bump to branch - uses: EndBug/add-and-commit@v7 + uses: EndBug/add-and-commit@v9 with: author_name: 'Github Build Bot' author_email: 'automation@starburstdata.com' @@ -96,7 +96,7 @@ jobs: push: 'origin origin/${{ steps.variables.outputs.BRANCH_NAME }}' - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v6 with: author: 'Github Build Bot ' base: ${{github.ref}} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 24618a80..5d9a4a65 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,10 @@ repos: exclude_types: - "markdown" - id: check-case-conflict + - repo: https://github.com/dbt-labs/pre-commit-hooks + rev: v0.1.0a1 + hooks: + - id: dbt-core-in-adapters-check - repo: https://github.com/psf/black rev: 23.3.0 hooks: diff --git a/dbt/adapters/trino/relation.py b/dbt/adapters/trino/relation.py index a6eea946..0b9a83ee 100644 --- a/dbt/adapters/trino/relation.py +++ b/dbt/adapters/trino/relation.py @@ -7,6 +7,7 @@ @dataclass(frozen=True, eq=False, repr=False) class TrinoRelation(BaseRelation): quote_policy: Policy = field(default_factory=lambda: Policy()) + require_alias: bool = False # Overridden as Trino converts relation identifiers to lowercase def _is_exactish_match(self, field: ComponentName, value: str) -> bool: diff --git a/dev_requirements.txt b/dev_requirements.txt index 3af6541f..fb83a6bd 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,5 +1,5 @@ -dbt-tests-adapter~=1.8.0b1 -mypy==1.8.0 # patch updates have historically introduced breaking changes -pre-commit~=3.6 -pytest~=7.4 -tox~=4.14 +dbt-tests-adapter~=1.8.0 +mypy==1.10.0 # patch updates have historically introduced breaking changes +pre-commit~=3.7 +pytest~=8.2 +tox~=4.15 diff --git a/setup.py b/setup.py index a5ee55d4..2c02b594 100644 --- a/setup.py +++ b/setup.py @@ -76,11 +76,11 @@ def _dbt_trino_version(): ] }, install_requires=[ - "dbt-common>=1.0.1,<2.0", - "dbt-adapters>=1.1.0rc1,<2.0", - "trino~=0.326", + "dbt-common>=1.0.4,<2.0", + "dbt-adapters>=1.1.1,<2.0", + "trino~=0.328", # add dbt-core to ensure backwards compatibility of installation, this is not a functional dependency - "dbt-core>=1.8.0b3", + "dbt-core>=1.8.0", ], zip_safe=False, classifiers=[ diff --git a/tests/functional/adapter/empty/test_empty.py b/tests/functional/adapter/empty/test_empty.py index d76a83d5..c112c370 100644 --- a/tests/functional/adapter/empty/test_empty.py +++ b/tests/functional/adapter/empty/test_empty.py @@ -1,5 +1,12 @@ -from dbt.tests.adapter.empty.test_empty import BaseTestEmpty +from dbt.tests.adapter.empty.test_empty import ( + BaseTestEmpty, + BaseTestEmptyInlineSourceRef, +) class TestTrinoEmpty(BaseTestEmpty): pass + + +class TestTrinoEmptyInlineSourceRef(BaseTestEmptyInlineSourceRef): + pass