2010YOUY01 commented on code in PR #6527:
URL: https://github.com/apache/arrow-datafusion/pull/6527#discussion_r1218519822


##########
datafusion/expr/src/function.rs:
##########
@@ -376,6 +381,12 @@ pub fn signature(fun: &BuiltinScalarFunction) -> Signature 
{
         BuiltinScalarFunction::Chr | BuiltinScalarFunction::ToHex => {
             Signature::uniform(1, vec![DataType::Int64], fun.volatility())
         }
+        BuiltinScalarFunction::Greatest | BuiltinScalarFunction::Least => {
+            Signature::variadic_equal(

Review Comment:
   Tried `Signature::variadic(` and it just work as expected
   ```
   ❯ select least(1,2,3);
   +-----------------------------------+
   | least(Int64(1),Int64(2),Int64(3)) |
   +-----------------------------------+
   | 1                                 |
   +-----------------------------------+
   1 row in set. Query took 0.077 seconds.
   ❯ select least(1,2.0,3);
   +-------------------------------------+
   | least(Int64(1),Float64(2),Int64(3)) |
   +-------------------------------------+
   | 1.0                                 |
   +-------------------------------------+
   1 row in set. Query took 0.009 seconds.
   ❯ select least(interval '1 day', interval '2 day', interval '3 day');
   
+-----------------------------------------------------------------------------------------------------------------------------------------------+
   | 
least(IntervalMonthDayNano("18446744073709551616"),IntervalMonthDayNano("36893488147419103232"),IntervalMonthDayNano("55340232221128654848"))
 |
   
+-----------------------------------------------------------------------------------------------------------------------------------------------+
   | 0 years 0 mons 1 days 0 hours 0 mins 0.000000000 secs                      
                                                                   |
   
+-----------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set. Query took 0.008 seconds.
   ```



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

Reply via email to