From 7124770ba3271b6b8437de4c52722941483601f4 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Wed, 4 Jan 2023 18:16:31 +0000 Subject: [PATCH] Fix benchmarks --- benchmarks/src/bin/tpch.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/benchmarks/src/bin/tpch.rs b/benchmarks/src/bin/tpch.rs index a4e144d28dec..63eb9127ece8 100644 --- a/benchmarks/src/bin/tpch.rs +++ b/benchmarks/src/bin/tpch.rs @@ -827,6 +827,7 @@ mod tests { #[cfg(feature = "ci")] mod ci { use super::*; + use arrow::datatypes::{DataType, Field}; use datafusion_proto::bytes::{logical_plan_from_bytes, logical_plan_to_bytes}; async fn serde_round_trip(query: usize) -> Result<()> { @@ -1213,7 +1214,8 @@ mod ci { } fn get_tpch_data_path() -> Result { - let path = std::env::var("TPCH_DATA").unwrap_or("benchmarks/data".to_string()); + let path = + std::env::var("TPCH_DATA").unwrap_or_else(|_| "benchmarks/data".to_string()); if !Path::new(&path).exists() { return Err(DataFusionError::Execution(format!( "Benchmark data not found (set TPCH_DATA env var to override): {}",