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

minor: make Parquet CLI input args consistent #3786

Merged
merged 5 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions parquet/pytest/test_parquet_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ def get_show_filter_cli_output(output_dir, data, col_name="id"):
(parquet_file,) = sorted(pathlib.Path(output_dir).glob("*.parquet"))
args = [
"parquet-show-bloom-filter",
"--file-name",
parquet_file,
"--column",
col_name,
]
for v in data:
args.extend(["--values", v[0]])
args.extend([v[0]])
for v in data:
args.extend(["--values", v[1]])
args.extend([v[1]])
return subprocess.check_output(args)


Expand Down
2 changes: 1 addition & 1 deletion parquet/src/bin/parquet-read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use std::{fs::File, path::Path};
#[derive(Debug, Parser)]
#[clap(author, version, about("Binary file to read data from a Parquet file"), long_about = None)]
struct Args {
#[clap(short, long, help("Path to a parquet file, or - for stdin"))]
#[clap(help("Path to a parquet file, or - for stdin"))]
file_name: String,
#[clap(
short,
Expand Down
2 changes: 0 additions & 2 deletions parquet/src/bin/parquet-rowcount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ use std::{fs::File, path::Path};
#[clap(author, version, about("Binary file to return the number of rows found from Parquet file(s)"), long_about = None)]
struct Args {
#[clap(
short,
long,
number_of_values(1),
help("List of Parquet files to read from separated by space")
)]
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/bin/parquet-schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use std::{fs::File, path::Path};
#[derive(Debug, Parser)]
#[clap(author, version, about("Binary file to print the schema and metadata of a Parquet file"), long_about = None)]
struct Args {
#[clap(short, long)]
#[clap(help("Path to the parquet file"))]
file_path: String,
#[clap(short, long, help("Enable printing full file metadata"))]
verbose: bool,
Expand Down
12 changes: 3 additions & 9 deletions parquet/src/bin/parquet-show-bloom-filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! ```
//! After this `parquet-show-bloom-filter` should be available:
//! ```
//! parquet-show-bloom-filter --file-name XYZ.parquet --column id --values a
//! parquet-show-bloom-filter XYZ.parquet id a
//! ```
//!
//! The binary can also be built from the source code and run as follows:
Expand All @@ -44,17 +44,11 @@ use std::{fs::File, path::Path};
#[derive(Debug, Parser)]
#[clap(author, version, about("Binary file to read bloom filter data from a Parquet file"), long_about = None)]
struct Args {
#[clap(short, long, help("Path to the parquet file"))]
#[clap(help("Path to the parquet file"))]
file_name: String,
#[clap(
short,
long,
help("Check the bloom filter indexes for the given column")
)]
#[clap(help("Check the bloom filter indexes for the given column"))]
column: String,
#[clap(
short,
long,
help("Check if the given values match bloom filter, the values will be evaluated as strings"),
required = true
)]
Expand Down