Skip to content

Commit 89d841a

Browse files
committed
feat(cubesql): Enable COVAR aggr functions push down
1 parent 37904f5 commit 89d841a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,6 +2433,8 @@ class BaseQuery {
24332433
STDDEV_SAMP: 'STDDEV_SAMP({{ args_concat }})',
24342434
VAR_POP: 'VAR_POP({{ args_concat }})',
24352435
VAR_SAMP: 'VAR_SAMP({{ args_concat }})',
2436+
COVAR_POP: 'COVAR_POP({{ args_concat }})',
2437+
COVAR_SAMP: 'COVAR_SAMP({{ args_concat }})',
24362438

24372439
COALESCE: 'COALESCE({{ args_concat }})',
24382440
CONCAT: 'CONCAT({{ args_concat }})',

packages/cubejs-schema-compiler/src/adapter/RedshiftQuery.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@ export class RedshiftQuery extends PostgresQuery {
1111
nowTimestampSql() {
1212
return 'GETDATE()';
1313
}
14+
15+
sqlTemplates() {
16+
return {
17+
...super.sqlTemplates(),
18+
COVAR_POP: undefined,
19+
COVAR_SAMP: undefined,
20+
};
21+
}
1422
}

0 commit comments

Comments
 (0)