Deprecate vortex-array public APIs that use the hidden LEGACY_SESSION#8269
Open
joseph-isaacs wants to merge 3 commits into
Open
Deprecate vortex-array public APIs that use the hidden LEGACY_SESSION#8269joseph-isaacs wants to merge 3 commits into
joseph-isaacs wants to merge 3 commits into
Conversation
These public methods construct an execution context from the hidden global `LEGACY_SESSION` static instead of taking an explicit `ExecutionCtx`. Mark them `#[deprecated]` so callers migrate to the context-threading APIs: - `BoolTyped::true_count` - `PrimitiveTyped::value` - `PrimitiveTyped::value_unchecked` - `from_arrow_array_with_len` Internal callers within `vortex-array` are annotated with `#[allow(deprecated)]` (mirroring the existing `IntoArrowArray` deprecation) so the crate continues to build cleanly while the deprecation surfaces at downstream call sites. Signed-off-by: Claude <noreply@anthropic.com>
The new `#[deprecated]` on `BoolTyped::true_count` made the workspace lint job (`check`, `clippy-all`, `clippy-default`) fail under `-D warnings` because `datetime-parts` and `onpair` tests still call it. Annotate those test modules with `#[allow(deprecated)]` so CI stays green; migrating them to `sum(array, ctx)` is left for the broader follow-up that removes the hidden static. Signed-off-by: Claude <noreply@anthropic.com>
Merging this PR will not alter performance
|
Instead of silencing the `BoolTyped::true_count` deprecation with `#[allow(deprecated)]`, drop the deprecated call entirely in the `datetime-parts` and `onpair` tests. Each now counts true values via `sum(array, ctx)` with an explicit `ExecutionCtx`: - `datetime-parts` compare/rules tests gain a small `true_count` helper that builds the context from `LEGACY_SESSION` (matching the surrounding tests). - The `onpair` smoke test reuses its existing empty-`SESSION` context. This removes the last downstream uses of the deprecated API. Verified with `RUSTFLAGS="-D deprecated" cargo build --all-targets` and by running both crates' tests. Signed-off-by: Claude <noreply@anthropic.com>
connortsui20
reviewed
Jun 5, 2026
Contributor
connortsui20
left a comment
There was a problem hiding this comment.
use expect deprecated and maybe add a reason for each?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several public
vortex-arraymethods construct anExecutionCtxfrom the hidden globalLEGACY_SESSIONstatic instead of accepting an explicitExecutionCtx. This PR marks them#[deprecated]so downstream callers migrate to the context-threading APIs (matching the existingIntoArrowArraydeprecation pattern).Deprecated public APIs
BoolTyped::true_countvortex-array/src/variants.rssum(array, ctx)with an explicitExecutionCtxPrimitiveTyped::valuevortex-array/src/variants.rsis_valid/execute_scalarwith an explicitExecutionCtxPrimitiveTyped::value_uncheckedvortex-array/src/variants.rsexecute_scalarwith an explicitExecutionCtxfrom_arrow_array_with_lenvortex-array/src/arrow/datum.rsExecutionCtxthroughexecute_scalarEach carries a
#[deprecated(note = …)]explaining why and what to use instead.