CuteChuanChuan opened a new pull request, #26746:
URL: https://github.com/apache/datafusion/pull/26746

   ## Which issue does this PR close?
   - Closes #18882.
   
   ## Rationale for this change
   
   An aggregate's nullability is described twice: by 
`AggregateUDFImpl::is_nullable` and by the field returned from 
`AggregateUDFImpl::return_field`. `AggregateFunctionExpr` stored both, so 
`is_nullable()` and `field().is_nullable()` could disagree. This makes 
`return_field` the single source of truth, following #17074 for scalar UDFs.
   
   ## What changes are included in this PR?
   
   - Deprecate `AggregateUDFImpl::is_nullable` and `AggregateUDF::is_nullable` 
(since 56.0.0).
   - `AggregateExprBuilder::build` now derives `is_nullable` from the return 
field.
   - Migrate the built-in overrides (`count`, `approx_distinct`, `regr_*`) and 
the `Count` test stub to `return_field`.
   - FFI: keep the `FFI_AggregateUDF::is_nullable` field for ABI stability and 
silence the deprecation warning; it can be removed together with the method.
   
   This addresses the review feedback on #18934.
   
   ## What is the testing strategy for this PR?
   
   Covered by existing tests.
   
   ## Are there any user-facing changes?
   
   Yes. Implementations overriding `is_nullable` should set nullability in 
`return_field` instead.


-- 
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