-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add a --limit option to read-table-multi-threaded #297
Add a --limit option to read-table-multi-threaded #297
Conversation
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.
lgtm! was trying to come up with a way to simplify that section going through the record batches and limiting/truncating/counting rows but couldn't come up with anything else
|
||
/// Limit to printing only LIMIT rows. | ||
#[arg(short, long)] | ||
limit: Option<usize>, |
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.
out of curiosity why usize instead of u64?
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.
oh i suppose slice/take/etc for iterators take usize. interesting though since i feel like this communicates length but i always associate usize with indexes
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.
yeah. I had it as a u32, but then I'd just have to cast it below, so I figured make it a usize here
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.
one unrelated q
return Ok((Box::new(store), path)); | ||
Ok((Box::new(store), path)) |
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.
do we have linting in ci to make committing this impossible in the first place?
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.
we do, we run rustfmt and clippy. surprised clippy didn't catch this..?
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.
Thanks for reminding me! It's because our CI didn't run clippy with --all-features
so it wasn't checking this (it's behind the cloud
feature.
I've updated the workflow file now to run with --all-features
. Hopefully that's uncontroversial :)
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.
nice thanks :)
Arrow printing is actually really slow, so for a big table it's useful to be able to just print a few rows and the total count, for testing, or to get a sense of how fast kernel