Skip to content

Commit

Permalink
remove null in array-append adn array-prepend (#8901)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H authored Jan 19, 2024
1 parent a786921 commit 72b81f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions datafusion/physical-expr/src/array_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,12 +1031,6 @@ where
let res = match list_array.value_type() {
DataType::List(_) => concat_internal::<i32>(args)?,
DataType::LargeList(_) => concat_internal::<i64>(args)?,
DataType::Null => {
return make_array(&[
list_array.values().to_owned(),
element_array.to_owned(),
]);
}
data_type => {
return generic_append_and_prepend::<O>(
list_array,
Expand Down
6 changes: 3 additions & 3 deletions datafusion/sqllogictest/test_files/array.slt
Original file line number Diff line number Diff line change
Expand Up @@ -1599,9 +1599,9 @@ select
query ????
select
array_append(arrow_cast(make_array(), 'LargeList(Null)'), 4),
array_append(make_array(), null),
array_append(make_array(1, null, 3), 4),
array_append(make_array(null, null), 1)
array_append(arrow_cast(make_array(), 'LargeList(Null)'), null),
array_append(arrow_cast(make_array(1, null, 3), 'LargeList(Int64)'), 4),
array_append(arrow_cast(make_array(null, null), 'LargeList(Null)'), 1)
;
----
[4] [] [1, , 3, 4] [, , 1]
Expand Down

0 comments on commit 72b81f1

Please sign in to comment.