Skip to content

Commit

Permalink
Remove ffi code from this crate (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Sep 30, 2023
1 parent 84c718b commit 4f90dd6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 451 deletions.
181 changes: 0 additions & 181 deletions src/arrow1/ffi.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/arrow1/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#[cfg(feature = "reader")]
pub mod reader;

pub mod ffi;

pub mod wasm;

#[cfg(feature = "writer")]
Expand Down
12 changes: 0 additions & 12 deletions src/arrow1/reader.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::arrow1::error::Result;
use crate::arrow1::ffi::FFIArrowTable;
use arrow_wasm::arrow1::Table;
use bytes::Bytes;
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
Expand All @@ -22,14 +21,3 @@ pub fn read_parquet(parquet_file: Vec<u8>) -> Result<Table> {

Ok(Table::new(batches))
}

pub fn read_parquet_ffi(parquet_file: Vec<u8>) -> Result<FFIArrowTable> {
// Create Parquet reader
let cursor: Bytes = parquet_file.into();
let builder = ParquetRecordBatchReaderBuilder::try_new(cursor).unwrap();

// Create Arrow reader
let reader = builder.build().unwrap();

FFIArrowTable::try_from_iterator(reader)
}
Loading

0 comments on commit 4f90dd6

Please sign in to comment.