liukun4515 commented on a change in pull request #1510:
URL: https://github.com/apache/arrow-datafusion/pull/1510#discussion_r777009769
##########
File path: datafusion/src/physical_plan/functions.rs
##########
@@ -546,6 +550,7 @@ pub fn return_type(
BuiltinScalarFunction::Lpad => utf8_to_str_type(&input_expr_types[0],
"lpad"),
BuiltinScalarFunction::Ltrim => utf8_to_str_type(&input_expr_types[0],
"ltrim"),
BuiltinScalarFunction::MD5 => utf8_to_str_type(&input_expr_types[0],
"md5"),
+ BuiltinScalarFunction::Factorial => Ok(DataType::Float64),
Review comment:
Using the floating-point as the result type, we may lose precision.
In the PG, the result type is numeric,
https://www.postgresql.org/docs/14/functions-math.html
--
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]