Skip to content

Remove standalone long-deprecated APIs - #11957

Draft
Rich-T-kid wants to merge 3 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/remove-old-deprecations
Draft

Rich-T-kid wants to merge 3 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/remove-old-deprecations

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Arrow 61 is the next breaking release. This removes standalone APIs deprecated before the last three major releases (58 through 60) that already have supported replacements.

The deprecation policy keeps deprecated APIs for at least two major releases. The newest API removed here was deprecated in 57.0.0 and has remained available through Arrow 58, 59, and 60.

The older dict_id APIs and Parquet BIT_PACKED remain: removing dict_id requires the IPC schema work tracked by #5981, while BIT_PACKED is still needed to decode legacy Parquet data.

What changes are included in this PR?

  • Remove FixedSizeBinaryArray::try_from_sparse_iter, deprecated since 28.0.0. TryFrom<Vec<Option<&[u8]>>> now infers the width and delegates to try_from_sparse_iter_with_size while preserving the existing empty-input error.
  • Remove the ignored capacity argument from NullArray::builder, documented as deprecated since 52.0.0.
  • Remove DictionaryTracker::insert, deprecated since 56.1.0 in favor of insert_column.
  • Remove IpcDataGenerator::encoded_batch, deprecated since 57.0.0 in favor of encode.
  • Remove the module-level ENUM_MIN_*, ENUM_MAX_*, and ENUM_VALUES_* globals generated for 15 IPC enum types, deprecated since 2.0.0:
    • Message.rs: CompressionType, BodyCompressionMethod, and MessageHeader.
    • Schema.rs: MetadataVersion, Feature, UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit, Type, DictionaryKind, and Endianness.
    • SparseTensor.rs: SparseMatrixCompressedAxis and SparseTensorIndex.

The corresponding Type::ENUM_MIN, Type::ENUM_MAX, and Type::ENUM_VALUES associated constants remain available.

Are these changes tested?

The workspace tests and doctests pass. The Arrow Array and IPC all-feature suites and all-target/all-feature Clippy checks also pass.

Are there any significant user-facing changes?

This removes public compatibility APIs deprecated before Arrow 58. NullArray::builder now takes no capacity argument.

@Rich-T-kid Rich-T-kid added the api-change Breaking API change, needs to wait for a major version release label Oct 28, 2026
@github-actions github-actions Bot added arrow-ipc arrow-ipc crate arrow-core Core crates related to representing arrow data labels Oct 28, 2026
@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/remove-old-deprecations branch from c39ed9d to 6786552 Compare October 28, 2026 05:04
Remove the fixed-size binary sparse iterator constructor deprecated in 28.0.0 and the generated IPC enum globals deprecated in 2.0.0. Their supported replacements remain available.
@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/remove-old-deprecations branch from 6786552 to 8a60084 Compare October 28, 2026 05:13
@Rich-T-kid
Rich-T-kid marked this pull request as ready for review October 28, 2026 20:02

@etseidl etseidl 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.

Thanks for the housekeeping @Rich-T-kid! 🧹

Just a couple of nits my agent brought up. Take with a grain of salt.

Comment on lines -30 to -34
#[deprecated(
since = "2.0.0",
note = "Use associated constants instead. This will no longer be generated in 2021."
)]
pub const ENUM_MIN_COMPRESSION_TYPE: i8 = 0;

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.

My bot points out it seems these are produced by flatc, so if these files are regenerated the deprecated constants will reappear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will keep in mind

@Rich-T-kid Rich-T-kid added the next-major-release the PR has API changes and it waiting on the next major version label Oct 30, 2026
@alamb

alamb commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

I think we are planning a 60.2 release

So maybe we should only remove stuff that should be removed up to 60

@alamb

alamb commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Thank you for this housecleaning, @Rich-T-kid

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

I think we are planning a 60.2 release

So maybe we should only remove stuff that should be removed up to 60

doesn't it need to be the next breaking release? I was planning to have this shipped in arrow 61.0.0

@alamb

alamb commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

doesn't it need to be the next breaking release? I was planning to have this shipped in arrow 61.0.0

Got it -- makes sense. I also see you added the appropriate labels

Thank you

@alamb alamb 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.

Makes sense to me

The supported sparse iterator constructor uses infallible buffer allocation. Document that allocation failure can panic now that the older fallible constructor is being removed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Breaking API change, needs to wait for a major version release arrow-core Core crates related to representing arrow data arrow-ipc arrow-ipc crate next-major-release the PR has API changes and it waiting on the next major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove standalone APIs deprecated before the last three major releases

3 participants