Skip to content

Commit a0008f3

Browse files
timsaucerclaude
andcommitted
docs: clarify which DISTINCT queries reach a Python UDAF without the flag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 74315c2 commit a0008f3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎crates/core/src/udaf.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,9 @@ impl AggregateUDFImpl for PythonFunctionAggregateUDF {
304304

305305
fn accumulator(&self, acc_args: AccumulatorArgs) -> Result<Box<dyn Accumulator>> {
306306
// The Python accumulator cannot see the flag, so it would count every
307-
// row. A plan the optimizer rewrote to group by the distinct values
308-
// arrives here without it and still runs.
307+
// row. A query with a single DISTINCT argument is rewritten by the
308+
// optimizer to group by those values; it arrives here without the
309+
// flag and still runs.
309310
if acc_args.is_distinct {
310311
return datafusion::common::not_impl_err!(
311312
"DISTINCT is not supported for the Python aggregate UDF {}",

0 commit comments

Comments
 (0)