pub unsafe fn scalar_wrapper(
function: ScalarFunction,
ptr: *const u8,
len: usize,
out_slice: *mut CSlice,
) -> i32Expand description
A wrapper for calling scalar functions from C.
The input record batch is read from the IPC buffer pointed to by ptr and len.
The output data is written to the buffer pointed to by out_slice.
The caller is responsible for deallocating the output buffer.
The return value is 0 on success, -1 on error. If successful, the record batch is written to the buffer. If failed, the error message is written to the buffer.
ยงSafety
ptr, len, out_slice must point to a valid buffer.