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

Query table_comments without unrolling with UNION ALL #357

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/Under the Hood-20231003-161428.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Query table_comments without unrolling with UNION ALL
time: 2023-10-03T16:14:28.238801+02:00
custom:
Author: findepi
Issue: ""
PR: "357"
7 changes: 1 addition & 6 deletions dbt/include/trino/macros/catalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@


{% macro trino__get_catalog_table_comment_schemas_sql(information_schema, schemas) -%}
{%- for schema in schemas %}
select
catalog_name as "table_database",
schema_name as "table_schema",
Expand All @@ -79,11 +78,7 @@
and
schema_name != 'information_schema'
and
schema_name = '{{ schema | lower }}'
{%- if not loop.last %}
union all
{% endif -%}
{%- endfor -%}
schema_name in ('{{ schemas | join("','") | lower }}')
{%- endmacro %}


Expand Down
Loading