Skip to content

Replace ToCanonical trait usages with execute#8609

Merged
robert3005 merged 3 commits into
developfrom
claude/nice-hypatia-g68zgt
Jul 7, 2026
Merged

Replace ToCanonical trait usages with execute#8609
robert3005 merged 3 commits into
developfrom
claude/nice-hypatia-g68zgt

Conversation

@robert3005

@robert3005 robert3005 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

This also removes ArrayBuilder::extend_from_array and moves that logic
in to ArrayRef::append_to_builder

Plumb ExecutionCtx through more methods instead of creating fresh one.

Fixes: #3235

Signed-off-by: Robert Kruszewski github@robertk.io

@robert3005 robert3005 requested review from a team, 0ax1, AdamGS and gatesn June 27, 2026 00:25
@robert3005 robert3005 added the changelog/chore A trivial change label Jun 27, 2026
@codspeed-hq

codspeed-hq Bot commented Jun 27, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.5%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 14 regressed benchmarks
✅ 1590 untouched benchmarks
⏩ 42 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation extend_from_array_zctl[(1000, 8)] 239.6 µs 409.6 µs -41.51%
Simulation extend_from_array_non_zctl_overlapping[(1000, 8)] 272.2 µs 444.7 µs -38.79%
Simulation extend_from_array_non_zctl_overlapping[(1000, 32)] 737.7 µs 909.8 µs -18.92%
Simulation compact_sliced[(4096, 90)] 750 ns 896.4 ns -16.33%
Simulation extend_from_array_zctl[(1000, 64)] 1 ms 1.2 ms -13.98%
Simulation compact_sliced[(16384, 90)] 813.3 ns 930.6 ns -12.6%
Simulation sum_i32_nullable_all_valid 37.2 µs 42.1 µs -11.76%
Simulation extend_from_array_zctl[(10000, 8)] 1.9 ms 2.2 ms -10.8%
Simulation encode_varbin[(1000, 2)] 141.5 µs 158.4 µs -10.67%
Simulation encode_varbin[(1000, 4)] 142.4 µs 159.2 µs -10.6%
Simulation extend_from_array_non_zctl_overlapping[(10000, 8)] 2.2 ms 2.5 ms -10.57%
Simulation encode_varbin[(1000, 8)] 143.9 µs 160.7 µs -10.44%
Simulation chunked_varbinview_opt_canonical_into[(100, 100)] 305.7 µs 340.5 µs -10.22%
Simulation encode_varbin[(1000, 32)] 147.8 µs 164.5 µs -10.17%
Simulation bench_many_codes_few_values[1024] 538.9 µs 363.9 µs +48.07%
Simulation chunked_varbinview_canonical_into[(1000, 10)] 191.1 µs 154.7 µs +23.48%
Simulation bitwise_not_vortex_buffer_mut[128] 273.6 ns 244.4 ns +11.93%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/nice-hypatia-g68zgt (f3bf498) with develop (4959939)

Open in CodSpeed

Footnotes

  1. 42 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.

