Skip to content

fix clippy in variant - #10586

Merged
Jefffrey merged 2 commits into
apache:mainfrom
alamb:alamb/fix_clippy_variant
Aug 8, 2026
Merged

Jefffrey merged 2 commits into
apache:mainfrom
alamb:alamb/fix_clippy_variant

Conversation

@alamb

@alamb alamb commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

It seems #10157 has a logical conflict with newly added clippy lints

After merging #10157 it is failing with

For example: https://github.com/apache/arrow-rs/actions/runs/31189404230/job/92902082102

warning: unnested or-patterns
    --> parquet-variant-compute/src/shred_variant.rs:3134:17
     |
3134 | /                 (Variant::Int8(_), DataType::Int8)
3135 | |                     | (Variant::Int8(_), DataType::Int16)
3136 | |                     | (Variant::Int8(_), DataType::Int32)
3137 | |                     | (Variant::Int8(_), DataType::Int64)
...    |
3228 | |                     | (Variant::String(_), DataType::LargeUtf8)
3229 | |                     | (Variant::Time(_), DataType::Time64(_))
     | |_____________________________________________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnested_or_patterns
     = note: requested on the command line with `-W clippy::unnested-or-patterns`
help: nest the patterns
     |
3134 ~                 (Variant::Int8(_) | Variant::Int16(_) | Variant::Int32(_) | Variant::Int64(_)
3135 + | Variant::Decimal4(_) | Variant::Decimal8(_) | Variant::Decimal16(_),
3136 + DataType::Int8) |
3137 + (Variant::Int8(_) | Variant::Int16(_) | Variant::Int32(_) | Variant::Int64(_)
3138 + | Variant::Decimal4(_) | Variant::Decimal8(_) | Variant::Decimal16(_),
3139 + DataType::Int16) |

What changes are included in this PR?

Do what clippy says (just accept its suggestion)

Are these changes tested?

By CI

Are there any user-facing changes?

@github-actions github-actions Bot added the parquet-variant parquet-variant* crates label Aug 7, 2026
@sdf-jkl

sdf-jkl commented Aug 7, 2026

Copy link
Copy Markdown
Member

🙏

@Rich-T-kid Rich-T-kid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@Jefffrey Jefffrey added the development-process Internal changes; PRs with this label are excluded from changelog label Aug 8, 2026
@Jefffrey
Jefffrey merged commit 8a849f3 into apache:main Aug 8, 2026
19 checks passed
@Jefffrey

Jefffrey commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

thanks all

@alamb
alamb deleted the alamb/fix_clippy_variant branch August 8, 2026 12:37
MassivePizza pushed a commit to massive-com/arrow-rs that referenced this pull request Aug 19, 2026
# Which issue does this PR close?

- Related to apache#10157
# Rationale for this change

It seems apache#10157 has a logical
conflict with newly added clippy lints

After merging apache#10157 it is
failing with

For example:
https://github.com/apache/arrow-rs/actions/runs/31189404230/job/92902082102
```
warning: unnested or-patterns
    --> parquet-variant-compute/src/shred_variant.rs:3134:17
     |
3134 | /                 (Variant::Int8(_), DataType::Int8)
3135 | |                     | (Variant::Int8(_), DataType::Int16)
3136 | |                     | (Variant::Int8(_), DataType::Int32)
3137 | |                     | (Variant::Int8(_), DataType::Int64)
...    |
3228 | |                     | (Variant::String(_), DataType::LargeUtf8)
3229 | |                     | (Variant::Time(_), DataType::Time64(_))
     | |_____________________________________________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnested_or_patterns
     = note: requested on the command line with `-W clippy::unnested-or-patterns`
help: nest the patterns
     |
3134 ~                 (Variant::Int8(_) | Variant::Int16(_) | Variant::Int32(_) | Variant::Int64(_)
3135 + | Variant::Decimal4(_) | Variant::Decimal8(_) | Variant::Decimal16(_),
3136 + DataType::Int8) |
3137 + (Variant::Int8(_) | Variant::Int16(_) | Variant::Int32(_) | Variant::Int64(_)
3138 + | Variant::Decimal4(_) | Variant::Decimal8(_) | Variant::Decimal16(_),
3139 + DataType::Int16) |
```


# What changes are included in this PR?

Do what clippy says (just accept its suggestion)

# Are these changes tested?
By CI

# Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.

If there are any breaking changes to public APIs, please call them out.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Internal changes; PRs with this label are excluded from changelog parquet-variant parquet-variant* crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants