Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Use PARQUET_TEST_DATA env var
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Jan 29, 2020
1 parent 260f9ca commit 996f2a4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rust/datafusion/examples/flight-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,15 @@ impl FlightService for FlightServiceImpl {
// create local execution context
let mut ctx = ExecutionContext::new();

ctx.register_parquet("alltypes_plain", "alltypes_plain.snappy.parquet")
.unwrap();
let testdata = std::env::var("PARQUET_TEST_DATA")
.expect("PARQUET_TEST_DATA not defined");

// register parquet file with the execution context
ctx.register_parquet(
"alltypes_plain",
&format!("{}/alltypes_plain.parquet", testdata),
)
.map_err(|e| to_tonic_err(&e))?;

// create the query plan
let plan = ctx
Expand Down

0 comments on commit 996f2a4

Please sign in to comment.