From ec4ca9f6fb81b03ca74f53bdb3069d2d1ef57cea Mon Sep 17 00:00:00 2001 From: lloyd tabb Date: Thu, 18 Jan 2024 12:25:25 -0800 Subject: [PATCH] weird order of precedence with jsonb --- packages/malloy/src/model/malloy_query.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/malloy/src/model/malloy_query.ts b/packages/malloy/src/model/malloy_query.ts index f8fc915f4..be20f3fed 100644 --- a/packages/malloy/src/model/malloy_query.ts +++ b/packages/malloy/src/model/malloy_query.ts @@ -1183,13 +1183,13 @@ class QueryFieldDistinctKey extends QueryAtomicField { return this.parent.dialect.concat( parentKey || '', // shouldn't have to do this... "'x'", - this.parent.dialect.sqlFieldReference( + `(${this.parent.dialect.sqlFieldReference( this.parent.getIdentifier(), '__row_id', 'string', true, false - ) + )})` ); } else { // return this.parent.getIdentifier() + "." + "__distinct_key";