Skip to content

Commit 21b2af1

Browse files
authored
fix: add match encode/decode scalar function type (#8089)
1 parent b7251e4 commit 21b2af1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

datafusion/proto/src/logical_plan/from_proto.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use datafusion_expr::{
4646
array_to_string, ascii, asin, asinh, atan, atan2, atanh, bit_length, btrim,
4747
cardinality, cbrt, ceil, character_length, chr, coalesce, concat_expr,
4848
concat_ws_expr, cos, cosh, cot, current_date, current_time, date_bin, date_part,
49-
date_trunc, degrees, digest, exp,
49+
date_trunc, decode, degrees, digest, encode, exp,
5050
expr::{self, InList, Sort, WindowFunction},
5151
factorial, floor, from_unixtime, gcd, isnan, iszero, lcm, left, ln, log, log10, log2,
5252
logical_plan::{PlanType, StringifiedPlan},
@@ -1472,6 +1472,14 @@ pub fn parse_expr(
14721472
ScalarFunction::Sha384 => Ok(sha384(parse_expr(&args[0], registry)?)),
14731473
ScalarFunction::Sha512 => Ok(sha512(parse_expr(&args[0], registry)?)),
14741474
ScalarFunction::Md5 => Ok(md5(parse_expr(&args[0], registry)?)),
1475+
ScalarFunction::Encode => Ok(encode(
1476+
parse_expr(&args[0], registry)?,
1477+
parse_expr(&args[1], registry)?,
1478+
)),
1479+
ScalarFunction::Decode => Ok(decode(
1480+
parse_expr(&args[0], registry)?,
1481+
parse_expr(&args[1], registry)?,
1482+
)),
14751483
ScalarFunction::NullIf => Ok(nullif(
14761484
parse_expr(&args[0], registry)?,
14771485
parse_expr(&args[1], registry)?,

0 commit comments

Comments
 (0)