Skip to content

Commit

Permalink
Remove redundant DISTINCT from schema listing query
Browse files Browse the repository at this point in the history
`information_schema.schemata` has no duplicates.
  • Loading branch information
findepi authored and damian3031 committed Oct 2, 2023
1 parent 6d4cc2a commit 38ce052
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20230929-211758.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Remove redundant DISTINCT from schema listing query
time: 2023-09-29T21:17:58.859993+02:00
custom:
Author: findepi
Issue: ""
PR: "356"
2 changes: 1 addition & 1 deletion dbt/include/trino/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
{% macro trino__list_schemas(database) -%}
{% call statement('list_schemas', fetch_result=True, auto_begin=False) %}
select distinct schema_name
select schema_name
from {{ information_schema_name(database) }}.schemata
{% endcall %}
{{ return(load_result('list_schemas').table) }}
Expand Down

0 comments on commit 38ce052

Please sign in to comment.