You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "niebayes (via GitHub)" <gi...@apache.org> on 2026/08/04 07:49:40 UTC

[I] Bug + Regression: median(null) fails in v54 [datafusion]

niebayes opened a new issue, #24077:
URL: https://github.com/apache/datafusion/issues/24077

   
   `SELECT median(NULL)` worked in DataFusion v53 (53.1.0) but fails in v54 (54.0.0 / 54.1.0) with:
   
   ```
   MedianAccumulator not supported for median(NULL) with Null
   ```
   
   This is a **regression** introduced by PR [#21988](https://github.com/apache/datafusion/pull/21988).
   
   ## Root cause
   
   PR #21988 changed `median`'s signature from `Signature::numeric` to `Signature::one_of` with three coercible arms. The integer arm uses:
   
   ```rust
   // datafusion/functions-aggregate/src/median.rs
   Coercion::new_implicit(
       TypeSignatureClass::Native(logical_float64()),
       vec![TypeSignatureClass::Integer],   // ← should be Numeric
       NativeType::Float64,
   ),
   ```
   
   `TypeSignatureClass::Integer` does **not** include `DataType::Null`, so `median(NULL)` (whose input is `Null`) falls through to the accumulator's `_ => Err(...)` branch.
   


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Bug + Regression: median(null) fails in v54 [datafusion]

Posted by "Sigma-Ma (via GitHub)" <gi...@apache.org>.
Sigma-Ma commented on issue #24077:
URL: https://github.com/apache/datafusion/issues/24077#issuecomment-5188207976

   take


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Bug + Regression: median(null) fails in v54 [datafusion]

Posted by "Sigma-Ma (via GitHub)" <gi...@apache.org>.
Sigma-Ma commented on issue #24077:
URL: https://github.com/apache/datafusion/issues/24077#issuecomment-5191241164

   I opened #24104 to address this regression. The PR adds explicit coercion for untyped NULL input and a SQL logic regression test.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Bug + Regression: median(null) fails in v54 [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #24077: Bug + Regression: median(null) fails in v54
URL: https://github.com/apache/datafusion/issues/24077


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org