Skip to content

Commit

Permalink
Max rows per file (#28)
Browse files Browse the repository at this point in the history
* Issue #27: split into multiple files of max rows

* shuffle and tests

* tests
  • Loading branch information
joeygibson authored Oct 15, 2022
1 parent 2d73201 commit 84a3da0
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "verticareader"
version = "2.0.0"
version = "2.1.0"
authors = ["Joey Gibson <[email protected]>"]
edition = "2018"
description = "A program to read Vertica native binary files and convert them to CSV."
Expand Down
10 changes: 8 additions & 2 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ pub struct Args {
/// Prefix hex strings with 0x
#[arg(short = 'H', long)]
pub hex_prefix: bool,

/// Maximum rows per file
#[arg(short, long, default_value_t = usize::MAX, hide_default_value=true)]
pub max_rows: usize,
}

impl Args {
Expand All @@ -70,8 +74,9 @@ impl Args {
is_json: false,
is_json_lines: false,
is_gzip: false,
limit: 5_usize,
limit: usize::MAX,
hex_prefix: false,
max_rows: usize::MAX,
}
}

Expand All @@ -87,8 +92,9 @@ impl Args {
is_json: false,
is_json_lines: false,
is_gzip: false,
limit: 5_usize,
limit: usize::MAX,
hex_prefix: false,
max_rows: usize::MAX,
}
}
}
Loading

0 comments on commit 84a3da0

Please sign in to comment.