Skip to content

Commit

Permalink
enable dataframe streaming across FFI
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Oct 31, 2024
1 parent 962b7de commit d60c862
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions rerun_py/src/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,21 +737,12 @@ impl PyRecordingView {
let metadata = schema.metadata.clone().into_iter().collect();
let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata);

// TODO(jleibs): Need to keep the engine alive
/*
let reader = RecordBatchIterator::new(
query_handle
.into_batch_iter()
.map(|batch| batch.try_to_arrow_record_batch()),
std::sync::Arc::new(schema),
);
*/
let batches = query_handle
.into_batch_iter()
.map(|batch| batch.try_to_arrow_record_batch())
.collect::<Vec<_>>();

let reader = RecordBatchIterator::new(batches.into_iter(), std::sync::Arc::new(schema));

Ok(PyArrowType(Box::new(reader)))
}
Expand Down Expand Up @@ -829,21 +820,12 @@ impl PyRecordingView {
let metadata = schema.metadata.clone().into_iter().collect();
let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata);

// TODO(jleibs): Need to keep the engine alive
/*
let reader = RecordBatchIterator::new(
query_handle
.into_batch_iter()
.map(|batch| batch.try_to_arrow_record_batch()),
std::sync::Arc::new(schema),
);
*/
let batches = query_handle
.into_batch_iter()
.map(|batch| batch.try_to_arrow_record_batch())
.collect::<Vec<_>>();

let reader = RecordBatchIterator::new(batches.into_iter(), std::sync::Arc::new(schema));

Ok(PyArrowType(Box::new(reader)))
}
Expand Down

0 comments on commit d60c862

Please sign in to comment.