Skip to content
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 parquet clippy lints (#1254) #2377

Merged
merged 3 commits into from
Aug 8, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Aug 8, 2022

Which issue does this PR close?

Closes #1254

Rationale for this change

Clippy generally has good advice

What changes are included in this PR?

This fixes a number of the clippy lints, with localised suppression in the cases where fixing would result in a breaking API change

Are there any user-facing changes?

No

@github-actions github-actions bot added the parquet Changes to the parquet crate label Aug 8, 2022
@@ -229,88 +223,3 @@ impl<I: Iterator<Item = Vec<Page>> + Send> PageIterator for InMemoryPageIterator
Ok(self.column_desc.clone())
}
}

pub fn make_pages<T: DataType>(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is moved to rand_gen, as it made the conditional compilation easier

@@ -142,12 +142,14 @@ impl LevelEncoder {
/// Decoder for definition/repetition levels.
/// Currently only supports RLE and BIT_PACKED encoding for Data Page v1 and
/// RLE for Data Page v2.
#[allow(unused)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly this is never actually used anywhere 😅

use std::sync::Arc;

use crate::errors::Result;
use std::marker::PhantomData;

#[cfg(test)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of gross, but I hope to remove this module eventually #1661

) -> Self {
Self {
key_reader,
value_reader,
data_type,
map_def_level: rep_level,
map_rep_level: def_level,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct, but changing it caused the tests to fail...

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only fixes lint errors. lgtm

@tustvold tustvold merged commit 80a6ef7 into apache:master Aug 8, 2022
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

200

@ursabot
Copy link

ursabot commented Aug 8, 2022

Benchmark runs are scheduled for baseline = 613b99d and contender = 80a6ef7. 80a6ef7 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

mcheshkov added a commit to cube-js/arrow-rs that referenced this pull request Aug 27, 2024
Can drop this after rebase on commit 80a6ef7 "Fix parquet clippy lints (apache#1254) (apache#2377)", first released in 21.0.0
mcheshkov added a commit to cube-js/arrow-rs that referenced this pull request Aug 27, 2024
Can drop this after rebase on commit 80a6ef7 "Fix parquet clippy lints (apache#1254) (apache#2377)", first released in 21.0.0
mcheshkov added a commit to cube-js/arrow-rs that referenced this pull request Sep 5, 2024
Can drop this after rebase on commit 80a6ef7 "Fix parquet clippy lints (apache#1254) (apache#2377)", first released in 21.0.0
mcheshkov added a commit to cube-js/arrow-rs that referenced this pull request Sep 5, 2024
Can drop this after rebase on commit 80a6ef7 "Fix parquet clippy lints (apache#1254) (apache#2377)", first released in 21.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix all clippy lints in parquet crate
4 participants