Skip to content
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

add param validation for datafusion-cli #284

Merged
merged 3 commits into from
May 8, 2021

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented May 7, 2021

Which issue does this PR close?

Closes #283.

Rationale for this change

More specific error messages help users understand how to fix the problem

Are there any user-facing changes?

better error messages

@jimexist
Copy link
Member Author

jimexist commented May 7, 2021

❯ cargo run --release --bin datafusion-cli -- -p 123
    Finished release [optimized] target(s) in 0.24s
     Running `target/release/datafusion-cli -p 123`
error: Invalid value for '--data-path <data-path>': Invalid data directory “123”

@jimexist
Copy link
Member Author

jimexist commented May 7, 2021

❯ cargo run --release --bin datafusion-cli -- -c 0
    Finished release [optimized] target(s) in 0.20s
     Running `target/release/datafusion-cli -c 0`
error: Invalid value for '--batch-size <batch-size>': Invalid batch size “0”

@jimexist
Copy link
Member Author

jimexist commented May 7, 2021

need to fix #286 first

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jimexist -- this looks great!

datafusion-cli/src/main.rs Outdated Show resolved Hide resolved
datafusion-cli/src/main.rs Outdated Show resolved Hide resolved
jimexist and others added 2 commits May 8, 2021 10:29
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@codecov-commenter
Copy link

Codecov Report

Merging #284 (8ed8fe7) into master (b8805d4) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #284      +/-   ##
==========================================
- Coverage   76.19%   76.16%   -0.03%     
==========================================
  Files         140      140              
  Lines       23595    23603       +8     
==========================================
  Hits        17978    17978              
- Misses       5617     5625       +8     
Impacted Files Coverage Δ
datafusion-cli/src/main.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8805d4...8ed8fe7. Read the comment docs.

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jimexist . This looks good. 👍

@Dandandan Dandandan merged commit a947f11 into apache:master May 8, 2021
@Dandandan
Copy link
Contributor

Thanks @jimexist !!

@jimexist jimexist deleted the validate-datafusion-cli branch May 8, 2021 07:16
@houqp houqp added datafusion Changes in the datafusion crate enhancement New feature or request labels Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add param validation for datafusion-cli
6 participants