Skip to content

Commit

Permalink
Stop adding aliases to render_limited output
Browse files Browse the repository at this point in the history
  • Loading branch information
damian3031 committed May 8, 2024
1 parent 023a839 commit 6c0ef24
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
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"
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
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

0 comments on commit 6c0ef24

Please sign in to comment.