Skip to content

Commit

Permalink
fix: add match encode/decode scalar function type (#8089)
Browse files Browse the repository at this point in the history
  • Loading branch information
Syleechan authored Nov 8, 2023
1 parent b7251e4 commit 21b2af1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion datafusion/proto/src/logical_plan/from_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use datafusion_expr::{
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, cot, current_date, current_time, date_bin, date_part,
date_trunc, degrees, digest, exp,
date_trunc, decode, degrees, digest, encode, exp,
expr::{self, InList, Sort, WindowFunction},
factorial, floor, from_unixtime, gcd, isnan, iszero, lcm, left, ln, log, log10, log2,
logical_plan::{PlanType, StringifiedPlan},
Expand Down Expand Up @@ -1472,6 +1472,14 @@ pub fn parse_expr(
ScalarFunction::Sha384 => Ok(sha384(parse_expr(&args[0], registry)?)),
ScalarFunction::Sha512 => Ok(sha512(parse_expr(&args[0], registry)?)),
ScalarFunction::Md5 => Ok(md5(parse_expr(&args[0], registry)?)),
ScalarFunction::Encode => Ok(encode(
parse_expr(&args[0], registry)?,
parse_expr(&args[1], registry)?,
)),
ScalarFunction::Decode => Ok(decode(
parse_expr(&args[0], registry)?,
parse_expr(&args[1], registry)?,
)),
ScalarFunction::NullIf => Ok(nullif(
parse_expr(&args[0], registry)?,
parse_expr(&args[1], registry)?,
Expand Down

0 comments on commit 21b2af1

Please sign in to comment.