Skip to content

Commit

Permalink
[BUG]: dont panic on count(distinct) (#3481)
Browse files Browse the repository at this point in the history
  • Loading branch information
universalmind303 authored Dec 4, 2024
1 parent 988ee75 commit 751a915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/daft-sql/src/modules/aggs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn handle_count(inputs: &[FunctionArg], planner: &SQLPlanner) -> SQLPlannerResul
pub fn to_expr(expr: &AggExpr, args: &[ExprRef]) -> SQLPlannerResult<ExprRef> {
match expr {
AggExpr::Count(_, _) => unreachable!("count should be handled by by this point"),
AggExpr::CountDistinct(..) => todo!("count distinct"),
AggExpr::CountDistinct(..) => unsupported_sql_err!("COUNT(distinct ..)"),
AggExpr::Sum(_) => {
ensure!(args.len() == 1, "sum takes exactly one argument");
Ok(args[0].clone().sum())
Expand Down

0 comments on commit 751a915

Please sign in to comment.