Skip to content

Commit bf8b648

Browse files
committed
fix: incorrect WHERE for refreshKey every
1 parent 133857e commit bf8b648

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cubejs-schema-compiler/adapter/BaseQuery.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,12 +1625,13 @@ class BaseQuery {
16251625
(originalRefreshKey, refreshKeyCube) => {
16261626
if (cubeFromPath.refreshKey && cubeFromPath.refreshKey.immutable) {
16271627
return `SELECT ${this.incrementalRefreshKey(preAggregationQueryForSql, `(${originalRefreshKey})`)}`;
1628-
} else {
1628+
} else if (!cubeFromPath.refreshKey) {
16291629
// TODO handle WHERE while generating originalRefreshKey
16301630
return refreshKeyCube === preAggregationQueryForSql.timeDimensions[0].path()[0] ?
16311631
`${originalRefreshKey} WHERE ${preAggregationQueryForSql.timeDimensions[0].filterToWhere()}` :
16321632
originalRefreshKey;
16331633
}
1634+
return originalRefreshKey;
16341635
}
16351636
),
16361637
{ preAggregationQuery: true }

0 commit comments

Comments
 (0)