alamb commented on code in PR #9040:
URL: https://github.com/apache/arrow-datafusion/pull/9040#discussion_r1470319653


##########
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:
   You can represent the idea now using RunEndEncoded array (with the count of 
size) but that is relatively new and not well supported yet in arrow-rs or 
DataFusion
   
   Arrow-rs also now has 
https://docs.rs/arrow/latest/arrow/array/struct.Scalar.html which is similar to 
the `ColumnarValue` API 
   
   If it had a SingleValueArray that would likely have to be handled specially 
in all the kernels, but perhaps I don't fully understand what you are suggesting



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