viirya commented on code in PR #905:
URL: https://github.com/apache/datafusion-comet/pull/905#discussion_r1744257806
##########
native/core/src/execution/utils.rs:
##########
@@ -96,6 +99,22 @@ impl SparkArrowConvert for ArrayData {
Ok((array as i64, schema as i64))
}
+
+ /// Move this ArrowData to pointers of Arrow C data interface.
+ fn move_to_spark(&self, array: i64, schema: i64) -> Result<(),
ExecutionError> {
+ let jvm_array = unsafe { std::ptr::replace(array as *mut
FFI_ArrowArray, FFI_ArrowArray::new(self)) };
+ let jvm_schema = unsafe {
+ std::ptr::replace(
+ schema as *mut FFI_ArrowSchema,
+ FFI_ArrowSchema::try_from(self.data_type())?,
+ )
+ };
+
+ std::mem::forget(jvm_array);
+ std::mem::forget(jvm_schema);
Review Comment:
Saw SIGSEGV in CI on ubuntu platform only (I cannot reproduce locally on
Mac). Trying this to see if it is related.
--
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]