Skip to main content

record_batch

Macro record_batch 

Source
macro_rules! record_batch {
    ($(($name: expr, $type: ident, $values: expr)),*) => { ... };
}
👎Deprecated since 55.0.0:

Use arrow::array::record_batch instead

Expand description

Creates a record batch from literal slice of values, suitable for rapid testing and development.

Deprecated: prefer the upstream macro from arrow, arrow::array::record_batch, which now supports both the literal slice form shown below and a variable/expression form.

Example:

use arrow::array::record_batch;
let batch = record_batch!(
    ("a", Int32, vec![1, 2, 3]),
    ("b", Float64, vec![Some(4.0), None, Some(5.0)]),
    ("c", Utf8, vec!["alpha", "beta", "gamma"])
);