alamb commented on a change in pull request #8760:
URL: https://github.com/apache/arrow/pull/8760#discussion_r534323934
##########
File path: rust/benchmarks/src/bin/tpch.rs
##########
@@ -353,3 +353,36 @@ fn get_schema(table: &str) -> Schema {
_ => unimplemented!(),
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use std::env;
+
+ #[tokio::test]
+ async fn q1() -> Result<()> {
+ verify_query(1).await
+ }
+
+ #[tokio::test]
+ async fn q12() -> Result<()> {
+ verify_query(12).await
+ }
+
+ async fn verify_query(n: usize) -> Result<()> {
+ if let Ok(path) = env::var("TPCH_DATA") {
+ let opt = BenchmarkOpt {
+ query: n,
+ debug: false,
+ iterations: 1,
+ concurrency: 2,
+ batch_size: 4096,
+ path: PathBuf::from(path),
+ file_format: "tbl".to_string(),
+ mem_table: false,
+ };
+ benchmark(opt).await?
+ }
+ Ok(())
Review comment:
```suggestion
} else {
println!("TPCH_DATA environment variable not set, skipping test")
}
Ok(())
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]