Veeupup commented on code in PR #8269:
URL: https://github.com/apache/arrow-datafusion/pull/8269#discussion_r1399336736
##########
datafusion/physical-expr/src/array_expressions.rs:
##########
@@ -580,6 +580,21 @@ pub fn array_except(args: &[ArrayRef]) -> Result<ArrayRef>
{
let array2 = &args[1];
match (array1.data_type(), array2.data_type()) {
+ (DataType::Null, DataType::Null) => {
+ // NullArray(1): means null, NullArray(0): means []
+ // except([], []) = [], except([], null) = [], except(null, []) =
null, except(null, null) = null
+ let nulls = match (array1.len(), array2.len()) {
+ (1, _) => Some(NullBuffer::new_null(1)),
+ _ => None,
+ };
+ let arr = Arc::new(ListArray::try_new(
+ Arc::new(Field::new("item", DataType::Null, true)),
+ OffsetBuffer::new(vec![0; 2].into()),
+ Arc::new(NullArray::new(0)),
+ nulls,
+ )?) as ArrayRef;
+ Ok(arr)
Review Comment:
you can check it now, it seems we made it in the right way
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]