Tim-53 commented on code in PR #18663:
URL: https://github.com/apache/datafusion/pull/18663#discussion_r2525548951


##########
datafusion/functions-aggregate/src/percentile_cont.rs:
##########
@@ -141,10 +142,17 @@ impl Default for PercentileCont {
 impl PercentileCont {
     pub fn new() -> Self {
         let mut variants = Vec::with_capacity(NUMERICS.len());
-        // Accept any numeric value paired with a float64 percentile
+
+        let list_f64 =
+            DataType::List(Arc::new(Field::new("item", DataType::Float64, 
true)));
+
         for num in NUMERICS {
+            // Accept any numeric value paired with a float64 percentile
             variants.push(TypeSignature::Exact(vec![num.clone(), 
DataType::Float64]));
+            //Accept any numeric value paired with a list of float64 
percentiles
+            variants.push(TypeSignature::Exact(vec![num.clone(), 
list_f64.clone()]));
         }
+

Review Comment:
   Ye this part felt a little hacky to implement, but i diden't find a better 
way to express this.
   Just to confirm: you're suggesting using `TypeSignature::UserDefined 
`instead of enumerating the Exact variants, right?



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