alamb opened a new pull request #1800:
URL: https://github.com/apache/arrow-datafusion/pull/1800


   # Which issue does this PR close?
   
   
   Closes https://github.com/apache/arrow-datafusion/issues/1799
   
    # Rationale for this change
   
   When I run the command as suggested in
   
   
https://github.com/apache/arrow-datafusion/blob/alamb%2Fbetter_bench_ux/benchmarks/README.md#L1
   
   It errors like this which does not tell me what file it is searching for so 
I don't know how to fix the problem
   
   
   ```shell
   cargo run --bin tpch -- benchmark datafusion -o /tmp -p 
~/Software/tpch_data/SF1 -q 1 --format tbl
   ...
        Running `/Users/alamb/Software/df-target/debug/tpch benchmark 
datafusion -o /tmp -p /Users/alamb/Software/tpch_data/SF1 -q 1 --format tbl`
   Running benchmarks with the following options: DataFusionBenchmarkOpt { 
query: 1, debug: false, iterations: 3, partitions: 2, batch_size: 8192, path: 
"/Users/alamb/Software/tpch_data/SF1", file_format: "tbl", mem_table: false, 
output_path: Some("/tmp") }
   [2022-02-09T18:44:26Z DEBUG datafusion::execution::memory_manager] Creating 
memory manager with initial size 11744051.2 TB
   thread 'main' panicked at 'failed to read query: Os { code: 2, kind: 
NotFound, message: "No such file or directory" }', 
benchmarks/src/bin/tpch.rs:566:42
   ...
   ```
   
   
   the issue is I am running from the `arrow-datafusion` directory but the 
program is looking for a file like `queries/1.sql` and the actual location is 
`datafusion/benchmarks/queries/1`
   
   
   
   
   # What changes are included in this PR?
   This PR adds additional searching paths for the files and produces a nicer 
error if they aren't found
   
   ## Example Error:
   
   ```
   alamb@MacBook-Pro-2 Software % ./df-target/debug/tpch  benchmark datafusion 
-o /tmp -p ~/Software/tpch_data/SF1 -q 1 --format tbl
   <mark datafusion -o /tmp -p ~/Software/tpch_data/SF1 -q 1 --format tbl
   Running benchmarks with the following options: DataFusionBenchmarkOpt { 
query: 1, debug: false, iterations: 3, partitions: 2, batch_size: 8192, path: 
"/Users/alamb/Software/tpch_data/SF1", file_format: "tbl", mem_table: false, 
output_path: Some("/tmp") }
   Error: Plan("invalid query. Could not find query: [\"queries/q1.sql: No such 
file or directory (os error 2)\", \"benchmarks/queries/q1.sql: No such file or 
directory (os error 2)\"]")
   ```
   
   # Are there any user-facing changes?
   fewer errors and better error messages
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to