jackylee-ch opened a new pull request, #25687:
URL: https://github.com/apache/datafusion/pull/25687

   ## Which issue does this PR close?
   
   - N/A
   
   ## Rationale for this change
   
   `bit_and(NULL)` with `GROUP BY` fails with `GroupsAccumulator not supported 
for bit_and with Null`: `groups_accumulator_supported` returned true for a Null 
return type, but `create_groups_accumulator`'s `downcast_integer!` has no Null 
arm, so the grouped path hits `not_impl_err`.
   
   ## What changes are included in this PR?
   
   `groups_accumulator_supported` now returns false for a Null return type, so 
the plan falls back to the scalar accumulator (which handles Null via 
`NoopAccumulator`). Same shape as the existing `bit_xor(DISTINCT)` guard.
   
   ## What is the testing strategy for this PR?
   
   An `aggregate.slt` case: `bit_and`/`bit_or`/`bit_xor(NULL)` with `GROUP BY`, 
which fails on `main` and returns NULL per group with this change.
   
   ## Are there any user-facing changes?
   
   `bit_and`/`bit_or`/`bit_xor` over NULL with `GROUP BY` now returns NULL 
instead of erroring. No API change.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to