Skip to content

fix[vortex-array]: handle lazily sliced REE to_arrow#7011

Merged
asubiotto merged 1 commit intodevelopfrom
asubiotto/ree
Mar 18, 2026
Merged

fix[vortex-array]: handle lazily sliced REE to_arrow#7011
asubiotto merged 1 commit intodevelopfrom
asubiotto/ree

Conversation

@asubiotto
Copy link
Contributor

Summary

This previous code was short-circuiting with a zero offset, with the assumption that ends were already correctly physically sliced. However, slicing is a lazy operation using metadata, so this commit fixes a couple of edge cases by executing the fast path only if the ends are correcly sliced. Otherwise, ends are trimmed and transformed with the offset in for correct arrow array construction.

Testing

Enhanced tests to reproduce e2e arrow execution error and added some unit tests to build_run_array

@asubiotto asubiotto requested a review from gatesn March 18, 2026 09:05
@asubiotto asubiotto added the changelog/fix A bug fix label Mar 18, 2026
@asubiotto asubiotto requested a review from joseph-isaacs March 18, 2026 09:06
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 18, 2026

Merging this PR will improve performance by 11.12%

⚡ 1 improved benchmark
✅ 1008 untouched benchmarks
⏩ 1515 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation binary_search_std 582.8 ns 524.4 ns +11.12%

Comparing asubiotto/ree (61d0bb2) with develop (c63a800)

Open in CodSpeed

Footnotes

  1. 1515 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

This previous code was short-circuiting with a zero offset, with the assumption
that ends were already correctly physically sliced. However, slicing is a lazy
operation using metadata, so this commit fixes a couple of edge cases by
executing the fast path only if the ends are correcly sliced. Otherwise, ends
are trimmed and transformed with the offset in for correct arrow array
construction.

Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
@asubiotto
Copy link
Contributor Author

Updated to binary search.

@asubiotto asubiotto enabled auto-merge (squash) March 18, 2026 13:05
Copy link
Contributor

@joseph-isaacs joseph-isaacs left a comment

Choose a reason for hiding this comment

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

LG, thanks

@asubiotto asubiotto merged commit 002f49e into develop Mar 18, 2026
56 checks passed
@asubiotto asubiotto deleted the asubiotto/ree branch March 18, 2026 13:28
dimitarvdimitrov pushed a commit that referenced this pull request Mar 20, 2026
## Summary

This previous code was short-circuiting with a zero offset, with the
assumption that ends were already correctly physically sliced. However,
slicing is a lazy operation using metadata, so this commit fixes a
couple of edge cases by executing the fast path only if the ends are
correcly sliced. Otherwise, ends are trimmed and transformed with the
offset in for correct arrow array construction.

<!--
Thank you for submitting a pull request! We appreciate your time and
effort.

Please make sure to provide enough information so that we can review
your pull
request. The Summary and Testing sections below contain guidance on what
to
include.
-->

<!--
If this PR is related to a tracked effort, please link to the relevant
issue
here (e.g., `Closes: #123`). Otherwise, feel free to ignore / delete
this.

In this section, please:

1. Explain the rationale for this change.
2. Summarize the changes included in this PR.

A general rule of thumb is that larger PRs should have larger summaries.
If
there are a lot of changes, please help us review the code by explaining
what
was changed and why.

If there is an issue or discussion attached, there is no need to
duplicate all
the details, but clarity is always preferred over brevity.
-->

<!--
## API Changes

Uncomment this section if there are any user-facing changes.

Consider whether the change affects users in one of the following ways:

1. Breaks public APIs in some way.
2. Changes the underlying behavior of one of the engine integrations.
3. Should some documentation be updated to reflect this change?

If a public API is changed in a breaking manner, make sure to add the
appropriate label. You can run `./scripts/public-api.sh` locally to see
if there
are any public API changes (and this also runs in our CI).
-->

## Testing

<!--
Please describe how this change was tested. Here are some common
categories for
testing in Vortex:

1. Verifying existing behavior is maintained.
2. Verifying new behavior and functionality works correctly.
3. Serialization compatibility (backwards and forwards) should be
maintained or
   explicitly broken.
-->
Enhanced tests to reproduce e2e arrow execution error and added some
unit tests to build_run_array

Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants