diff --git a/rust/arrow-flight/src/arrow.flight.protocol.rs b/rust/arrow-flight/src/arrow.flight.protocol.rs index 871eb506b26..1ede9c5f269 100644 --- a/rust/arrow-flight/src/arrow.flight.protocol.rs +++ b/rust/arrow-flight/src/arrow.flight.protocol.rs @@ -498,8 +498,9 @@ pub mod flight_service_server { #[async_trait] pub trait FlightService: Send + Sync + 'static { #[doc = "Server streaming response type for the Handshake method."] - type HandshakeStream: Stream> - + Send + type HandshakeStream: Stream< + Item = Result, + > + Send + Sync + 'static; #[doc = ""] diff --git a/rust/benchmarks/Cargo.toml b/rust/benchmarks/Cargo.toml index 6017d88e1e0..617c1c5d02b 100644 --- a/rust/benchmarks/Cargo.toml +++ b/rust/benchmarks/Cargo.toml @@ -31,4 +31,5 @@ parquet = { path = "../parquet" } datafusion = { path = "../datafusion" } structopt = { version = "0.3", default-features = false } tokio = { version = "0.2", features = ["macros", "rt-core", "rt-threaded"] } -futures = "0.3" \ No newline at end of file +futures = "0.3" +env_logger = "^0.8" \ No newline at end of file diff --git a/rust/benchmarks/src/bin/tpch.rs b/rust/benchmarks/src/bin/tpch.rs index b78ea626bf4..6c5d06cf37f 100644 --- a/rust/benchmarks/src/bin/tpch.rs +++ b/rust/benchmarks/src/bin/tpch.rs @@ -109,6 +109,8 @@ async fn main() -> Result<()> { } async fn benchmark(opt: BenchmarkOpt) -> Result<()> { + env_logger::init(); + println!("Running benchmarks with the following options: {:?}", opt); let config = ExecutionConfig::new() .with_concurrency(opt.concurrency) diff --git a/rust/datafusion/Cargo.toml b/rust/datafusion/Cargo.toml index 3108f0c5cee..8148565cb7e 100644 --- a/rust/datafusion/Cargo.toml +++ b/rust/datafusion/Cargo.toml @@ -60,6 +60,7 @@ async-trait = "0.1.41" futures = "0.3" pin-project-lite= "^0.2.0" tokio = { version = "0.2", features = ["macros", "rt-core", "rt-threaded", "sync"] } +log = "^0.4" [dev-dependencies] rand = "0.7" diff --git a/rust/datafusion/src/execution/context.rs b/rust/datafusion/src/execution/context.rs index 33d84e1c310..eddefb11005 100644 --- a/rust/datafusion/src/execution/context.rs +++ b/rust/datafusion/src/execution/context.rs @@ -16,8 +16,8 @@ // under the License. //! ExecutionContext contains methods for registering data sources and executing queries - use crate::optimizer::hash_build_probe_order::HashBuildProbeOrder; +use log::debug; use std::fs; use std::path::Path; use std::string::String; @@ -316,9 +316,11 @@ impl ExecutionContext { /// Optimize the logical plan by applying optimizer rules pub fn optimize(&self, plan: &LogicalPlan) -> Result { // Apply standard rewrites and optimizations + debug!("Logical plan:\n {:?}", plan); let mut plan = ProjectionPushDown::new().optimize(&plan)?; plan = FilterPushDown::new().optimize(&plan)?; plan = HashBuildProbeOrder::new().optimize(&plan)?; + debug!("Optimized logical plan:\n {:?}", plan); self.state .lock()