Skip to main content

laminar_batch_export

Function laminar_batch_export 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn laminar_batch_export( batch: *mut LaminarRecordBatch, out_array: *mut FFI_ArrowArray, out_schema: *mut FFI_ArrowSchema, ) -> i32
Expand description

Export a RecordBatch to the Arrow C Data Interface.

The batch is exported as a struct array (Arrow convention for record batches). The caller must allocate the ArrowArray and ArrowSchema structs before calling.

§Arguments

  • batch - Record batch to export
  • out_array - Pointer to caller-allocated ArrowArray struct
  • out_schema - Pointer to caller-allocated ArrowSchema struct

§Returns

LAMINAR_OK on success, or an error code.

§Safety

  • batch must be a valid batch handle
  • out_array and out_schema must be valid pointers to uninitialized structs
  • Caller must eventually call the release callbacks on both structs