-
Notifications
You must be signed in to change notification settings - Fork 867
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
Fix some clippy lints in parquet crate, rename LevelEncoder
variants to conform to Rust standards
#1273
Fix some clippy lints in parquet crate, rename LevelEncoder
variants to conform to Rust standards
#1273
Conversation
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1273 +/- ##
==========================================
- Coverage 83.02% 83.02% -0.01%
==========================================
Files 180 180
Lines 52269 52262 -7
==========================================
- Hits 43394 43388 -6
+ Misses 8875 8874 -1
Continue to review full report at Codecov.
|
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
@HaoYang670 this PR is marked "draft" - is it ready for review? |
Yes, ready for review. |
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.
Thank you @HaoYang670
Looks really nice to me ❤️
if i % 8 == 0 { | ||
v.push(0); | ||
} | ||
if data[i] { | ||
if *item { |
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.
this type of change is not only more "idiomatic" I think it will also be faster (as bounds checks aren't being done on each access of data
👍 )
@@ -50,11 +50,11 @@ pub fn max_buffer_size( | |||
} | |||
|
|||
/// Encoder for definition/repetition levels. | |||
/// Currently only supports RLE and BIT_PACKED (dev/null) encoding, including v2. | |||
/// Currently only supports Rle and BitPacked (dev/null) encoding, including v2. | |||
pub enum LevelEncoder { |
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.
This is technically a breaking API change, but I think it is ok
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.
cc @tustvold
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.
The encodings module is experimental and so this isn't actually a breaking change. Clippy ignores proposing breaking changes to the API (at least for this lint because the salt was strong).
@@ -30,24 +30,13 @@ | |||
//! | |||
//! 3. [arrow::async_reader] for `async` reading and writing parquet | |||
//! files to Arrow `RecordBatch`es (requires the `async` feature). | |||
#![allow(incomplete_features)] | |||
#![allow(dead_code)] | |||
#![allow(non_camel_case_types)] | |||
#![allow( |
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.
🎉
LevelEncoder
variants to conform to Rust standards
Which issue does this PR close?
Re #1254. Partially close it
Rationale for this change
In this PR, we remove some disabled clippy lints and refactor the code, which includes:
What changes are included in this PR?
Are there any user-facing changes?
Some enums are renamed.