Skip to content

Commit

Permalink
feat: make record_batch_to_chunk public (#144)
Browse files Browse the repository at this point in the history
* feat: make record_batch_to_chunk public

* docs: add docstring
  • Loading branch information
tshauck authored Mar 29, 2023
1 parent bc5844b commit 7ceaa5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vtab/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ pub fn to_duckdb_logical_type(data_type: &DataType) -> Result<LogicalType, Box<d
}
}

/// Converts a `RecordBatch` to a `DataChunk` in the DuckDB format.
///
/// # Arguments
///
/// * `batch` - A reference to the `RecordBatch` to be converted to a `DataChunk`.
/// * `chunk` - A mutable reference to the `DataChunk` to store the converted data.
/// ```
pub fn record_batch_to_duckdb_data_chunk(
batch: &RecordBatch,
chunk: &mut DataChunk,
Expand Down
1 change: 1 addition & 0 deletions src/vtab/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mod vector;
mod arrow;
#[cfg(feature = "vtab-arrow")]
pub use self::arrow::arrow_ffi_to_query_params;
pub use self::arrow::record_batch_to_duckdb_data_chunk;
#[cfg(feature = "vtab-excel")]
mod excel;

Expand Down

0 comments on commit 7ceaa5e

Please sign in to comment.