Skip to content

Commit 7ceaa5e

Browse files
authored
feat: make record_batch_to_chunk public (#144)
* feat: make record_batch_to_chunk public * docs: add docstring
1 parent bc5844b commit 7ceaa5e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/vtab/arrow.rs

+7
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ pub fn to_duckdb_logical_type(data_type: &DataType) -> Result<LogicalType, Box<d
192192
}
193193
}
194194

195+
/// Converts a `RecordBatch` to a `DataChunk` in the DuckDB format.
196+
///
197+
/// # Arguments
198+
///
199+
/// * `batch` - A reference to the `RecordBatch` to be converted to a `DataChunk`.
200+
/// * `chunk` - A mutable reference to the `DataChunk` to store the converted data.
201+
/// ```
195202
pub fn record_batch_to_duckdb_data_chunk(
196203
batch: &RecordBatch,
197204
chunk: &mut DataChunk,

src/vtab/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ mod vector;
1313
mod arrow;
1414
#[cfg(feature = "vtab-arrow")]
1515
pub use self::arrow::arrow_ffi_to_query_params;
16+
pub use self::arrow::record_batch_to_duckdb_data_chunk;
1617
#[cfg(feature = "vtab-excel")]
1718
mod excel;
1819

0 commit comments

Comments
 (0)