Skip to content

Commit

Permalink
Rip out table -> stream (more or less useless given memory requirements)
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Plus-Time committed Sep 1, 2023
1 parent c262267 commit d6c4b9d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/arrow2/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,6 @@ pub async fn read_parquet_stream(
Ok(wasm_streams::ReadableStream::from_stream(stream).into_raw())
}

#[wasm_bindgen(js_name = "writeParquetStream")]
#[cfg(all(feature = "writer", feature = "async"))]
pub fn write_parquet_stream(
table: Table,
writer_properties: Option<crate::arrow2::writer_properties::WriterProperties>,
) -> WasmResult<wasm_streams::readable::sys::ReadableStream> {
use futures::StreamExt;
let (schema, chunks) = table.into_inner();
let batches = futures::stream::iter(chunks.into_iter())
.map(move |chunk| arrow_wasm::arrow2::RecordBatch::new(schema.clone(), chunk));
let output_stream = super::writer_async::transform_parquet_stream(
batches,
writer_properties.unwrap_or_default(),
);
Ok(output_stream?)
}

#[wasm_bindgen(js_name = "transformParquetStream")]
#[cfg(all(feature = "writer", feature = "async"))]
pub fn transform_parquet_stream(
Expand Down

0 comments on commit d6c4b9d

Please sign in to comment.