From ebde4a30120658e0df9bc7db8e6b2e1f15003f56 Mon Sep 17 00:00:00 2001 From: Trent Hauck Date: Mon, 6 Nov 2023 11:15:03 -0800 Subject: [PATCH] build: update exon (#67) --- Cargo.toml | 6 +++--- src/bcf_reader.rs | 2 +- src/execution_result.rs | 1 + src/exon_reader.rs | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0e4a23e..59cabe5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,9 @@ crate-type = ["cdylib"] name = "biobear" [dependencies] -arrow = {version = "46", features = ["pyarrow"]} -datafusion = "31" -exon = {version = "0.3.4-beta.3", features = ["all"]} +arrow = {version = "47", features = ["pyarrow"]} +datafusion = "32" +exon = {version = "0.3.8-beta.4", features = ["all"]} pyo3 = "0.19" thiserror = "1.0" tokio = {version = "1", features = ["rt"]} diff --git a/src/bcf_reader.rs b/src/bcf_reader.rs index 7565478..77f3569 100644 --- a/src/bcf_reader.rs +++ b/src/bcf_reader.rs @@ -64,7 +64,7 @@ impl BCFIndexedReader { config = config.with_batch_size(batch_size); } - let ctx = SessionContext::with_config(config); + let ctx = SessionContext::new_with_config(config); let df = self._runtime.block_on(async { match ctx.query_bcf_file(self.path.as_str(), region).await { diff --git a/src/execution_result.rs b/src/execution_result.rs index f64c9ef..30eac01 100644 --- a/src/execution_result.rs +++ b/src/execution_result.rs @@ -56,6 +56,7 @@ impl PyExecutionResult { Python::with_gil(|py| { // Instantiate pyarrow Table object and use its from_batches method let table_class = py.import("pyarrow")?.getattr("Table")?; + let args = PyTuple::new(py, &[batches]); let table: PyObject = table_class.call_method1("from_batches", args)?.into(); Ok(table) diff --git a/src/exon_reader.rs b/src/exon_reader.rs index afa7cda..3917c45 100644 --- a/src/exon_reader.rs +++ b/src/exon_reader.rs @@ -18,7 +18,7 @@ use std::sync::Arc; use arrow::ffi_stream::{export_reader_into_raw, ArrowArrayStreamReader, FFI_ArrowArrayStream}; use arrow::pyarrow::IntoPyArrow; -use datafusion::common::FileCompressionType; +use datafusion::datasource::file_format::file_compression_type::FileCompressionType; use datafusion::prelude::{SessionConfig, SessionContext}; use exon::datasources::ExonFileType; use exon::ffi::DataFrameRecordBatchStream;