Repository navigation
fix(deps): security updates - #1
Closed
antoine-gauvain wants to merge 517 commits into
Closed
antoine-gauvain wants to merge 517 commits into
antoine-gauvain wants to merge 517 commits into
Conversation
…e domain (vortex-data#9883) Fixes decimal-to-float casts for the full scale range and makes the scalar and array paths return the same bits. ## Bugs | input | before | after | | --- | --- | --- | | `decimal(76,39)` storing `1` → `f64` (scalar) | `-4.8e-38` | `1e-39` | | `decimal(5,-5)` storing `1` → `f64` (scalar) | `inf` | `100000.0` | | `i256` value outside `i64` → `f64` (array) | `NaN` | value | | `i256` value outside `i128` → `f64` (scalar) | error | value | | `decimal(_,2)` storing `12345` → `f64` | scalar and array differ by 1 ulp | same bits | ## Changes - `DecimalToFloatCast` (next to `DecimalToIntegerCast`) is the single decimal-to-`f64` policy. The scalar cast and the array kernel `cast_to_f64` both use it. It divides by `10^scale` for a non-negative scale and multiplies by `10^-scale` for a negative scale. Up to scale 22 the factor is exact, so the result is correctly rounded. - `i256` implements `ToPrimitive::to_f64` through the arrow `i256` conversion. The default went through `to_i64`. --------- Signed-off-by: jackylee-ch <qcsd2011@gmail.com> Signed-off-by: Robert Kruszewski <robert@spiraldb.com>
Only compute lowered stats predicate once. Avoids relowering on every dynamic version update --------- Signed-off-by: Robert Kruszewski <github@robertk.io>
…ure blocks exactly (vortex-data#10439) Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
…t_by_rank (vortex-data#10168) ## Summary Follow-up to vortex-data#10138. Without BMI2, `intersect_by_rank` deposits the rank bits with a loop over the set bits of each `self` chunk. That covers every aarch64 build, plus x86 without BMI2. On masks that don't repeat, the loop mispredicts about once per chunk and runs 3 to 8 times slower than PDEP. This PR uses SVE2 BDEP where the CPU has it and a branch-free deposit elsewhere: - **SVE2 BDEP** on Neoverse N2 and V2 (Graviton4, Cobalt 100, Axion), detected at runtime. It is used for the deposit and for the select of the mask-driven path, the same way BMI2 is used on x86. The kernels are compiled with SVE2 enabled as a whole, so BDEP inlines into the loop. Without that it costs a call and a register reload per chunk, which I found in the assembly rather than in the design. - **Portable network** otherwise. Masks with at most two set bits or at most two clear bits get closed forms. For the rest, each byte takes its source bits from the count of mask bits below it (one multiply sums them), and inside each byte the compress network of Hacker's Delight 7-4 runs backwards. That is the `uN::extract_bits` scheme from core, with three stages instead of six. - **Loop below 1/16 density of `self`**, where a chunk has about four set bits. The first version used the network everywhere and lost to the old loop on every sparse bench, so the loop is back for sparse `self`, chosen once per call, and now stops when the source bits run out. The BMI2 path is unchanged. Median µs before / after on Neoverse N2, and the speedup of the portable path on Apple M1: | | N2, BDEP | N2, portable | M1, portable | |---|---|---|---| | random, self 50 %, mask 50 % | 151 / 13.0 (11.7x) | 151 / 55.8 (2.7x) | 3.8x to 4.6x | | random, self 90 %, mask 90 % | 240 / 14.6 (16.5x) | 240 / 57.5 (4.2x) | 5.4x to 6.2x | | random, self 2 %, mask 50 % | 34.4 / 10.4 (3.3x) | 34.4 / 20.1 (1.7x) | 1.7x to 2.4x | | random, self 5 %, mask 50 % | 39.9 / 11.5 (3.5x) | 39.9 / 44.4 (0.90x) | 0.79x to 0.94x | | random, self 50 %, mask 2 % | 67.2 / 31.9 (2.1x) | 66.5 / 66.6 (1.0x) | 0.9x to 1.16x | | `density_matrix` dense | 24.8 / 4.6 (5.4x) | 24.8 / 19.8 (1.26x) | 1.5x to 1.9x | | `density_matrix` self sparse | 7.3 / 3.9 (1.85x) | 7.3 / 7.8 (0.93x) | 0.92x to 1.19x | | `intersect_by_rank` runs | 3.82 / 4.13 (0.92x) | 3.82 / 4.94 (0.77x) | 0.73x to 1.0x | | `very_sparse_mask_cached` | 1.2x to 1.4x | unchanged | unchanged | `random_rotating` is the bench from vortex-data#10138, with extra densities added for this measurement. The runners are GitHub's `ubuntu-24.04-arm` (Cobalt 100) and `macos-15` (a virtualized M1), with two rounds per run. For the portable column on N2 the portable path is forced. The M1 numbers are ranges over several runs, because a virtual M1 has opinions. I also tried HD 7-5 through PMULL, on the theory that the Apple cores love it. The M1 ran it at the speed of the network, so it isn't in this PR. Where it's slower: - **Runs of 64 set and 64 clear bits:** 0.77x to 0.92x. Aligned blocks of eight empty or full chunks skip the deposit, but the old per-chunk shortcuts were cheaper. - **The other benches' masks:** they come from `(i * 7 + 13) % 1024`, repeat every 16 chunks, and the predictor learns the old loop on them. With a sparse mask over a dense `self`, the portable path stays on the network and runs 0.67x to 0.9x. With random masks at the same densities it's 2.9x to 5.4x faster, so I didn't also pick the kernel by mask density. - **Random `self` at 5 %:** about 0.9x, just above the crossover. The threshold is set for the M1, since N2 takes BDEP anyway. --------- Signed-off-by: mightsleep <acannix@proton.me> Signed-off-by: Robert Kruszewski <robert@spiraldb.com>
Tracking Issue: vortex-data#10167 ## Summary Adds support for decoding `BitPacked` arrays with blocked bitwidths. Now each public function that decodes bitpacked arrays with global bitwidths has a version for blocked bitwidths. | Global width | Blocked | |---|---| | `unpack_array(array, ctx)` | `unpack_array_blocked(array, offsets, ctx)` | | `unpack_primitive_array` | `unpack_primitive_array_blocked` | | `unpack_into_primitive_builder` | `unpack_into_primitive_builder_blocked` | | `unpack_single(array, index)` | `unpack_single_blocked(array, offsets, index, ctx)` | Callers choose between them by matching on `bit_widths()`. There is no blocked `unpack_map_into_builder`: its only caller, the widening `CastKernel`, declines blocked arrays, so the mapped path would only run in tests. ## Design vortex-data#10004 only checks block boundary values in debug builds, so the decoder checks them itself: - Bulk decode casts the offsets child to `u64` and executes it once, checks that it holds one boundary per block plus a trailing one, and validates every boundary before writing to the builder. A single offset type keeps one copy of the block loop per value type, for 8 bytes per 1024 values. Each block must be a whole number of 128-byte rows, no wider than the array's type, and the boundaries must span the packed buffer. - `scalar_at` reads only the selected block's boundaries, directly for host primitive offsets and through `execute_scalar` otherwise, and validates just that block. Both use `block_range` in `bitpacking/array/mod.rs`, which `validate_primitive_offsets` now also uses. Boundaries are relative to the first one, which may be nonzero. Full blocks unpack straight into the output, like the global decoder's full chunks. A partial first or last block unpacks into one 1024-value scratch block. --------- Signed-off-by: Matt Katz <mhkatz97@gmail.com>
…ata#9785) ## Summary - Fix native pushdown in `vortex-datafusion` to preserve DataFusion semantics and fall back for unsupported expressions. Replace separate eligibility and conversion checks with schema-aware `try_convert`, preserving SQL null semantics for `IN`/`NOT IN` and rejecting pushdown where casts, short-circuit evaluation, or nullable struct access could differ. Partially supported projections now run entirely in DataFusion over deduplicated raw columns. - Re-split filters after each file’s schema adaptation: Vortex evaluates supported conjuncts, and DataFusion evaluates residuals before projection and limit. Disable scan limits whenever filters exist, include file and predicate context in errors, and fix `v2` pushdown after projection swapping. - Add conversion and residual-filter regression tests, plus 16 SQL cases compared against an Arrow `MemTable` with pushdown enabled and disabled. - Rename `Convertor` to `Converter` _LLMS were used as part of this work_ --------- Signed-off-by: Adam Gutglick <adam@spiraldb.com> Signed-off-by: Robert Kruszewski <github@robertk.io>
…vortex-data#10413) Struct fields are written unmasked: a field still holds a value in rows where the containing struct is null, and the struct validity is written as a separate child. Each field's zone map was computed over that unmasked stream, so null_count undercounted the logical column (it was always 0 for a non-nullable field under a nullable struct) and nan_count counted values the column never shows. Pruning on `s.x IS NULL` then discarded zones that held matching rows. Add `LayoutWriterContext::with_nullable_ancestor`, set by `StructStrategy` on the context it hands to field writers of a nullable struct, and have `ZonedStrategy` keep only min/max style aggregates under it. Those remain sound as bounds because the unmasked field is a superset of the logical values. Count aggregates are omitted rather than recorded wrong until they can be computed over the masked values.
…ex-data#10244) Tracking Issue: vortex-data#10167 ## Summary Adds a wire format for `BitPacked` arrays whose blocks each have their own bit width, and makes it the in-memory ID, following `fastlanes.for.v2` (vortex-data#10135) and `DecimalByteParts`. | ID | Role | |---|---| | `fastlanes.bitpacked` | Frozen wire format for global-width arrays. Unchanged. | | `fastlanes.bitpacked.v2` | In-memory ID, and the wire format for per-block bit widths. | `BitPackedPlugin` declares both serialized IDs and picks one per array from `bit_widths()`: - **Global width** writes `fastlanes.bitpacked` exactly as before. Existing files read as before, and default writes stay byte-identical. - **Blocked** writes `fastlanes.bitpacked.v2`. The plugin moves into `bitpacking/plugin/`, laid out like FoR's: `mod.rs` holds the IDs and the dispatch, `v1.rs` the v1 metadata and serde, `v2.rs` the new format, and `tests.rs` the existing tests plus new ones. The v1 code is moved unchanged, except that it writes `bitpacked_v1_id()` rather than the plugin's ID. ## `fastlanes.bitpacked.v2` layout - **Buffers**: the packed buffer, as in v1. - **Children**: v1's children (patch indices, values and chunk offsets, then validity), followed by the block offsets. The block offsets are serialized like any other child, so the compressor can compress them. - **Metadata**: a prost message holding `offset`, the block offsets' unsigned `PType`, and the patches metadata. There is no bit width, and the block offsets' length, `ceil((offset + len) / 1024) + 1`, is derived. Deserialization checks for one buffer and the expected number of children, and validates the offset before deriving the block offsets' length. Construction then checks the block offsets' dtype and length. The decoder (vortex-data#10202) bounds-checks the boundary values themselves. ## `BitPackedPatchedPlugin` The experimental-patches plugin declares both IDs as well. It moves a v2 array's interior patches into a `Patched` wrapper just as it does for v1, rebuilding the inner array with its block offsets instead of panicking on a blocked array. ## Editions and compressor `fastlanes.bitpacked.v2` is in no edition. Writers that enforce editions reject it, and readers that predate it report an unknown encoding. Nothing produces blocked arrays yet, so default writes don't change. `BitPackingScheme::produced_encodings` now declares `bitpacked_v1_id()`, since `BitPacked.id()` is the in-memory ID. --------- Signed-off-by: Matt Katz <mhkatz97@gmail.com>
…ortex-data#10391) Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
…ks to pipelines (vortex-data#10392) Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
…tex-data#10393) Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Add support for polars 2 alongside polars 1. Raise minimum required version to 1.32 to simplify the compatibility fixes: vortex-data#10444
…a#10456) ## Summary `#[target_feature(enable = "bmi2")]`, `"avx2"` and `"avx512f,..."` do not imply POPCNT, so `count_ones()` inside these kernels compiles to a SWAR sequence (with `imul` for narrow masks) in any build without `target-cpu`. The bench runners use `target-cpu=native`, so they won't show a difference. ## Changes Add `popcnt` to the target features and to the runtime detection of the `intersect_by_rank` BMI2 kernels and the x86 `simd_compress` kernels. No other `#[target_feature]` function in the tree counts bits without it (the `fearless_simd` levels already enable POPCNT). Default build, Zen 5, divan medians: | bench | before | after | | |---|---|---|---| | `intersect_by_rank` 100k random | 3.17 µs | 1.93 µs | 1.64x | | `random_rotating` 0.5/0.5 | 9.71 µs | 5.67 µs | 1.71x | | `very_sparse_mask_cached` 10%/1% | 1.91 µs | 0.81 µs | 2.36x | | `filter_fixed_width` `random_i16` 0.8 | 1.60 µs | 1.06 µs | 1.51x | | `filter_fixed_width` `random_i32` 0.5 | 1.49 µs | 1.03 µs | 1.45x | | `filter_fixed_width` `random_i64` 0.5 | 1.13 µs | 0.99 µs | 1.14x | | `filter_fixed_width` `random_i128` 0.5 (no kernel) | 1.45 µs | 1.42 µs | 1.02x | The filter numbers are the AVX-512 kernels; the AVX2 ones should show up in the CodSpeed simulation shard, where AFAIK valgrind has no AVX-512. Signed-off-by: mightsleep <acannix@proton.me>
…ata#10465) fix the assertions that have been found by test audit extracted from vortex-data#10458 --------- Signed-off-by: Robert Kruszewski <github@robertk.io>
Add an AVX2 implementation for boolean take kernel. There are two options for implementation: with and without validity. Without validity we don't need to check any bounds because we rely on scalar code already doing this (see minmax code). With validity, we clamp the index to be in valid bounds, so there never will be an out of bounds read, and collect violations. A violation is when for a non-NULL index clamped index isn't equal to the original index. Then we panic if there are any violations, thus an invalid request always panics. Change the scalar nullable code so it also operated on 8 packed values instead of querying validity bits individually. --------- Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
…a#10451) ## Summary This PR adds a comprehensive CPU feature detection test suite that validates runtime-dispatched SIMD kernel tiers across different CPU architectures. It enables testing on emulated CPUs (via Intel SDE for x86_64 and QEMU for aarch64) to ensure every kernel tier is exercised regardless of the runner's native CPU capabilities. ## Changes ### New Test: `vortex-buffer/tests/cpu_features.rs` Added a new test module that: - Detects CPU features at runtime for x86_64 (SSE2, BMI1/2, AVX, AVX2, AVX-512 variants) and aarch64 (NEON, SVE, SVE2) - Validates detected features against an expected set via the `VORTEX_EXPECT_CPU_FEATURES` environment variable - Supports both positive assertions (feature must be detected) and negative assertions (feature must not be detected) using `!` prefix - Fails the test if the emulated/actual CPU does not expose exactly the expected feature set, preventing silent mismatches between emulator configuration and actual kernel testing
…ortex-data#10480) ## Summary Follow-up to vortex-data#10168 and vortex-data#10456. `RankBitReader` pulled the rank bits through a two-word window over `BitChunkIterator` and refilled it behind a branch on every 64 bits consumed. With random masks that branch mispredicts often. The kernel already counts the set bits of each `self` chunk, so the rank offset of the next chunk is known without any reader state. `RankBits` reads 16 bytes at that offset and shifts by `offset % 8`, which covers any 64-bit read. There is one bounds check per read and no iterator, so `RankBitReader` and `low_bits` are gone. This applies to every deposit (BMI2, SVE2 BDEP, portable), not just one path. Reads near the end of the buffer come from a copy of its last 16 bytes followed by zeros, made once per call. With a sparse `self` the last 128 rank bits cover many chunks: at 1/64 density that is about 120 of them. A first version copied the tail on each such read in a `#[cold]` function, and the call made the whole loop spill to the stack, so sparse masks ran 5 % slower than before. `cold_path()` keeps the branch: without it LLVM picks the address with three `cmov`s, which puts the comparisons in front of every load and costs dense masks 8 %. ## Numbers Zen 5, default build, `perf stat` over the kernel only: each bench runs with `--sample-count 100` at `--sample-size 200` and `400`, and the difference between the two runs is the cost of 100 x 200 calls with the setup subtracted out. Wall-clock medians on this machine moved by up to 1.4x between processes of the same binary, so I'm not quoting them. | | before | after | | |---|---|---|---| | `random_rotating`, cycles | 4894 M | 4256 M | 1.15x | | `random_rotating`, instructions | 17.9 G | 15.8 G | -12 % | | `sparse`, cycles | 3184 M | 3110 M | 1.02x | `random_rotating` and `sparse` are all their cases together, weighted by time. ## Testing `kernels_match_reference` now also slices the rank buffer at a bit offset (`past_a_word`, 67) so that a read starting past the first word is covered. Dropping `start` from `RankBits::read` fails four tests, ignoring `tail_start` fails five. Signed-off-by: mightsleep <acannix@proton.me>
…mode (vortex-data#10245) Tracking Issue: vortex-data#10167 ## Summary Support blocked `BitPacked` encoding in the compressor by adding a new `V2` mode to `BitPackingScheme`. Like `FoRScheme V2` and `DecimalScheme V2`, the new versions use the current `V1` by default and are only "refined" to `V2` when the corresponding edition is enabled. The new scheme mode is quite naive for now. Compression estimate for V2 is the same as for V1. In general, blocked BP will compress an array **at least as much** as regular BP, so this estimate is a decent approximate lower bound on compression ratio. ## CUDA The CUDA preset excludes `fastlanes.bitpacked.v2`, as it does `fastlanes.for.v2`. CUDA decoding returns an error for per-block bit widths. --------- Signed-off-by: Matt Katz <mhkatz97@gmail.com>
…data#10251) Tracking Issue: vortex-data#10167 ## Summary `FoR` now decodes a blocked `BitPacked` child in one pass, the same as a global-width child. Before, the child was decoded to a primitive array first and the references were added in a second pass. A block and a FoR chunk are both 1024 values, so each block unpacks at its own width and adds its chunk's reference directly. ## Changes - `unpack_chunks` walks the blocks of a blocked child, each at its own width. - `execute_block_offsets` and `for_each_packed_block` are shared with the blocked `BitPacked` decoder. - Block offsets widen to `u64` directly instead of through a lazy `cast`. ## Benchmarks `for_decode`, per-chunk references, local M5 Max: | | Global width | Blocked, before | Blocked, after | | --- | --- | --- | --- | | u32 | 9.62 µs | 18.54 µs | 9.87 µs | | i64 | 11.95 µs | 20.04 µs | 12.29 µs | ## Testing - `fused_decode_is_wrapping_add` draws a bit width per block. - `for_fuses_blocked_child` covers partial blocks, zero and native widths, and constant and per-chunk references. ## Follow-up `FoRScheme` still bit-packs its child with `BITPACKING_V1`, so the compressor doesn't write this combination yet. That needs vortex-data#10245. --------- Signed-off-by: Matt Katz <mhkatz97@gmail.com>
…x-data#10483) Consistentcy! --------- Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> Co-authored-by: Claude <noreply@anthropic.com>
Bound number of shards created in DashMaps to avoid explosion of shards under high core counts
Ready masks that after slicing have become all false or all true were still making it through to the projection stage. Peek the masks before dispatching the projection future if there's any work left to do and skip it if the mask is already known
…10486) DuckDB releases its last reference to a file reader while holding the global multi-file scan lock, so dropping a Vortex file reader stalled every scan thread. The layout reader and conversion cache now live in an `Arc` shared by the local states that scan the file; under the lock we only move these references, and the local state drops them outside it.
## Summary Adds the [Join Order Benchmark](https://www.vldb.org/pvldb/vol9/p204-leis.pdf) (Leis et al., VLDB 2015) as a new `job` suite: 113 join-heavy queries over the real 21-table IMDB dataset. It complements TPC-H/TPC-DS with a join-ordering and string-predicate workload over correlated real-world data.
Update rustls from 0.23.45 to 0.23.46 to resolve four security advisories that fail CI on develop. `cargo deny --locked check advisories` passes. Signed-off-by: Baris Palaska <barispalaska@gmail.com>
## Summary Expose the scan metadata needed by alternative execution engines, such as Comet, to preserve filter semantics when replacing the Vortex Spark reader. Spark may remove filters fully handled by Vortex and prune predicate-only columns from the scan output. The replacement reader therefore needs both the full table schema and the predicates the scan has accepted. ## Changes - Add `VortexScan.tableSchema()` to expose the schema before projection pushdown. - Add `VortexScan.pushedPredicates()` to return a defensive copy of the accepted predicates. Document that replacement readers must enforce every predicate or retain the original reader. - Add tests covering metadata preservation through filter pushdown, empty projection and scan construction, as well as defensive array copying. ## Testing - `VortexScanTest`: 2 tests passed on Spark 3.5.9 / Scala 2.12. - `VortexScanTest`: 2 tests passed on Spark 4.1.2 / Scala 2.13. - Java formatting checks passed. ## AI Assistance AI tools assisted with implementation, tests* and drafting this PR description. --------- Signed-off-by: Peifeng Li <lipeifeng@xiaohongshu.com>
…#10487) When profiling TPC-DS SF1 through DataFusion with a segment cache, decoding primitive RunEnd arrays was the single largest Vortex scan cost (about half of scan CPU). Most of it was the nullable path: 745M rows in 104.5M runs per suite pass, at 59 ns per run. Decoding a nullable primitive RunEnd appended its validity one run at a time. Nulls are usually rare and clustered, so the decoder now starts from an all-valid bitmap and clears each maximal streak of null runs once. Values are written as before.
…#10495) `SharedArray` is only used while reading layouts (the dict reader, the take operator and repartition) and by vortex-cuda, never by vortex-array itself, so it moves into vortex-layout as `vortex_layout::arrays::shared`. vortex-cuda reaches it through `vortex::layout::arrays::shared`. Signed-off-by: Claude <noreply@anthropic.com>
Replace constant-set membership comparison/OR chains with prepared, single-pass probes --------- Signed-off-by: Robert Kruszewski <github@robertk.io>
) ## Summary FSST already stores each value’s uncompressed length. This adds an FSST-specific `UncompressedSizeInBytes` aggregate that calculates the canonical size without decoding string payloads. ## Changes The kernel reads only the lengths child and accounts for canonical views and validity. It rejects negative lengths and arithmetic overflow. Tests compare results with materialized UTF-8 and binary arrays. They cover nullable, all-null, and sliced inputs. Signed-off-by: Will Manning <will@willmanning.io>
## Summary Every CodSpeed report carries the same warnings. This removes the ones with a cause in this repository: "no flamegraph", "unable to measure", and all of "dominated by system calls" except real file I/O. ## Changes - **Python 3.13 for the Python job.** All 40 "no flamegraph" notes were the Python benchmarks. pytest-codspeed records Python frames only through the CPython perf trampoline, which exists from 3.12, and the job ran on 3.11. The 40 Python series moved once, because the interpreter changed and pytest-codspeed now runs each benchmark once before it measures. - **No allocator system calls in measured iterations.** A simulated benchmark is one cold iteration, and the simulation leaves system calls out of the measure. mimalloc returned freed memory to the OS on a 10 ms timer that the slow simulation crosses, and glibc (used by zstd) trimmed and regrew its heap with `brk`. The simulation job now sets `MIMALLOC_PURGE_DELAY=-1`, `MALLOC_TRIM_THRESHOLD_` and `MALLOC_TOP_PAD_`. This took the system-call warning from 15 benchmarks to 5 on this PR, and fixed `bench_compare_primitive[(10000, 2)]`. - **No one-time setup in measured iterations.** `ilike_contains` and `filter_run_end[len=4096_run=16_density=0.1]` paid for process-wide setup: the first regex compilation and the session id interner, which read the CPU quota from cgroup files. Both bench binaries now run the operation once in `main()`, and the guide gains a rule against this mistake. - **`filter_bool.rs` drops the 1000-row size.** It did under 1 µs of work, and about half of `filter_powerlaw_by_mostly_false[1000]`'s iteration was mimalloc setting up a fresh page after the previous, larger case. CodSpeed reported no execution time for it. Not addressed: "Walltime results may be unreliable" and "Base and head ran on different runner types" come from running walltime on self-hosted machines instead of CodSpeed Macro Runners. Two Python scans still read a file inside the measured iteration, which is real I/O. <details> <summary>How the causes were found</summary> The benchmarks were built with `--cfg codspeed` and run under `valgrind --tool=callgrind --instr-atstart=no -v --trace-syscalls=yes`. CodSpeed starts and stops callgrind instrumentation around each measured iteration, and `-v` logs those switches, so the system calls between them are exactly the ones inside a measured iteration. With the changes, none of the measured iterations in `like`, `run_end_filter`, `filter_bool` and `single_encoding_throughput` (116 in all) makes a system call. </details> Checks run: `cargo clippy --locked -p vortex-array -p vortex-runend` on the three changed benches with `-D warnings`, `cargo +nightly-2026-09-10 fmt --check`, `yamllint --strict`, `typos`, `git diff --check`, and the callgrind traces above. Not run: the CodSpeed jobs (they run on this PR). https://claude.ai/code/session_01KF3pMFx7U5ngk8BzQQFS2W --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
## Summary Follow-up to vortex-data#10740. Kernels that only copy or compare stored bits can share code across signed, unsigned, and floating-point types of the same width. ## Changes - Add typed width adapters that forward to a shared power-of-two byte-width dispatcher. - Use byte records in primitive patch, zip, fill-null, interleave, and is-constant kernels, plus shared fixed-width take/filter and filtered take. - Add tests for dispatch contracts, floating-point bit patterns, buffer ownership, and decimal alignment. ## API Changes `match_each_ptype_width!`, `match_each_decimal_type_width!`, and `match_each_power_of_two_width!` bind a `const W: usize`, with an explicit fallback for unsupported widths and an optional specialization list. Validation: pinned nightly formatting, scoped Clippy with all targets and features and `-D warnings`, 100 focused tests, and seven width doctests pass. <details> <summary>Code size comparison</summary> Compared base `a59294e35e` with `77a96de1c0` using separate checkouts and target directories. Both use rustc 1.99.1, LLVM 23.1.1, `aarch64-apple-darwin`, the release profile (opt-level 3, one codegen unit, LTO off), package default features, and the repository's frame-pointer flag. Machine-code bytes from Mach-O `__text` sections: | Artifact | Base | PR | Change | | --- | ---: | ---: | ---: | | `vortex-buffer` library | 34,448 | 34,448 | 0 | | `vortex-array` library | 11,646,740 | 11,508,116 | -138,624 (-1.19%) | | `vortex-fastlanes` library | 2,719,444 | 2,719,444 | 0 | | Linked `vx` binary | 74,396,028 | 74,357,628 | -38,400 (-0.052%) | The linked `vx` file also shrinks from 120,844,528 to 120,779,936 bytes (-64,592). Library totals exclude Rust metadata. Small archive increases in `vortex-buffer` and `vortex-fastlanes` come from metadata, while their machine sections are unchanged. Commands run in each checkout: ```sh cargo build --release --locked -p vortex-buffer -p vortex-array -p vortex-fastlanes --message-format=json-render-diagnostics cargo build --release --locked -p vortex-tui --bin vx --message-format=json-render-diagnostics llvm-size --format=sysv --radix=10 <artifact> ``` These measurements cover this target and profile. Runtime benchmarks were not run locally. </details> --------- Signed-off-by: Connor Tsui <connor.tsui20@gmail.com> Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
) Related to vortex-data#10676. This PR is independent of the RowFn stack. Uses the existing fill-and-pack collector for `i64`, `u64`, and `f64` array-pair comparisons on AArch64 with NEON. The dispatch and the unchecked slice reads stay inside the private primitive kernel, where equal lengths and the collector's index range establish the bounds proof. Constant comparisons, other primitive types, and validity handling retain their existing paths. Extends bitmap-boundary tests to wide types with differently sliced inputs, and checks floating-point total ordering through full words and a tail. Validation: 236 comparison tests and all-target, all-feature Clippy with warnings denied pass on macOS ARM. Native ARM and AVX2 builds pass the 455-case probe (452 reference-array checks plus three unchanged Boolean controls) and 3,456 comparison edge checks plus four arithmetic error checks. On Graviton3, the two counterbalanced full-suite sessions show the following elapsed-time reductions in the long array-pair cohorts: | Type | First session | Confirmation | Confirmation ratio and paired 95% interval | | --- | --- | --- | --- | | `i64` | 15.6% | 15.4% | `0.846 [0.843, 0.856]` | | `u64` | 14.1% | 14.0% | `0.860 [0.858, 0.864]` | | `f64` | 11.8% | 11.8% | `0.882 [0.880, 0.886]` | Each cohort contains 32 cases. Ratios are candidate/baseline, with a geometric mean across cases within a paired block and the median across 21 blocks. Intervals bootstrap those paired block ratios. Neither ARM session has a case crossing the 3% regression threshold with its interval above 1. The AVX2 baseline and candidate `.text` sections are byte-for-byte identical. Control timings still vary, so no x86 speedup is attributed to this change. These are public-path microbenchmarks, not query results. Release-profile and AVX-512 timing were not repeated for this ARM-only variant. <details> <summary>Measurement protocol and reproduction</summary> Baseline: `a59294e35e7109fac894a7a38a68f42db0c3c967`. Candidate: `f018aaeef739145e1bc50079a441c5d9fd53404a`. Uses rustc 1.99.1 (LLVM 23.1.1), the repository's bench profile (16 codegen units, no LTO), MiMalloc, and CPU 2. Graviton3 uses `-C target-feature=+neon -C force-frame-pointers=yes`. The AVX2 control uses `-C target-feature=+avx2 -C force-frame-pointers=yes` on AMD EPYC 7R13. Optimized LLVM IR and assembly were emitted during both builds, and the resulting executables were timed without instrumentation. Both labels run the same full 455-case suite in the same order. Each case has exactly 1,000 single-iteration samples. Each session has 21 baseline/baseline calibration blocks and 21 paired baseline/candidate blocks with alternating executable order. Separate arithmetic control binaries bracket the blocks. The two hosts are measured serially, and a second session confirms the result. The confirmation session reverses the starting order, so the combined sessions contain equal AB and BA counts. Preliminary fixed-order source comparisons were excluded, while valid identical-binary calibration was retained. The long-array cohorts each contain 32 cases, including partially valid inputs and lengths around the 16K boundary. To reproduce, save the harness below as `vortex-array/benches/interaction_probe.rs` on each revision and add this target to `vortex-array/Cargo.toml`: ```toml [[bench]] name = "interaction_probe" harness = false ``` Set `RUSTFLAGS` to the host flags above. Build both revisions with those same flags, retain separate immutable executables, and alternate the commands below. Unset `VORTEX_PERF_CHECK` for timing. ```sh cargo +1.99.1 build --locked -p vortex-array --bench interaction_probe --profile bench VORTEX_PERF_CHECK=1 "$binary" --test --color never taskset -c 2 "$binary" --bench --color never --timer os --sample-count 1000 --sample-size 1 --skip-ext-time true ``` </details> <details> <summary>Exact benchmark harness</summary> The measured harness SHA-256 is `0a7de7999381d237ad0471716107f7e1972a7c6b11c0936a7d3b7d8c15b6c37d`. ```rust // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors //! Common public-path inputs for the RowFn interaction experiments. #![expect(clippy::unwrap_used)] #![expect(clippy::cast_possible_truncation)] #![expect(clippy::cast_precision_loss)] use std::fmt; use divan::Bencher; use mimalloc::MiMalloc; use vortex_array::{ArrayRef, Canonical, IntoArray, VortexSessionExecute}; use vortex_array::arrays::{BoolArray, ConstantArray, PrimitiveArray}; use vortex_array::builtins::ArrayBuiltins; use vortex_array::dtype::NativePType; use vortex_array::scalar::Scalar; use vortex_array::scalar_fn::fns::operators::Operator; use vortex_array::validity::Validity; use vortex_buffer::Buffer; #[global_allocator] static GLOBAL: MiMalloc = MiMalloc; fn main() { if check_enabled() { eprintln!("detected SIMD level: {:?}", fearless_simd::Level::new()); } divan::main(); } #[derive(Clone, Copy, Debug)] enum Shape { Arrays, LeftConstant, RightConstant } #[derive(Clone, Copy, Debug)] enum InputValidity { Dense, AllValid, Nullable, Sparse } #[derive(Clone, Copy, Debug)] enum Comparison { Eq, Gte } #[derive(Clone, Copy)] struct Case { rows: usize, shape: Shape, validity: InputValidity, op: Comparison } impl fmt::Display for Case { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "rows={},shape={:?},validity={:?},op={:?}", self.rows, self.shape, self.validity, self.op) } } const CASES: &[Case] = &[ Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 64, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 64, shape: Shape::LeftConstant, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 64, shape: Shape::RightConstant, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::LeftConstant, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 8192, shape: Shape::RightConstant, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::LeftConstant, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::Dense, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::Dense, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::AllValid, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::AllValid, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 65536, shape: Shape::RightConstant, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 16383, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 16383, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 16383, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 16383, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 16384, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 16384, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 16384, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 16384, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 16385, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 16385, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 16385, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 16385, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, Case { rows: 32768, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Eq }, Case { rows: 32768, shape: Shape::Arrays, validity: InputValidity::Nullable, op: Comparison::Gte }, Case { rows: 32768, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Eq }, Case { rows: 32768, shape: Shape::Arrays, validity: InputValidity::Sparse, op: Comparison::Gte }, ]; trait Input: NativePType + Into<Scalar> { fn value(index: usize, offset: usize) -> Self; } macro_rules! input { ($($ty:ty),*) => {$( impl Input for $ty { fn value(index: usize, offset: usize) -> Self { ((index * 17 + offset * 31) % 251) as Self } } )*}; } input!(u8, i64, u64, f32, f64); fn validity(kind: InputValidity, rows: usize, offset: usize) -> Validity { match kind { InputValidity::Dense => Validity::NonNullable, InputValidity::AllValid => Validity::AllValid, InputValidity::Nullable => Validity::from_iter((0..rows).map(|i| (i + offset) % 10 != 0)), InputValidity::Sparse => Validity::from_iter((0..rows).map(|i| i % 10 == 0)), } } fn array<T: Input>(case: Case, offset: usize) -> ArrayRef { PrimitiveArray::new((0..case.rows).map(|i| T::value(i,offset)).collect::<Buffer<_>>(), validity(case.validity,case.rows,offset)).into_array() } fn operands<T: Input>(case: Case) -> (ArrayRef, ArrayRef) { let lhs=match case.shape { Shape::LeftConstant => ConstantArray::new(T::value(13,0),case.rows).into_array(), _ => array::<T>(case,0) }; let rhs=match case.shape { Shape::RightConstant => ConstantArray::new(T::value(13,0),case.rows).into_array(), _ => array::<T>(case,1) }; (lhs,rhs) } fn scalar_inputs<T: Input>(case: Case, index: usize) -> (T,T) { let lhs=match case.shape { Shape::LeftConstant => T::value(13,0), _ => T::value(index,0) }; let rhs=match case.shape { Shape::RightConstant => T::value(13,0), _ => T::value(index,1) }; (lhs,rhs) } fn check_enabled() -> bool { std::env::var_os("VORTEX_PERF_CHECK").is_some() } fn measure(bencher: Bencher, lhs: ArrayRef, rhs: ArrayRef, op: Operator) { let session=vortex_session::VortexSession::empty(); bencher.with_inputs(|| (&lhs,&rhs,session.create_execution_ctx())).bench_refs(|(lhs,rhs,ctx)| { lhs.clone().binary(rhs.clone(),op).unwrap().execute::<Canonical>(ctx).unwrap() }); } #[divan::bench(args=CASES, types=[u8,i64,u64,f32,f64])] fn compare<T: Input>(bencher: Bencher, case: &Case) { let case=*case; let (lhs,rhs)=operands::<T>(case); let op=match case.op { Comparison::Eq => Operator::Eq, Comparison::Gte => Operator::Gte }; if check_enabled() { let session=vortex_session::VortexSession::empty(); let mut ctx=session.create_execution_ctx(); let actual=lhs.clone().binary(rhs.clone(),op).unwrap().execute::<Canonical>(&mut ctx).unwrap().into_array(); let expected_values=(0..case.rows).map(|i| { let(a,b)=scalar_inputs::<T>(case,i); match case.op {Comparison::Eq=>a.is_eq(b),Comparison::Gte=>a.is_ge(b)} }).collect(); let expected=BoolArray::new(expected_values,lhs.validity().unwrap().and(rhs.validity().unwrap()).unwrap()).into_array(); vortex_array::assert_arrays_eq!(&actual,&expected,&mut ctx); } measure(bencher,lhs,rhs,op); } trait Arithmetic: Input { fn multiply(self, other: Self) -> Self; fn add(self, other: Self) -> Self; } impl Arithmetic for i64 { fn multiply(self, other: Self)->Self{self*other} fn add(self,other:Self)->Self{self+other} } impl Arithmetic for u64 { fn multiply(self, other: Self)->Self{self*other} fn add(self,other:Self)->Self{self+other} } #[divan::bench(args=[64,8192,32768], types=[i64,u64])] fn multiply<T: Arithmetic>(bencher: Bencher, rows: usize) { let case=Case{rows,shape:Shape::Arrays,validity:InputValidity::Dense,op:Comparison::Eq}; let(lhs,rhs)=operands::<T>(case); if check_enabled(){ let session=vortex_session::VortexSession::empty();let mut ctx=session.create_execution_ctx(); let actual=lhs.clone().binary(rhs.clone(),Operator::Mul).unwrap().execute::<Canonical>(&mut ctx).unwrap().into_array(); let expected=PrimitiveArray::new((0..rows).map(|i|{let(a,b)=scalar_inputs::<T>(case,i);a.multiply(b)}).collect::<Buffer<_>>(),Validity::NonNullable).into_array(); vortex_array::assert_arrays_eq!(&actual,&expected,&mut ctx); } measure(bencher,lhs,rhs,Operator::Mul); } #[divan::bench(args=[64,8192,32768], types=[i64,u64])] fn add_nullable<T: Arithmetic>(bencher: Bencher, rows: usize) { let case=Case{rows,shape:Shape::RightConstant,validity:InputValidity::Nullable,op:Comparison::Eq}; let(lhs,rhs)=operands::<T>(case); if check_enabled(){ let session=vortex_session::VortexSession::empty();let mut ctx=session.create_execution_ctx(); let actual=lhs.clone().binary(rhs.clone(),Operator::Add).unwrap().execute::<Canonical>(&mut ctx).unwrap().into_array(); let expected=PrimitiveArray::new((0..rows).map(|i|{let(a,b)=scalar_inputs::<T>(case,i);Arithmetic::add(a,b)}).collect::<Buffer<_>>(),lhs.validity().unwrap()).into_array(); vortex_array::assert_arrays_eq!(&actual,&expected,&mut ctx); } measure(bencher,lhs,rhs,Operator::Add); } #[divan::bench(args=[64,8192,65536])] fn bool_control(bencher: Bencher, rows: usize) { let lhs=BoolArray::from_iter((0..rows).map(|i|i%3==0)).into_array(); let rhs=BoolArray::from_iter((0..rows).map(|i|i%5==0)).into_array(); measure(bencher,lhs,rhs,Operator::Eq); } ``` </details> Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
This PR changes Codspeed benchmarks to measure more useful work and not
noise.
1. take_union: array size 100k -> 10k. Creating 100k rows with format!()
dominates runtime.
2. bench_for_compress_i32: create new array for every iteration. FoR
reads Min
from cache from second iteration if we don't do this.
3. bench_alp_rd_compress_f64: move out RDEncoder training out of
iteration.
4. python test_scan_scalar_at: move out array creation from benchmark
5. slice_bounds: remove runs for 4096 elements as they're too small and
noisy.
6. rank: remove runs for 1024 elements as they're too small and noisy.
7. bloom_filter: remove run for 1048576 elements as this dominates
runtime (32mb
insert for every iteration is not a microbenchmark).
8. alp_ compress: use more random values so that ALP dictionary doesn't
contain
all of them.
9. fastlanes bitpack_compare: remove all specialisations but 64 * 1024
elements
and bit width 16. Output is ConstantArray so specializations don't
differ.
10. fastlanes bitpack_compare_sweep: 64 fastlanes blocks -> 8 block. 64
blocks
dominate shard time.
11. fastlanes bitpacking_filter: remove selected_per_chunk = 8 as it's
too fast
for stable measure. Move mask clone out of iteration.
12. fastlanes bitpacking_take: remove selected_per_chunk = 8. Lower rows
from
4096 to 512 values (dominates run time for small take sizes). Remove
assert_array_eq, benchmark shouldn't measure correctness. Make
isolated_runs
matrix smaller.
13. fastlanes canonicalize_bench: measure benchmarks in codspeed, lower
size to
1000 elements from 10000.
14. fastlanes cast_bitpacked: remove non-existent canonicalize_then_cast
doc.
15. fsst_take: remove canonicalization and array_assert_eq, benchmark
should not
measure correctness. Lower 64 test cases to 24.
16. run_end_null_count: run fixture on every iteration. NullCount is
cached,
array measures cache read otherwise.
17. run_end_sum: increase length from 2048 to 65536, on small values
kernel
dispatch dominates the runtime
18. run_end_take: increase take length from 2048 to 4096 and 8192 to
measure
array_length <= take * 8 special case.
19. sparse_compare: move make_sparse creation from input preparation.
Execute
until Sparse instead of canonicalizing.
20. lt_i64_nullable: use I64_LEN instead of LEN so that walltime checks
use same
265kb of data and are less noisy.
21. cast_i32_to_u32: build PrimitiveArray on every iteration. Min/Max
was cached
on first scan and subsequent iterations measures stats cached value
read.
22. chunked_dict_builder: lower tested cases from 48 to 12.
23. chunked_fsl_canonicalize: lower lists per chunk from 1000 to 128,
remove
1024 list size case as counting allocations dominates the runtime.
24. compare_sorted: remove non-implemented sorted fast path code.
25. dict_compare: remove 42 nearly identical cases. Dict decode still
dominates
the runtime.
26. dict_compress: remove extra length arguments from benchmark. Dict
compression doesn't significantly depend on dict length but rather on
values
length.
27. dict_unreferences_mask: don't reference last value so scan does
indeed cover
every code.
28. case_when_fragmented: increase sizes from 100 and 400 to 4096 and
16384 as
expression dispatch dominates runtime with small sizes.
29. density_sweep_single_slice: remove 12 density cases. Every sweep is
an O(1)
slice.
30. filter_all_true: remove all cases but one. Every AllTrue slice is a
child
clone which is independent of input size.
31. filter_ultra_sparse: remove 100000 elements case in which mask
reduces to a
slice case.
32. kleene_bool: remove benchmarks which measure same thing as _aligned
benchmarks.
33. take_chunked: remove single-element take as it's too fast.
34. take_filter: create a FilterArray instead of filtering a
PrimitiveArray as
.filter() calls .optimize() and filter is transformed to a slice.
35. stats calc: use a deterministic seed every time.
36. bench_stats: create a new array per iteration as it's done for
integer
stats.
37. btrblocks compress: create a new array per iteration, same as (36)
38. btrblocks compress_listview: clear statistics per iteration to avoid
reading
cached stats.
39. buffer, bitbuffer: return computed values from bench so it's not
optimized
out. Lower checked cases size, remove small cases which are noisy.
40. intersect_by_rank: create a new mask per iteration so every
iteration uses
fresh indices.
41. runend_cuda: add StandaloneOnly dispatch mode as it's done for ALP
benchmark.
41. zstd_cuda: use 10m rows instead of 100m as done for FSST and OnPair.
Non-benchmark changes:
- haystack, dict builder: use a deterministic hasher instead of a fully
random one.
Primitive builder already uses it.
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
…ata#10861) Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
…er (vortex-data#10689) Scan level conjunct splitting cannot seperate predicates such as a > 1 OR (a = 1 and b > 4), because the disjunction must remain intact. The struct reader previously skipped pruning for these multi-field predicates, forcing scans to decode zones that column statistics could rule out. --------- Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
…x-data#10856) Profiling the compress benchmark showed that file statistics, not compression, took most of the Vortex write time: - **File stats ran serially.** `accumulate_stats` ran every column's aggregates in one `stream.scan`, in front of the parallel compressors. On CMSprovider, this alone was about as long as the full write. - **Min/max ran twice.** `Max`/`Min` and `BoundedMax`/`BoundedMin` each ran their own `min_max` scan. String chunks were also converted from VarBin to VarBinView twice. - **Unsupported aggregates built errors.** `StatsAccumulator::new` called `accumulator()` and threw the error away for each unsupported aggregate (for example `NanCount` on non-floats). Each error captures a backtrace. On a table with 10k columns, this took ~200 ms per write, and the CI benchmarks set `RUST_BACKTRACE=full`. ## Results These numbers also include the `SequenceId` lock contention fix, which is now in vortex-data#10867. Compress time, min of 3 iterations, 16 threads, Apple Silicon: | Dataset | Parquet (ms) | Vortex before (ms) | Vortex after (ms) | Speedup | |---|---:|---:|---:|---:| | taxi | 147 | 254 | 152 | 1.67× | | Arade | 482 | 520 | 311 | 1.67× | | Bimbo | 1625 | 2263 | 1816 | 1.25× | | CMSprovider | 708 | 1995 | 723 | 2.76× | | Euro2016 | 397 | 210 | 156 | 1.34× | | Food | 212 | 190 | 129 | 1.47× | | HashTags | 214 | 401 | 319 | 1.26× | | TPC-H l_comment chunked | 758 | 611 | 323 | 1.89× | | TPC-H l_comment canonical | 759 | 607 | 332 | 1.83× | | wide cols=10000 chunks=1 | 206 | 492 | 246 | 2.00× | | wide cols=10000 chunks=50 | 219 | 457 | 249 | 1.84× | --------- Signed-off-by: Robert Kruszewski <github@robertk.io>
…#10865) Extract the generic predicate source and per-generation bindings from vortex-data#10665. Reuse native dynamic-expression update tracking for predicates whose declared inputs remain stable. DataFusion provides entirely dynamic expression trees, while our existing logic only handles dynamic comparisons with dynamic scalars. This PR adds initial support for dynamic expression trees. Signed-off-by: Nicholas Gates <nick@nickgates.com>
Split out of vortex-data#10856. - Allocate and free keys outside the lock. - Skip the waker lookup when no waker is registered. Most sequences never collapse, so usually no waker waits. - In `descend`, replace the parent with its child under one lock acquisition, instead of one to add the child and one to remove the parent. Signed-off-by: Robert Kruszewski <github@robertk.io>
) Extract generic dynamic predicate falsification from vortex-data#10665. Keep proofs live across predicate generations and conservatively retain rows when a proof or required statistic is unavailable. Signed-off-by: Nicholas Gates <nick@nickgates.com>
) ## Summary Keep empty encoded batches neutral in `IsConstant` accumulators. An empty FoR, Dict or RunEnd batch currently turns an otherwise constant input into a non-constant result. ## Changes - Return the empty partial before considering the kernel's constancy verdict. - Cover empty primitive, Dict, RunEnd and FoR batches before and after constant input, while preserving standalone `is_constant(empty) == false`. Related: vortex-data#2629. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
…ta#10889) ## Summary One-liner. Treat a singleton canonical batch as sorted while preserving checks against the preceding batch. Strict `IsSorted` now agrees with `is_strict_sorted` for a single null primitive, bool or decimal value. ## Changes - Apply the singleton rule before the dtype-specific within-batch check. - Cover singleton nulls across canonical, Constant, Dict and RunEnd representations, plus flat, split and Chunked inputs with null and duplicate boundaries. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
…ex-data#10851) `MinMax` over an extension type computed the min/max of its storage with the default NaN-skipping options, regardless of the options it was given. A NaN-including min/max (`skip_nans=false`) over an extension type stored as floats therefore skipped NaNs instead of returning NaN extrema.
vortex-data#10870) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [com.google.guava:guava](https://redirect.github.com/google/guava) | `33.6.0-jre` → `33.7.2-android` |  |  | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](..vortex-data/issues/357) for more information. --- ### Google Guava: CompactHashMap/CompactHashSet/MapMakerInternalMap deserialization triggers uncontrolled memory allocation [CVE-2026-102554](https://nvd.nist.gov/vuln/detail/CVE-2026-102554) / [GHSA-xxph-c9ww-hj94](https://redirect.github.com/advisories/GHSA-xxph-c9ww-hj94) <details> <summary>More information</summary> #### Details ##### CompactHashMap/CompactHashSet/MapMakerInternalMap native deserialization triggers uncontrolled memory allocation ##### Summary `CompactHashMap`, `CompactHashSet`, and `MapMakerInternalMap` implement `readObject(ObjectInputStream)` by reading an attacker-controlled `elementCount` or `initialCapacity` from the stream. On the very first insertion during or after deserialization (for the `CompactHash*` collections, inside `allocArrays()`) or immediately during deserialization (for `MapMakerInternalMap`), the implementation eagerly allocates arrays sized to that full, unvalidated value (up to `CompactHashing.MAX_SIZE` = 2^30-1, ~1.07 billion, for example) before the rest of the stream's actual content has been consumed. A 72-byte malicious serialized stream containing a single tiny element can force a multi-gigabyte allocation and crash a JVM with `OutOfMemoryError`, dynamically confirmed against the current release. ##### Details `CompactHashMap.readObject()` (`guava/src/com/google/common/collect/CompactHashMap.java`): ```java private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int elementCount = stream.readInt(); if (elementCount < 0) { throw new InvalidObjectException("Invalid size: " + elementCount); } init(elementCount); for (int i = 0; i < elementCount; i++) { K key = (K) stream.readObject(); V value = (V) stream.readObject(); put(key, value); } } ``` `elementCount` is only checked for being non-negative; there is no upper bound and no relationship enforced between the declared count and how much data actually follows in the stream. `init(elementCount)` (line 251) just stores the value (clamped to `[1, CompactHashing.MAX_SIZE]`, i.e. up to 2^30-1): ```java void init(int expectedSize) { Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0"); this.metadata = Ints.constrainToRange(expectedSize, 1, CompactHashing.MAX_SIZE); } ``` The real allocation is deferred to `allocArrays()`, which fires lazily on the *first* `put()` call — i.e. after only one key/value pair has actually been read off the wire: ```java int allocArrays() { ... int expectedSize = metadata; int buckets = CompactHashing.tableSize(expectedSize); this.table = CompactHashing.createTable(buckets); setHashTableMask(buckets - 1); this.entries = new int[expectedSize]; this.keys = new Object[expectedSize]; this.values = new Object[expectedSize]; return expectedSize; } ``` With `expectedSize` near `CompactHashing.MAX_SIZE` (2^30-1), this single call allocates a hash `table` plus three `expectedSize`-length arrays — multiple gigabytes — triggered by a stream that has, at that point, only supplied one small real element. `CompactHashSet.readObject()`/`allocArrays()` have the identical shape. `CompactLinkedHashMap`/`CompactLinkedHashSet` extend these classes and inherit the same unguarded path. The problem with `MapMakerInternalMap` is similar, with [a size read from the serialized data and stored in a `MapMaker` instance](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L2848-L2851) for [later user during deserialization](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L2897), when [the `MapMaker` is passed back to `MapMakerInternalMap`](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMaker.java#L287) and [segments are allocated](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L173-L200) by [calling `newSegment`](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1143), whose implementations ([example](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L443)) create `Segment` instances ([example](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L2019)) that [allocate arrays of the requested capacity](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1234) through [the `newTable`](https://redirect.github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1262) helper. This is the same amplification shape as the already-fixed **CVE-2018-10237** (`AtomicDoubleArray`/`CompoundOrdering`: attacker declares a large size, library eagerly allocates before validating against actual stream content). That fix rewrote `AtomicDoubleArray.readObject()` to grow an `ImmutableLongArray.Builder` incrementally per element actually read, rather than pre-allocating from the declared size — Guava's own `HashBiMap.readObject()` documents the same defensive principle explicitly in a comment: `init(16); // resist hostile attempts to allocate gratuitous heap`. `CompactHashMap`/`CompactHashSet` do not follow either of these two patterns already present elsewhere in the same codebase. **Reachability**: All classes are top-level, `implements ... Serializable`, and require no special classpath setup beyond Guava being present (near-ubiquitous on JVM backends). A native Java deserialization attacker names the class directly in a hand-crafted stream — no particular Guava factory method needs to have been used by the victim application, exactly as with the precedent CVE. ##### PoC Full source and run instructions in the attached `poc-guava-compacthash-dos.zip` (Maven project, `guava:33.7.1-jre` — the current latest release — as the only dependency). The PoC: 1. Uses reflection only to legitimately obtain a `CompactHashSet` instance (it is package-private; a real attacker does not need this step, since they craft the serialized bytes directly rather than calling Guava's own serialization code). 2. Serializes one set with 1 element and one with 2 elements, diffs the two byte streams to locate the exact offset of the `elementCount` field (byte-precise, not guessed). 3. Patches that one 4-byte field in the 1-element stream from `1` to `0x3FFFFFFF` (`CompactHashing.MAX_SIZE`), leaving the rest of the 72-byte stream (one real `"A"` element) untouched. 4. Feeds the resulting 72-byte malicious stream into a plain `new ObjectInputStream(...).readObject()` call against the real, unmodified `guava-33.7.1-jre.jar`. Actual run output: ``` ##### -Xmx8g (generous heap) ### Located size field at offset 63, value=1 (expected 1) Malicious stream size: 72 bytes Declared elementCount: 1073741823 (~1.07 billion) Real payload: 1 tiny string element ("A") === RESULT === Exception: java.lang.OutOfMemoryError: Java heap space Time to allocate+fail: 4013 ms Heap used before: 3 MB Heap used after (at failure point): 4103 MB JVM max heap (-Xmx): 8192 MB ##### -Xmx128m (ordinary service-sized heap) ### Located size field at offset 63, value=1 (expected 1) Malicious stream size: 72 bytes Declared elementCount: 1073741823 (~1.07 billion) Real payload: 1 tiny string element ("A") === RESULT === Exception: java.lang.OutOfMemoryError: Java heap space Time to allocate+fail: 24 ms Heap used before: 4 MB Heap used after (at failure point): 2 MB JVM max heap (-Xmx): 128 MB ``` A 72-byte input forces ~4.1 GB of real allocation before failing on an 8 GB heap, and crashes a 128 MB heap in 24 ms — over 50,000x amplification between input size and forced allocation. To reproduce: `mvn -q compile dependency:build-classpath -Dmdep.outputFile=cp.txt && java -Xmx128m -cp "target/classes:$(cat cp.txt)" poc.Poc` ##### Impact Uncontrolled resource consumption (CWE-770 / CWE-400) via native Java deserialization: any application that runs `ObjectInputStream.readObject()` on data reachable by an attacker, and has Guava on its classpath (true for a large fraction of the JVM ecosystem), can be crashed with a single ~72-byte payload, regardless of what type the application itself expected to deserialize. ##### Severity CVSS 3.1: `AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H` — identical vector to CVE-2018-10237, the precedent this is a sibling of. Recomputed with the full formula: exploitability = 8.22×0.85×0.44×0.85×0.85 = 2.221; ISS = 1-(1×1×0.44) = 0.56; impact = 6.42×0.56 = 3.595; base = roundup(5.816) = **5.9 (Medium)**. ##### Affected `com.google.guava:guava`, all editions (`-jre`/`-android`) — confirmed on the current latest release, 33.7.1-jre. `CompactHashMap`/`CompactHashSet`/`CompactLinkedHashMap`/`CompactLinkedHashSet` have had this same `readObject`/`allocArrays` shape for a long time (probably since they were added in Guava 23.6), and similarly for `MapMakerInternalMap` (which was introduced in Guava 4.0); not tested against older individual releases. ##### Suggested fix Apply the same defense already used elsewhere in this codebase: either clamp the initial `init()` capacity to a small constant regardless of the declared `elementCount` (as `HashBiMap.readObject()` already does — `init(16); // resist hostile attempts to allocate gratuitous heap`) and grow incrementally as elements are actually read, or grow the backing arrays incrementally per iteration of the deserialization loop (as the fixed `AtomicDoubleArray.readObject()` does via `ImmutableLongArray.Builder`) instead of eagerly sizing to the full attacker-declared count on first insert. #### Severity - CVSS Score: 8.2 / 10 (High) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N` #### References - [https://github.com/google/guava/security/advisories/GHSA-xxph-c9ww-hj94](https://redirect.github.com/google/guava/security/advisories/GHSA-xxph-c9ww-hj94) - [https://nvd.nist.gov/vuln/detail/CVE-2026-102554](https://nvd.nist.gov/vuln/detail/CVE-2026-102554) - [https://github.com/google/guava/commit/b931fe9d6d5cf00bc55714ad3308d086f71850fe](https://redirect.github.com/google/guava/commit/b931fe9d6d5cf00bc55714ad3308d086f71850fe) - [https://github.com/google/guava](https://redirect.github.com/google/guava) - [https://github.com/google/guava/releases/tag/v33.7.2](https://redirect.github.com/google/guava/releases/tag/v33.7.2) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-xxph-c9ww-hj94) and the [GitHub Advisory Database](https://redirect.github.com/github/advisory-database) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/vortex-data/vortex). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE4OC4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJjaGFuZ2Vsb2cvY2hvcmUiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ortex-data#10894) Use file statistics to bypass row filtering when a predicate is proven true. Cache satisfaction and falsification by expression and dynamic version; check pruning when polled and satisfaction after the input mask resolves. Producer changes invalidate cached decisions, including updates after queuing. Unknown, null or failed satisfaction proofs retain normal filter evaluation. Signed-off-by: Nicholas Gates <nick@nickgates.com>
…rtex-data#10895) Preserve fixed boolean structure and exact producer-aware conversions before adapting unknown predicates to generic dynamic nodes. Remap declared inputs once, cache body conversion by generation, retain exact residuals in DataFusion, and treat unsupported or fallible hints as no additional restriction. Signed-off-by: Nicholas Gates <nick@nickgates.com>
…10901) Scan API has partitions. DataFusion has partitions. These are not the same partitions... If Scan API reports 100 partitions, DataFusion will drive 100 streams concurrently. This PR stores DataFusions desired partition count `n`, and then `n` streams are driven each claiming one Scan API partition at a time. Signed-off-by: Nicholas Gates <nick@nickgates.com>
Lets callers build a DictLayout directly instead of going through VTable::build, whose deserialize derives codes nullability from the column when is_nullable_codes is unset. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: halvorboe <halvor@tsuga.com>
LIKE was restricted to Utf8 inputs: `Like::return_dtype` rejected Binary haystacks. But SQL LIKE over binary/bytea is well defined as a byte-wise match, and the matcher already runs over the haystack bytes. - `Like::return_dtype` accepts Binary input for case-sensitive LIKE. ILIKE over Binary is still rejected, since case folding is only well defined over text. - The regex fallback in `LikePattern` compiles with `.unicode(false)` when the haystack is Binary, so `_`/`.` match a single byte and `%`/`.*` span arbitrary bytes (including invalid UTF-8). Utf8 haystacks keep Unicode codepoint semantics, unchanged. The literal fast paths (Eq/StartsWith/EndsWith/Contains) were already byte-based. Utf8 LIKE behavior is unchanged. Added tests covering the byte-vs-codepoint distinction on multi-byte and invalid-UTF-8 data, and the ILIKE-over-Binary rejection. On `aЖb` (Ж = 2 bytes), `a_b` matches under Utf8 (one codepoint) but not under Binary (one byte); `a__b` matches under Binary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 721b719)
The cherry-picked commit was written against `Like.try_new_array`, which no longer exists at this rev. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
LIKE now accepts Binary haystacks, but the falsifier rewrites a prefix or exact pattern into min/max comparisons against the Utf8 pattern literal. Those dtypes do not compare, so pruning panicked with "Cannot compare different DTypes binary? and utf8" before any rows were returned. Binary input now prunes nothing rather than coercing the literal, which keeps the rewrite free of implicit coercions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Building a StructReader cloned every field dtype and name and bound a pack expression over every field, so each reader cost grew with the column count. Readers are rebuilt per scan from a cached footer, so this work repeated on every scan of a wide file. Keep that state on the struct layout and share it. The reader's own field-name map is dropped in favour of StructFields::find. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening a file verified the whole layout flatbuffer before reading anything, so the cost grew with every node of every column even when a scan touched a few of them. Verify the root table up front and each child table when that child is built, together with the encoding and row count of its own children, which a parent reads without building them. Foreign layouts are built eagerly, so their subtree is still verified in full, and the nesting limit is enforced as layouts are built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
antoine-gauvain
had a problem deploying
to
github-pages
October 27, 2026 22:32 — with
GitHub Actions
Failure
antoine-gauvain
had a problem deploying
to
github-pages
October 27, 2026 22:50 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
No description provided.