Jefffrey commented on code in PR #18663:
URL: https://github.com/apache/datafusion/pull/18663#discussion_r2525620926
##########
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:
Yep; in future can look into refactoring away from user_defined once
signature API has better support, but for now I think it'll be easier to use
user_defined here
--
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]