From fdc183041bab6b6aec8b76d9658240953f444ef4 Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Wed, 11 Dec 2024 14:22:46 -0800 Subject: [PATCH] fix(connect): `count` returns the number of rows in the table --- .../src/translation/expr/unresolved_function.rs | 11 ++++++++++- tests/connect/test_count.py | 13 +++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 tests/connect/test_count.py diff --git a/src/daft-connect/src/translation/expr/unresolved_function.rs b/src/daft-connect/src/translation/expr/unresolved_function.rs index af70a1e8f2..959307e779 100644 --- a/src/daft-connect/src/translation/expr/unresolved_function.rs +++ b/src/daft-connect/src/translation/expr/unresolved_function.rs @@ -1,4 +1,5 @@ use daft_core::count_mode::CountMode; +use daft_schema::dtype::DataType; use eyre::{bail, Context}; use spark_connect::expression::UnresolvedFunction; @@ -79,7 +80,15 @@ pub fn handle_count(arguments: Vec) -> eyre::Result