Skip to content

Commit 3918dc0

Browse files
committed
fix
1 parent 0b499ca commit 3918dc0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/cubejs-schema-compiler/src/adapter/PrestodbQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class PrestodbQuery extends BaseQuery {
142142
templates.statements.select = '{% if ctes %} WITH \n' +
143143
'{{ ctes | join(\',\n\') }}\n' +
144144
'{% endif %}' +
145-
'SELECT {{ select_concat | map(attribute=\'aliased\') | join(\', \') }} {% if from %}\n' +
145+
'SELECT {% if distinct %}DISTINCT {% endif %}{{ select_concat | map(attribute=\'aliased\') | join(\', \') }} {% if from %}\n' +
146146
'FROM (\n {{ from }}\n) AS {{ from_alias }} {% elif from_prepared %}\n' +
147147
'FROM {{ from_prepared }}' +
148148
'{% endif %}' +

packages/cubejs-testing-drivers/fixtures/athena.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
"querying BigECommerce: filtering with possible casts",
190190
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
191191
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",
192+
"Tesseract: querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",
192193
"SQL API: Timeshift measure from cube",
193194

194195
"querying BigECommerce: rolling window by 2 week",

0 commit comments

Comments
 (0)