Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ include = ["/src", "/datafusion", "/LICENSE.txt", "pyproject.toml", "Cargo.toml"
[features]
default = ["mimalloc"]
protoc = [ "datafusion-substrait/protoc" ]
substrait = ["dep:datafusion-substrait"]

[dependencies]
tokio = { version = "1.24", features = ["macros", "rt", "rt-multi-thread", "sync"] }
Expand All @@ -41,7 +42,7 @@ datafusion-common = { version = "32.0.0", features = ["pyarrow"] }
datafusion-expr = { version = "32.0.0" }
datafusion-optimizer = { version = "32.0.0" }
datafusion-sql = { version = "32.0.0" }
datafusion-substrait = { version = "32.0.0" }
datafusion-substrait = { version = "32.0.0", optional = true }
prost = "0.11"
prost-types = "0.11"
uuid = { version = "1.3", features = ["v4"] }
Expand Down
1 change: 0 additions & 1 deletion conda/recipes/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ requirements:
- {{ compiler('rust') }}
- cargo-bundle-licenses
- maturin >=0.15,<0.16
- libprotobuf =3
host:
- python
- maturin >=0.15,<0.16
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ include = [
exclude = [".github/**", "ci/**", ".asf.yaml"]
# Require Cargo.lock is up to date
locked = true
features = ["substrait"]
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ pub use datafusion_common;
pub use datafusion_expr;
pub use datafusion_optimizer;
pub use datafusion_sql;

#[cfg(feature = "substrait")]
pub use datafusion_substrait;

#[allow(clippy::borrow_deref_ref)]
Expand All @@ -48,6 +50,8 @@ mod pyarrow_filter_expression;
mod record_batch;
pub mod sql;
pub mod store;

#[cfg(feature = "substrait")]
pub mod substrait;
#[allow(clippy::borrow_deref_ref)]
mod udaf;
Expand Down Expand Up @@ -108,8 +112,11 @@ fn _internal(py: Python, m: &PyModule) -> PyResult<()> {
m.add_submodule(store)?;

// Register substrait as a submodule
#[cfg(feature = "substrait")]
let substrait = PyModule::new(py, "substrait")?;
#[cfg(feature = "substrait")]
substrait::init_module(substrait)?;
#[cfg(feature = "substrait")]
m.add_submodule(substrait)?;

Ok(())
Expand Down