-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: vortex CLI convert parquet to Vortex #2649
Conversation
@@ -19,12 +19,19 @@ use vortex::file::VortexWriteOptions; | |||
use vortex::stream::{ArrayStream, ArrayStreamArrayExt}; | |||
use vortex::{Array, ArrayRef}; | |||
|
|||
#[derive(Default)] | |||
pub struct Flags { | |||
pub quiet: bool, |
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.
Isn't it usually the other way around?!
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.
I think usually you want the print. See curl or wget for example
vortex-tui/src/convert.rs
Outdated
); | ||
pub async fn exec_convert(input_path: impl AsRef<Path>, flags: Flags) -> VortexResult<()> { | ||
if !flags.quiet { | ||
println!( |
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.
Maybe eprintln!
for batch in reader.by_ref() { | ||
let batch = ArrowStructArray::from(batch?); | ||
let next_chunk = ArrayRef::from_arrow(&batch, true); | ||
chunks.push(next_chunk); |
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.
You should be able to just stream these straight into the writer without buffering everything in memory. using the row group count as your progress indicator
From our discussion earlier today