Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H committed Dec 18, 2023
1 parent 1ed0fce commit 6fee213
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions datafusion/physical-expr/src/array_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ fn general_set_op(
match (array1.data_type(), array2.data_type()) {
(DataType::Null, DataType::List(field)) => {
if set_op == SetOp::Intersect {
return make_array(dbg!(&[]));
return Ok(new_empty_array(&DataType::Null));
}
let array = as_list_array(&array2)?;
general_array_distinct::<i32>(array, field)
Expand All @@ -1660,7 +1660,7 @@ fn general_set_op(
let array = as_large_list_array(&array1)?;
general_array_distinct::<i64>(array, field)
}
(DataType::Null, DataType::Null) => make_array(&[]),
(DataType::Null, DataType::Null) => return Ok(new_empty_array(&DataType::Null)),

(DataType::List(_), DataType::List(_)) => {
let array1 = as_list_array(&array1)?;
Expand Down
8 changes: 4 additions & 4 deletions datafusion/sqllogictest/test_files/array.slt
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ select array_union(null, []);
query ?
select array_union(null, null);
----
[]
NULL

# array_union scalar function #11
query ?
Expand Down Expand Up @@ -3051,7 +3051,7 @@ select array_intersect([1, 1, 2, 2, 3, 3], null);
query ?
select array_intersect(null, [1, 1, 2, 2, 3, 3]);
----
[]
NULL

query ?
select array_intersect([], null);
Expand All @@ -3061,12 +3061,12 @@ select array_intersect([], null);
query ?
select array_intersect(null, []);
----
[]
NULL

query ?
select array_intersect(null, null);
----
[]
NULL

query ??????
SELECT list_intersect(make_array(1,2,3), make_array(2,3,4)),
Expand Down

0 comments on commit 6fee213

Please sign in to comment.