Skip to content

Add missing type annotation#7326

Merged
mbrobbel merged 1 commit into
apache:mainfrom
mbrobbel:type-annotation
Mar 25, 2025
Merged

Add missing type annotation#7326
mbrobbel merged 1 commit into
apache:mainfrom
mbrobbel:type-annotation

Conversation

@mbrobbel
Copy link
Copy Markdown
Member

Which issue does this PR close?

error[E0282]: type annotations needed
   --> .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parquet-54.3.0/src/arrow/schema/primitive.rs:117:49
    |
117 |     if precision <= DECIMAL128_MAX_PRECISION as _ {
    |                                                 ^ cannot infer type

For more information about this error, try `rustc --explain E0282`.
error: could not compile `parquet` (lib) due to 1 previous error

Rationale for this change

I'm not sure why rustc fails to infer the type here. This showed up after updating parquet to 0.54.3 (as a dependency of a different crate).

What changes are included in this PR?

Add type annotation.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the parquet Changes to the parquet crate label Mar 24, 2025
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Mar 25, 2025

maybe the other project uses an older rust compiler 🤔

Copy link
Copy Markdown
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.

Looks good to me

  • Possibly worth considering for #7330

@mbrobbel
Copy link
Copy Markdown
Member Author

maybe the other project uses an older rust compiler 🤔

The latest stable (1.85.1).

@mbrobbel mbrobbel merged commit f3fc890 into apache:main Mar 25, 2025
@mbrobbel mbrobbel deleted the type-annotation branch March 25, 2025 17:49
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Mar 25, 2025

Really weird

mbrobbel added a commit to mbrobbel/arrow-rs that referenced this pull request Mar 25, 2025
alamb pushed a commit that referenced this pull request Mar 26, 2025
* bugfix: correct offsets when serializing a list of fixed sized list and non-zero start offset (#7318)

* When serializing fixed length arrays, adjust the offsets for writing out

* Add unit test

* clippy warnings

* Add unit test for nulls

* Update unit test to account for which schema had nulls

* Add missing type annotation (#7326)

* Update version

* Create changelog

---------

Co-authored-by: Tim Saucer <timsaucer@gmail.com>
alamb pushed a commit that referenced this pull request Mar 27, 2025
* bugfix: correct offsets when serializing a list of fixed sized list and non-zero start offset (#7318)

* When serializing fixed length arrays, adjust the offsets for writing out

* Add unit test

* clippy warnings

* Add unit test for nulls

* Update unit test to account for which schema had nulls

* Add missing type annotation (#7326)

* Update version

* Create changelog

---------

Co-authored-by: Matthijs Brobbel <m1brobbel@gmail.com>
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.

2 participants