viirya commented on code in PR #5807:
URL: https://github.com/apache/arrow-datafusion/pull/5807#discussion_r1154768342
##########
datafusion/physical-expr/src/math_expressions.rs:
##########
@@ -149,6 +160,58 @@ pub fn random(args: &[ColumnarValue]) ->
Result<ColumnarValue> {
Ok(ColumnarValue::Array(Arc::new(array)))
}
+/// Round SQL function
+pub fn round(args: &[ArrayRef]) -> Result<ArrayRef> {
+ if args.len() != 1 && args.len() != 2 {
+ return Err(DataFusionError::Internal(
+ "round function requires one or two arguments".to_string(),
+ ));
+ }
+
+ let mut decimal_places =
+ &(Arc::new(Int64Array::from_value(0, args[0].len())) as ArrayRef);
Review Comment:
Yea, not sure if it is worth.
--
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]