jorgecarleitao commented on a change in pull request #8080:
URL: https://github.com/apache/arrow/pull/8080#discussion_r479786701



##########
File path: rust/datafusion/src/execution/physical_plan/functions.rs
##########
@@ -45,6 +43,22 @@ use arrow::{
 use std::{fmt, str::FromStr, sync::Arc};
 use udf::ScalarUdf;
 
+/// A function's signature, which defines the function's supported argument 
types.
+#[derive(Debug)]
+pub enum Signature {
+    /// arbitrary number of arguments of an uniform type out of a list of 
valid types
+    // A function such as `concat` is `Many(vec![DataType::Utf8, 
DataType::LargeUtf8])`
+    Many(Vec<DataType>),
+    /// arbitrary number of arguments of an arbitrary but uniform type
+    // A function such as `array` is `ManyUniform`
+    // The first argument decides the type used for coercion
+    ManyUniform,

Review comment:
       Yes, `Variadic`, that is more appropriate name.
   
   > the idea of a ManyUniform number of arguments perhaps is what is making 
this so complicated.
   
   I am not sure: implementation-wise, it is [a small 
variation](https://github.com/apache/arrow/pull/8080/files#diff-5743c88f5e5129ef14deb93746ca66c8R63)
 of `Uniform`.
   
   The complication comes from what we want to achieve: we are essentially 
building a dynamic typed system with type-checking during planning. AFAIK that 
is a subset of a compiler...




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to