This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 6b8c6ade0f Minor: fix wrong function call (#8847)
6b8c6ade0f is described below
commit 6b8c6ade0feabaae84f7fe47b1d77bde3b256555
Author: Alex Huang <[email protected]>
AuthorDate: Mon Jan 15 19:05:40 2024 +0800
Minor: fix wrong function call (#8847)
* Minor: fix wrong function call
* fix array_union
---
datafusion/proto/src/logical_plan/from_proto.rs | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/datafusion/proto/src/logical_plan/from_proto.rs
b/datafusion/proto/src/logical_plan/from_proto.rs
index 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)?,