Skip to content

Apache DataFusion SQL Query Engine

[minior] support serde for some function (#6846)

Kun Liu3a2e67520935
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",
)),