Omega359 commented on code in PR #9040:
URL: https://github.com/apache/arrow-datafusion/pull/9040#discussion_r1470315212
##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -497,6 +502,99 @@ pub fn make_current_time(
move |_arg| Ok(ColumnarValue::Scalar(ScalarValue::Time64Nanosecond(nano)))
}
+/// make_date(year, month, date) SQL function implementation
+pub fn make_date(args: &[ColumnarValue]) -> Result<ColumnarValue> {
+ if args.len() != 3 {
+ return exec_err!(
+ "make_date function requires 3 arguments, got {}",
+ args.len()
+ );
+ }
+
+ // first, identify if any of the arguments is an Array. If yes, store its
`len`,
Review Comment:
In fact I'm curious why arrow didn't just go with a SingleValueArray vs the
creation of a buffer that it currently does. Perhaps it made some operations
too complex?
--
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]