Jefffrey commented on code in PR #19683:
URL: https://github.com/apache/datafusion/pull/19683#discussion_r2692982546


##########
datafusion/functions-nested/src/except.rs:
##########
@@ -169,14 +182,25 @@ fn general_except<OffsetSize: OffsetSizeTrait>(
     let mut rows = Vec::with_capacity(l_values.num_rows());
     let mut dedup = HashSet::new();
 
-    for (l_w, r_w) in l.offsets().windows(2).zip(r.offsets().windows(2)) {
-        let l_slice = l_w[0].as_usize()..l_w[1].as_usize();
-        let r_slice = r_w[0].as_usize()..r_w[1].as_usize();
-        for i in r_slice {
+    let nulls = NullBuffer::union(l.nulls(), r.nulls());
+
+    for (i, ((l_start, l_end), (r_start, r_end))) in l
+        .offsets()
+        .iter()
+        .tuple_windows()
+        .zip(r.offsets().iter().tuple_windows())
+        .enumerate()
+    {
+        if nulls.as_ref().is_some_and(|nulls| nulls.is_null(i)) {
+            offsets.push(OffsetSize::usize_as(rows.len()));
+            continue;
+        }
+
+        for i in r_start.as_usize()..r_end.as_usize() {

Review Comment:
   This wasn't intentional, refactored the names to clear things up 👍 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to