Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-12335: [Rust] [Ballista] Use latest DataFusion #9991

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
save
  • Loading branch information
andygrove committed Apr 14, 2021
commit b1e5ec6f969e7195322ec6593fe0d55c18285599
7 changes: 3 additions & 4 deletions rust/ballista/rust/benchmarks/tpch/Cargo.toml
Original file line number Diff line number Diff line change
@@ -27,10 +27,9 @@ edition = "2018"
[dependencies]
ballista = { path="../../client" }

arrow = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
datafusion = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
parquet = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }

arrow = { path = "../../../../arrow" }
datafusion = { path = "../../../../datafusion" }
parquet = { path = "../../../../parquet" }

env_logger = "0.8"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] }
5 changes: 3 additions & 2 deletions rust/ballista/rust/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -30,5 +30,6 @@ ballista-core = { path = "../core" }
futures = "0.3"
log = "0.4"
tokio = "1.0"
arrow = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
datafusion = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }

arrow = { path = "../../../arrow" }
datafusion = { path = "../../../datafusion" }
7 changes: 4 additions & 3 deletions rust/ballista/rust/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -39,9 +39,10 @@ sqlparser = "0.8"
tokio = "1.0"
tonic = "0.4"
uuid = { version = "0.8", features = ["v4"] }
arrow = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
arrow-flight = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
datafusion = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }

arrow = { path = "../../../arrow" }
arrow-flight = { path = "../../../arrow-flight" }
datafusion = { path = "../../../datafusion" }


[dev-dependencies]
6 changes: 3 additions & 3 deletions rust/ballista/rust/executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -45,9 +45,9 @@ tokio-stream = "0.1"
tonic = "0.4"
uuid = { version = "0.8", features = ["v4"] }

arrow = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
arrow-flight = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
datafusion = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
arrow = { path = "../../../arrow" }
arrow-flight = { path = "../../../arrow-flight" }
datafusion = { path = "../../../datafusion" }

[dev-dependencies]

4 changes: 2 additions & 2 deletions rust/ballista/rust/scheduler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -52,8 +52,8 @@ tonic = "0.4"
tower = { version = "0.4" }
warp = "0.3"

arrow = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
datafusion = { git = "https://github.com/apache/arrow", rev="f1f4f2b" }
arrow = { path = "../../../arrow" }
datafusion = { path = "../../../datafusion" }

[dev-dependencies]
ballista-core = { path = "../core" }
10 changes: 9 additions & 1 deletion rust/ballista/rust/scheduler/src/planner.rs
Original file line number Diff line number Diff line change
@@ -35,9 +35,12 @@ use ballista_core::{
serde::scheduler::PartitionLocation,
};
use datafusion::execution::context::ExecutionContext;
use datafusion::physical_optimizer::coalesce_batches::CoalesceBatches;
use datafusion::physical_optimizer::optimizer::PhysicalOptimizerRule;
use datafusion::physical_plan::hash_aggregate::{AggregateMode, HashAggregateExec};
use datafusion::physical_plan::hash_join::HashJoinExec;
use datafusion::physical_plan::merge::MergeExec;
use datafusion::physical_optimizer::merge_exec::AddMergeExec;
use datafusion::physical_plan::ExecutionPlan;
use log::{debug, info};
use tokio::task::JoinHandle;
@@ -136,7 +139,12 @@ impl DistributedPlanner {
}

if let Some(adapter) = execution_plan.as_any().downcast_ref::<DFTableAdapter>() {
let ctx = ExecutionContext::new();
let rules: Vec<Arc<dyn PhysicalOptimizerRule + Send + Sync>> = vec![
Arc::new(CoalesceBatches::new()),
Arc::new(AddMergeExec::new()),
];
let mut ctx = ExecutionContext::new();
let ctx = ctx.with_physical_optimizers(rules);
Ok((ctx.create_physical_plan(&adapter.logical_plan)?, stages))
} else if let Some(merge) = execution_plan.as_any().downcast_ref::<MergeExec>() {
let query_stage = create_query_stage(