jayzhan211 commented on code in PR #13240:
URL: https://github.com/apache/datafusion/pull/13240#discussion_r1827385935


##########
datafusion/functions-aggregate/src/first_last.rs:
##########
@@ -79,15 +79,7 @@ impl Default for FirstValue {
 impl FirstValue {
     pub fn new() -> Self {
         Self {
-            signature: Signature::one_of(
-                vec![
-                    // TODO: we can introduce more strict signature that only 
numeric of array types are allowed
-                    
TypeSignature::ArraySignature(ArrayFunctionSignature::Array),
-                    TypeSignature::Numeric(1),
-                    TypeSignature::Uniform(1, vec![DataType::Utf8]),
-                ],
-                Volatility::Immutable,
-            ),
+            signature: Signature::any(1, Volatility::Immutable),

Review Comment:
   Ideally first/last value get the first/last item in the column, so it should 
be the type of the column.
   
   I forgot why we don't use `Any`.
   Without the change, we need to add another type signature for boolean, so I 
change it to `Any` in this PR



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to