Tangruilin commented on code in PR #9019:
URL: https://github.com/apache/arrow-datafusion/pull/9019#discussion_r1477017335
##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -1337,6 +1376,36 @@ fn validate_to_timestamp_data_types(
None
}
+/// to_date SQL function implementation
+pub fn to_date_invoke(args: &[ColumnarValue]) -> Result<ColumnarValue> {
+ if args.is_empty() {
+ return exec_err!(
+ "to_date function requires 1 or more arguments, got {}",
+ args.len()
+ );
+ }
+
+ // validate that any args after the first one are Utf8
+ if args.len() > 1 {
+ if let Some(value) = validate_to_timestamp_data_types(args, "to_date")
{
+ return value;
+ }
+ }
+
+ match args[0].data_type() {
+ DataType::Int32
Review Comment:
Done
--
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]