This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a2e675209 [minior] support serde for some function (#6846)
3a2e675209 is described below

commit 3a2e67520935773b0686d3c40ae374f56241268c
Author: Kun Liu <[email protected]>
AuthorDate: Thu Jul 6 01:29:26 2023 +0800

    [minior] support serde for some function (#6846)
    
    * fill some scalar function for serde
    
    * fix fmt
---
 datafusion/proto/src/logical_plan/from_proto.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/datafusion/proto/src/logical_plan/from_proto.rs 
b/datafusion/proto/src/logical_plan/from_proto.rs
index 6977cc3932..4e2f59a118 100644
--- a/datafusion/proto/src/logical_plan/from_proto.rs
+++ b/datafusion/proto/src/logical_plan/from_proto.rs
@@ -40,8 +40,8 @@ use datafusion_expr::{
     array_fill, array_length, array_ndims, array_position, array_positions,
     array_prepend, array_remove, array_replace, array_to_string, ascii, asin, 
asinh,
     atan, atan2, atanh, bit_length, btrim, cardinality, cbrt, ceil, 
character_length,
-    chr, coalesce, concat_expr, concat_ws_expr, cos, cosh, date_bin, date_part,
-    date_trunc, degrees, digest, exp,
+    chr, coalesce, concat_expr, concat_ws_expr, cos, cosh, current_date, 
current_time,
+    date_bin, date_part, date_trunc, degrees, digest, exp,
     expr::{self, InList, Sort, WindowFunction},
     factorial, floor, from_unixtime, gcd, lcm, left, ln, log, log10, log2,
     logical_plan::{PlanType, StringifiedPlan},
@@ -1481,6 +1481,8 @@ pub fn parse_expr(
                     parse_expr(&args[0], registry)?,
                     parse_expr(&args[1], registry)?,
                 )),
+                ScalarFunction::CurrentDate => Ok(current_date()),
+                ScalarFunction::CurrentTime => Ok(current_time()),
                 _ => Err(proto_error(
                     "Protobuf deserialization error: Unsupported scalar 
function",
                 )),

Reply via email to