Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/cubejs-duckdb-driver/src/DuckDBQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ export class DuckDBQuery extends BaseQuery {
public timeGroupedColumn(granularity: string, dimension: string) {
return GRANULARITY_TO_INTERVAL[granularity](dimension);
}

public countDistinctApprox(sql: string) {
return `approx_count_distinct(${sql})`;
}
}
9 changes: 3 additions & 6 deletions packages/cubejs-schema-compiler/src/adapter/BaseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2029,18 +2029,15 @@ class BaseQuery {
return evaluateSql;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
hllInit(sql) {
hllInit(_sql) {
throw new UserError('Distributed approximate distinct count is not supported by this DB');
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
hllMerge(sql) {
hllMerge(_sql) {
throw new UserError('Distributed approximate distinct count is not supported by this DB');
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
hllCardinality(sql) {
hllCardinality(_sql) {
throw new UserError('Distributed approximate distinct count is not supported by this DB');
}

Expand Down