Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
record_batch in datafusion::common::arrow::array - Rust
[go: Go Back, main page]

datafusion::common::arrow::array

Macro record_batch

Source
macro_rules! record_batch {
    ($(($name: expr, $type: ident, [$($values: expr),*])),*) => { ... };
}
Expand description

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

Example:

use arrow_array::record_batch;
use arrow_schema;

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

Due to limitation of create_array! macro, support for limited data types is available.