-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow datafusion-cli to take a file param #285
Conversation
Codecov Report
@@ Coverage Diff @@
## master #285 +/- ##
==========================================
- Coverage 76.16% 76.07% -0.10%
==========================================
Files 140 140
Lines 23603 23632 +29
==========================================
Hits 17978 17978
- Misses 5625 5654 +29
Continue to review full report at Codecov.
|
|
|
24ba9a0
to
5582f18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jimexist ! This is a great feature to add.
I think there is a bug in error handling for files, but otherwise this looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
And thanks lot for taking each of these separately, really easy to follow 💯
ExecutionContext::with_config(execution_config.with_information_schema(true)); | ||
if let Some(file_path) = matches.value_of("file") { | ||
let file = File::open(file_path) | ||
.unwrap_or_else(|err| panic!("cannot open file '{}': {}", file_path, err)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example error for when file is not readable
❯ cargo run --release --bin datafusion-cli -q -- -f ./1.sql
thread 'main' panicked at 'cannot open file './1.sql': Permission denied (os error 13)', datafusion-cli/src/main.rs:82:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
0789a4f
to
e57ecce
Compare
Looks really good -- thanks @jimexist |
Which issue does this PR close?
Closes #282.
Relies on #283
Rationale for this change
Allow datafusion-cli to take file as a param.
What changes are included in this PR?
See above
Are there any user-facing changes?
User facing changes are the sole addition of such flag.