Skip to content

Commit 84a3da0

Browse files
authored
Max rows per file (#28)
* Issue #27: split into multiple files of max rows * shuffle and tests * tests
1 parent 2d73201 commit 84a3da0

4 files changed

Lines changed: 240 additions & 39 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "verticareader"
3-
version = "2.0.0"
3+
version = "2.1.0"
44
authors = ["Joey Gibson <joey@joeygibson.com>"]
55
edition = "2018"
66
description = "A program to read Vertica native binary files and convert them to CSV."

src/args.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ pub struct Args {
5555
/// Prefix hex strings with 0x
5656
#[arg(short = 'H', long)]
5757
pub hex_prefix: bool,
58+
59+
/// Maximum rows per file
60+
#[arg(short, long, default_value_t = usize::MAX, hide_default_value=true)]
61+
pub max_rows: usize,
5862
}
5963

6064
impl Args {
@@ -70,8 +74,9 @@ impl Args {
7074
is_json: false,
7175
is_json_lines: false,
7276
is_gzip: false,
73-
limit: 5_usize,
77+
limit: usize::MAX,
7478
hex_prefix: false,
79+
max_rows: usize::MAX,
7580
}
7681
}
7782

@@ -87,8 +92,9 @@ impl Args {
8792
is_json: false,
8893
is_json_lines: false,
8994
is_gzip: false,
90-
limit: 5_usize,
95+
limit: usize::MAX,
9196
hex_prefix: false,
97+
max_rows: usize::MAX,
9298
}
9399
}
94100
}

0 commit comments

Comments
 (0)