File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
cubejs-schema-compiler/src/adapter Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -26,4 +26,8 @@ export class DuckDBQuery extends BaseQuery {
2626 public timeGroupedColumn ( granularity : string , dimension : string ) {
2727 return GRANULARITY_TO_INTERVAL [ granularity ] ( dimension ) ;
2828 }
29+
30+ public countDistinctApprox ( sql : string ) {
31+ return `approx_count_distinct(${ sql } )` ;
32+ }
2933}
Original file line number Diff line number Diff line change @@ -2029,18 +2029,15 @@ class BaseQuery {
20292029 return evaluateSql ;
20302030 }
20312031
2032- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2033- hllInit ( sql ) {
2032+ hllInit ( _sql ) {
20342033 throw new UserError ( 'Distributed approximate distinct count is not supported by this DB' ) ;
20352034 }
20362035
2037- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2038- hllMerge ( sql ) {
2036+ hllMerge ( _sql ) {
20392037 throw new UserError ( 'Distributed approximate distinct count is not supported by this DB' ) ;
20402038 }
20412039
2042- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2043- hllCardinality ( sql ) {
2040+ hllCardinality ( _sql ) {
20442041 throw new UserError ( 'Distributed approximate distinct count is not supported by this DB' ) ;
20452042 }
20462043
You can’t perform that action at this time.
0 commit comments