Apache DataFusion SQL Query Engine
Minor: fix wrong function call (#8847)
Alex Huang6b8c6ade0fea
diff --git a/datafusion/proto/src/logical_plan/from_proto.rs b/datafusion/proto/src/logical_plan/from_proto.rsindex c11599412d..d15cf1db92 100644--- a/datafusion/proto/src/logical_plan/from_proto.rs+++ b/datafusion/proto/src/logical_plan/from_proto.rs@@ -47,11 +47,11 @@ use datafusion_expr::{array_element, array_except, array_has, array_has_all, array_has_any,array_intersect, array_length, array_ndims, array_position, array_positions,array_prepend, array_remove, array_remove_all, array_remove_n, array_repeat,- array_replace, array_replace_all, array_replace_n, array_slice, array_sort,- array_to_string, arrow_typeof, 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, decode, degrees, digest, encode, exp,+ array_replace, array_replace_all, array_replace_n, array_resize, array_slice,+ array_sort, array_to_string, array_union, arrow_typeof, 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, decode, degrees, digest, encode, exp,expr::{self, InList, Sort, WindowFunction},factorial, find_in_set, flatten, floor, from_unixtime, gcd, gen_range, isnan, iszero,lcm, left, levenshtein, ln, log, log10, log2,@@ -1494,13 +1494,11 @@ pub fn parse_expr(ScalarFunction::ArrayNdims => {Ok(array_ndims(parse_expr(&args[0], registry)?))}- ScalarFunction::ArrayUnion => Ok(array(- args.to_owned()- .iter()- .map(|expr| parse_expr(expr, registry))- .collect::<Result<Vec<_>, _>>()?,+ ScalarFunction::ArrayUnion => Ok(array_union(+ parse_expr(&args[0], registry)?,+ parse_expr(&args[1], registry)?,)),- ScalarFunction::ArrayResize => Ok(array_slice(+ ScalarFunction::ArrayResize => Ok(array_resize(parse_expr(&args[0], registry)?,parse_expr(&args[1], registry)?,parse_expr(&args[2], registry)?,