Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add encode/decode to protobuf encoding #8089

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW during review I found a few more functions that need the same treatment, so I filed #8098

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