andygrove commented on code in PR #546:
URL: https://github.com/apache/datafusion-comet/pull/546#discussion_r1638984957


##########
core/src/execution/sort.rs:
##########
@@ -159,12 +159,16 @@ where
                     pos += 1;
                 }
             } else {
-                unsafe {
-                    ptr::copy_nonoverlapping(
-                        bucket.as_ptr(),
-                        self.get_unchecked_mut(pos),
-                        bucket.len(),
-                    );
+                if !bucket.is_empty() {

Review Comment:
   Without this check we were hitting a debug assertion when trying to copy an 
empty slice



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to