Jefffrey commented on code in PR #24104:
URL: https://github.com/apache/datafusion/pull/24104#discussion_r3724864662


##########
datafusion/functions-aggregate/src/median.rs:
##########
@@ -104,22 +104,7 @@ impl Median {
             // Integer inputs are coerced to Float64 so the average of the two
             // middle values is not truncated. This matches DuckDB / 
PostgreSQL / Spark.
             // Float and Decimal inputs preserve their type.
-            signature: Signature::one_of(
-                vec![
-                    TypeSignature::Coercible(vec![Coercion::new_exact(
-                        TypeSignatureClass::Decimal,
-                    )]),
-                    TypeSignature::Coercible(vec![Coercion::new_exact(
-                        TypeSignatureClass::Float,
-                    )]),
-                    TypeSignature::Coercible(vec![Coercion::new_implicit(
-                        TypeSignatureClass::Native(logical_float64()),
-                        vec![TypeSignatureClass::Integer],
-                        NativeType::Float64,
-                    )]),
-                ],
-                Volatility::Immutable,
-            ),
+            signature: Signature::user_defined(Volatility::Immutable),

Review Comment:
   it would be preferable to keep the old signature if possible, as we prefer 
avoiding user defined unless strictly necessary
   
   could we fix the physical execution path to account for null type input?



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