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

Stop adding aliases to render_limited output #408

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions .changes/unreleased/Dependencies-20240507-142214.yaml
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 7 additions & 0 deletions .changes/unreleased/Dependencies-20240509-213722.yaml
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20240506-130645.yaml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion .github/workflows/bot-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"

Expand Down Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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: '[email protected]'
Expand All @@ -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 <[email protected]>'
base: ${{github.ref}}
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions dbt/adapters/trino/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand Down
9 changes: 8 additions & 1 deletion tests/functional/adapter/empty/test_empty.py
Original file line number Diff line number Diff line change
@@ -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
Loading