Comment thread vortex-array/src/arrays/list/vtable/mod.rs Outdated
Comment thread encodings/runend/src/arbitrary.rs
@robert3005 robert3005 force-pushed the claude/nice-hypatia-g68zgt branch 2 times, most recently from 048b19b to 947a966 Compare June 27, 2026 20:53
robert3005 added a commit that referenced this pull request Jun 27, 2026
Rebased onto develop and made standalone (no longer stacked on #8609).

Instead of deprecating the hidden global session, expose it as
`vortex_array::legacy_session()` and add it to the central `clippy.toml`
`disallowed-methods` list (denied via `clippy::all`). New call sites are now
rejected by clippy; every current invocation is explicitly allowlisted with
`#[allow(clippy::disallowed_methods)]` on its enclosing function.

- `LEGACY_SESSION` static -> `legacy_session() -> &'static VortexSession`
  (the `LazyLock` is now a private static inside the accessor).
- All call sites renamed and allowlisted across vortex-array, the encodings,
  vortex-ffi, vortex-cuda, vortex-cxx, vortex-layout, vortex-python and
  vortex-web. develop has more call sites than #8609 (incl. test/builder code
  and crates #8609 had refactored away), all covered.

Verified with:
- cargo clippy -p vortex-array -p vortex-alp -p vortex-runend -p vortex-fsst
  -p vortex-fastlanes -p vortex-zstd -p vortex-ffi -p vortex-layout
  -p vortex-web-wasm -p vortex-cxx -p vortex-python --all-targets --all-features
  (0 disallowed-method hits, 0 warnings)
- cargo +nightly fmt --check (touched crates)

vortex-cuda could not be compiled here (CUDA toolchain unavailable); its two
call sites are allowlisted following the same pattern.

Signed-off-by: Robert Kruszewski <robert@spiraldb.com>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018E5DywGCpq26ndoMHd1vyg
@robert3005 robert3005 force-pushed the claude/nice-hypatia-g68zgt branch 2 times, most recently from bc088d1 to d2f276a Compare July 1, 2026 14:53
@robert3005 robert3005 enabled auto-merge (squash) July 1, 2026 14:53
robert3005 added a commit that referenced this pull request Jul 1, 2026
Rebased onto develop and made standalone (no longer stacked on #8609).

Instead of deprecating the hidden global session, expose it as
`vortex_array::legacy_session()` and add it to the central `clippy.toml`
`disallowed-methods` list (denied via `clippy::all`). New call sites are now
rejected by clippy; every current invocation is explicitly allowlisted with
`#[allow(clippy::disallowed_methods)]` on its enclosing function.

- `LEGACY_SESSION` static -> `legacy_session() -> &'static VortexSession`
  (the `LazyLock` is now a private static inside the accessor).
- All call sites renamed and allowlisted across vortex-array, the encodings,
  vortex-ffi, vortex-cuda, vortex-cxx, vortex-layout, vortex-python and
  vortex-web. develop has more call sites than #8609 (incl. test/builder code
  and crates #8609 had refactored away), all covered.

Verified with:
- cargo clippy -p vortex-array -p vortex-alp -p vortex-runend -p vortex-fsst
  -p vortex-fastlanes -p vortex-zstd -p vortex-ffi -p vortex-layout
  -p vortex-web-wasm -p vortex-cxx -p vortex-python --all-targets --all-features
  (0 disallowed-method hits, 0 warnings)
- cargo +nightly fmt --check (touched crates)

vortex-cuda could not be compiled here (CUDA toolchain unavailable); its two
call sites are allowlisted following the same pattern.

Signed-off-by: Robert Kruszewski <robert@spiraldb.com>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018E5DywGCpq26ndoMHd1vyg
Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005 robert3005 added changelog/break A breaking API change and removed changelog/chore A trivial change labels Jul 2, 2026
@lwwmanning

Copy link
Copy Markdown
Contributor

@codex please review this change

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de998866cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vortex-array/src/builders/mod.rs Outdated
Comment thread vortex-array/src/arrays/listview/vtable/mod.rs Outdated
claude and others added 3 commits July 6, 2026 15:14
This also removes ArrayBuilder::extend_from_array and moves that logic
in to ArrayRef::append_to_builder

Plumb ExecutionCtx through more methods instead of creating fresh one.

Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Replace the ListBuilder/ListViewBuilder downcast-enumeration macros with
two dyn-dispatched ArrayBuilder methods, append_list_array and
append_listview_array, taking ArrayViews. The builders resolve their own
offset/size generics, so every IntegerPType (signed included) works, and
either list encoding can append into either list builder. List-encoded
sources now append directly from the ListArray layout without
canonicalizing to ListViewArray first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005 robert3005 force-pushed the claude/nice-hypatia-g68zgt branch from 53ed496 to f3bf498 Compare July 6, 2026 16:31
@lwwmanning

Copy link
Copy Markdown
Contributor

@codex review again pls

@tl-dr-review tl-dr-review Bot added the tldr label Jul 6, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: f3bf498bdb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@0ax1 0ax1 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.

🚢 it

@robert3005 robert3005 merged commit 0d50342 into develop Jul 7, 2026
77 of 79 checks passed
@robert3005 robert3005 deleted the claude/nice-hypatia-g68zgt branch July 7, 2026 13:12
@connortsui20

Copy link
Copy Markdown
Member

Seems like this improves polarsignals benchmark by a huge amount? Is that real?

@robert3005

Copy link
Copy Markdown
Contributor Author

I think it is real. We have sometimes not delegated through VTable::append_to_builder which this pr fixes. I didn't know about this bug until we hit it elsewhere

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

Labels

changelog/break A breaking API change tldr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move logic into append_to_builder

5 participants