theirix commented on code in PR #21074:
URL: https://github.com/apache/datafusion/pull/21074#discussion_r3096693415


##########
datafusion/functions-aggregate/src/approx_percentile_cont.rs:
##########
@@ -132,22 +132,45 @@ impl Default for ApproxPercentileCont {
 impl ApproxPercentileCont {
     /// Create a new [`ApproxPercentileCont`] aggregate function.
     pub fn new() -> Self {
-        let mut variants = Vec::with_capacity(NUMERICS.len() * (INTEGERS.len() 
+ 1));
         // Accept any numeric value paired with a float64 percentile
-        for num in NUMERICS {
-            variants.push(TypeSignature::Exact(vec![num.clone(), 
DataType::Float64]));
-            // Additionally accept an integer number of centroids for T-Digest
-            for int in INTEGERS {
-                variants.push(TypeSignature::Exact(vec![
-                    num.clone(),
-                    DataType::Float64,
-                    int.clone(),
-                ]))
-            }
-        }
-        Self {
-            signature: Signature::one_of(variants, Volatility::Immutable),
-        }
+        // Additionally accept an integer number of centroids for T-Digest
+        let signature = Signature::one_of(

Review Comment:
   Agree, removed some code. It also affected `approx_median`, piggybacking on 
`approx_percentile_cont` - updated signature and tests as well. 
   
   Clarified the scope of this PR in description - it changes more than expected



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