alamb opened a new pull request, #8544: URL: https://github.com/apache/arrow-datafusion/pull/8544
## Which issue does this PR close? Closes https://github.com/apache/arrow-datafusion/issues/8541 (I think) ## Rationale for this change @andygrove got an error when running sqllogictest, which I think was something related to his system setup (e.g. there was some filesystem error) but the error message was unhelpful ## What changes are included in this PR? 1. Added error handling rather than `panic` ## Before this PR We get a somewhat unhelpful panic message about "Readable directory" ``` andrewlamb@Andrews-MacBook-Pro:~/Software/arrow-datafusion$ cargo test --test sqllogictests Finished test [unoptimized + debuginfo] target(s) in 0.13s Running bin/sqllogictests.rs (target/debug/deps/sqllogictests-a4acaa02cc91a4e3) thread 'main' panicked at datafusion/sqllogictest/bin/sqllogictests.rs:264:14: Readable directory: Os { code: 2, kind: NotFound, message: "No such file or directory" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace error: test failed, to rerun pass `-p datafusion-sqllogictest --test sqllogictests` ``` ## After this PR The error I think is quite a but clearer ``` andrewlamb@Andrews-MacBook-Pro:~/Software/arrow-datafusion$ cargo test --test sqllogictests Compiling datafusion-sqllogictest v34.0.0 (/Users/andrewlamb/Software/arrow-datafusion/datafusion/sqllogictest) Finished test [unoptimized + debuginfo] target(s) in 0.94s Running bin/sqllogictests.rs (target/debug/deps/sqllogictests-a4acaa02cc91a4e3) Error: Execution("Error reading directory \"test_files/\": No such file or directory (os error 2)") error: test failed, to rerun pass `-p datafusion-sqllogictest --test sqllogictests` Caused by: process didn't exit successfully: `/Users/andrewlamb/Software/arrow-datafusion/target/debug/deps/sqllogictests-a4acaa02cc91a4e3` (exit status: 1) ``` ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 3. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> -- 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]
