We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 909ab91 commit 862ed2eCopy full SHA for 862ed2e
1 file changed
native/spark-expr/src/jvm_udf/mod.rs
@@ -195,6 +195,8 @@ impl PhysicalExpr for JvmScalarUdfExpr {
195
})?;
196
197
// Step 4: import the result from the FFI slots filled by the JVM.
198
+ // SAFETY: from_ffi consumes the FFI_ArrowArray's release ownership; arrow-rs sets the
199
+ // release callback to None on the moved-from struct, so the Box's subsequent drop is a no-op.
200
let result_data = unsafe { from_ffi(*out_array, &out_schema) }
201
.map_err(|e| CometError::Arrow { source: e })?;
202
Ok(ColumnarValue::Array(make_array(result_data)))
0 commit comments