Skip to content

Commit

Permalink
Add a python feature to delta-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 committed Feb 28, 2022
1 parent 9d8a209 commit d8bf257
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ env_logger = "0"
reqwest = { version = "*", features = ["native-tls-vendored"] }
serde_json = "1"
chrono = "0"
arrow = { version = "9", features = ["pyarrow"] }

[dependencies.pyo3]
version = "0.15"
Expand All @@ -30,4 +29,4 @@ features = ["extension-module", "abi3", "abi3-py36"]
[dependencies.deltalake]
path = "../rust"
version = "0"
features = ["s3", "azure", "glue", "gcs"]
features = ["s3", "azure", "glue", "gcs", "python"]
4 changes: 2 additions & 2 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate pyo3;

use arrow::pyarrow::PyArrowConvert;
use chrono::{DateTime, FixedOffset, Utc};
use deltalake::action::Stats;
use deltalake::action::{ColumnCountStat, ColumnValueStat};
Expand Down Expand Up @@ -315,7 +314,8 @@ fn filestats_to_expression<'py>(
.field_with_name(column)
.map_err(|_| PyDeltaTableError::new_err("Partition column not found in schema"))?
.data_type()
.to_pyarrow(py)?;
.clone()
.into_py(py);
// pa.scalar(value).cast(type)
let converted_value = pa
.call_method1("scalar", (value,))?
Expand Down
1 change: 1 addition & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ s3 = ["rusoto_core/native-tls", "rusoto_credential", "rusoto_s3/native-tls", "ru
s3-rustls = ["rusoto_core/rustls", "rusoto_credential", "rusoto_s3/rustls", "rusoto_sts/rustls", "rusoto_dynamodb/rustls", "maplit", "dynamodb_lock/rustls"]
gcs = ["async-stream", "tame-gcs", "tame-oauth", "reqwest"]
glue = ["s3", "rusoto_glue"]
python = ["arrow/pyarrow"]

[build-dependencies]
glibc_version = "0"
Expand Down

0 comments on commit d8bf257

Please sign in to comment.