MCPcopy Create free account
hub / github.com/apache/datafusion / create_record_batch

Function create_record_batch

datafusion/ffi/src/tests/mod.rs:126–132  ·  view source on GitHub ↗
(start_value: i32, num_values: usize)

Source from the content-addressed store, hash-verified

124}
125
126pub fn create_record_batch(start_value: i32, num_values: usize) -> RecordBatch {
127 let end_value = start_value + num_values as i32;
128 let a_vals: Vec<i32> = (start_value..end_value).collect();
129 let b_vals: Vec<f64> = a_vals.iter().map(|v| *v as f64).collect();
130
131 record_batch!(("a", Int32, a_vals), ("b", Float64, b_vals)).unwrap()
132}
133
134/// Here we only wish to create a simple table provider as an example.
135/// We create an in-memory table and convert it to it's FFI counterpart.

Callers 6

test_lag_udwfFunction · 0.50
test_scalar_udfFunction · 0.50
test_nullary_scalar_udfFunction · 0.50
test_rank_udwfFunction · 0.50

Calls 3

collectMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…