Skip to content

feat(parquet): add native REE support - #11273

Draft
HippoBaro wants to merge 17 commits into
apache:mainfrom
HippoBaro:ree
Draft

HippoBaro wants to merge 17 commits into
apache:mainfrom
HippoBaro:ree

Conversation

@HippoBaro

@HippoBaro HippoBaro commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This is a draft PR and is not intended to be merged as-is.

Hi all! This PR adds native run-end-encoded (REE) writes to the Parquet Arrow writer, continuing the run-proportional work tracked in #9731. It avoids expanding REE inputs into dense arrays, preserving repetition through nested traversal, level generation, and physical encoding.

The change

I'm very happy to report that the REE support is now complete! REE can appear at any level of the schema, and arbitrary compositions such as REE<List<REE<Struct<...>>>> are fully supported. We no longer materialize dense representations for REE inputs anywhere along the write path.

At a high level, this required redesigning the Arrow-to-Parquet conversion pipeline. Instead of preparing fully materialized inputs for a collection of encoding paths, the writer now incrementally describes what to write and lets a shared, type-aware backend consume the original Arrow storage directly. Once that underlying architecture was in place, adding REE on top was actually not all that difficult.

This new architecture also makes almost all workloads faster, particularly when the old intermediate representation was less memory-efficient than the original Arrow one. Boolean arrays are an extreme example: Arrow gives us a bitmap, but the old path materializes it into a Rust [bool] representation, only to eventually turn it back into a bitmap again further down the pipeline. The bool_non_null/default workload now reduces to essentially a memcpy, resulting in ~97% lower runtime (40× faster) and ~98% lower peak memory usage (61× less). This is an extreme case, but many other workloads benefit as well, including fixed_size_binary*, decimal128, and most dictionary workloads, to varying degrees (see the performance section below).

Proposed upstreaming approach

I originally intended to upstream this entirely through small, independently mergeable PRs, as we started doing with #9653. However, the REE work turned out to be too complex and wide-ranging for me to confidently publish it incrementally without risking having to revisit abstractions that had already been merged. I ultimately had to finish the implementation before I could settle on a practical upstreaming sequence.

That hopefully explains both the long gap and why I’m now showing up with exactly the kind of large PR I had hoped to avoid!

I tried to split the work into small, independently mergeable contributions, but found it difficult to keep every intermediate step both self-contained and performance-neutral without introducing dead code or making individual changes too large. In many cases, a correct and fully tested intermediate abstraction adds overhead that only disappears once its consumers are migrated. With the benchmark suite taking several hours per commit, maintaining all of these constraints across 30+ commits became completely impractical.

I’d therefore like to separate the unit of review from the unit of merging: keep commits small enough to review individually, but group them into GitHub PR stacks whose complete changes are benchmarked and merged together.

I hope this is a reasonable compromise. The 26 commits are organized into four stacks:

Every commit on the branch remains a correct, working state with all tests, fmt, clippy, doc, etc passing. Performance, however, is guaranteed only at the final commit of each stack. Stack A contains some breaking bug fixes, but stacks B through D preserve the existing API and can be shipped without a major version change.

Performance

I realize this is a substantial amount of code to work through. Hopefully the high-level performance results below provide enough of a carrot to make the review worthwhile 🙇:

Compute (`arrow_writer`, geomean):
   +--------------+----------------+----------------+----------------+
   | Baseline     | All 483 cases  | REE            | Non-REE        |
   +--------------+----------------+----------------+----------------+
   | Stack A      |       baseline |       baseline |       baseline |
   | Stack B      |        -11.07% |         -1.34% |        -16.49% |
   | Stack C      |        -17.42% |         -2.09% |        -25.50% |
   | Stack D      |        -50.46% |        -74.55% |        -25.87% |
   +--------------+----------------+----------------+----------------+
   +- 173 cases are at least 2× faster.
   +- 30 cases reduce runtime by at least 90%—at least 10× faster.
   +- The median case takes 32.67% less time.
   +- For reference, the geometric-mean runtime reduction is 50.46%.


Peak memory (`arrow_writer_peak_memory`, geomean):
   +--------------+----------------+----------------+----------------+
   | Baseline     | All 96 cases   | REE            | Non-REE        |
   +--------------+----------------+----------------+----------------+
   | Stack A      |       baseline |       baseline |       baseline |
   | Stack B      |        -21.24% |         -9.10% |        -29.55% |
   | Stack C      |        -46.02% |        -11.09% |        -63.38% |
   | Stack D      |        -86.05% |        -95.96% |        -63.38% |
   +--------------+----------------+----------------+----------------+
   +- 68 cases use at most half as much peak memory.
   +- 40 cases reduce peak memory by at least 90%.
   +- Every REE memory case uses at most half as much memory.
   +- The median case uses 81.15% less peak memory.
   +- For reference, the geometric-mean reduction is 86.05%.

We've also integrated these changes into Datadog's private fork, where we're seeing roughly 2× higher write throughput on production-like, non-synthetic data. This isn't directly comparable to the synthetic benchmark suite above, but it gives us confidence that the improvements carry over to real-world workloads.

@HippoBaro
HippoBaro marked this pull request as draft September 28, 2026 21:02
@github-actions github-actions Bot added parquet parquet crate arrow Changes to the arrow crate arrow-buffer labels Sep 28, 2026
@HippoBaro

Copy link
Copy Markdown
Contributor Author

This PR is intended to give reviewers context on the final destination as they review the individual PRs. As those PRs are merged, I’ll keep rebasing this one so that the draft always reflects the most up-to-date version of the remaining work to review.

@HippoBaro

Copy link
Copy Markdown
Contributor Author

@etseidl is a review machine, and a lot of the "stack A" commits have already been merged. I’ll rebase this soon so the draft is back up to date!

@alamb

alamb commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

run benchmarks arrow_writer

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5888564754-2904-4mzzn 6.12.94+ #1 SMP Wed Aug 19 07:47:20 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing ree (6906adb) to 92b5042 (merge-base) diff

Run configuration
run benchmark arrow_writer

BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request hit the 7200s job deadline before finishing.

Benchmarks requested: arrow_writer

Kubernetes message
Job was active longer than specified deadline

File an issue against this benchmark runner

@alamb

alamb commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

I realize this is a substantial amount of code to work through. Hopefully the high-level performance results below provide enough of a carrot to make the review worthwhile 🙇:

Sounds great to me. I think there are many parts of the current parquet writer that are hold overs from the original version which was somewhat of a java --> rust transliteration. I am glad that by rethinking the abstractions, things are better

I am also glad to see us moving into the third phase of optimization

@Rich-T-kid

Copy link
Copy Markdown
Contributor

run benchmarks arrow_writer
env:
BENCH_FILTER: ree

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arrow_writer

Sharding factor: 1 (1 workers).

Comparing ree (6cec2ae) to 3e03c57 (merge-base) diff

Run configuration
run benchmark arrow_writer
env:
  BENCH_FILTER: ree
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor

super cool stuff here

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arrow_writer

Comparing ree (6cec2ae) to 3e03c57 (merge-base) diff

Run configuration
run benchmark arrow_writer
env:
  BENCH_FILTER: ree
shards: 1
Details
group                                                             base                                   changed
-----                                                             ----                                   -------
bool_ree/bloom_filter                                             4.43     27.8±0.03ms     7.7 MB/sec    1.00      6.3±0.01ms 159.3 MElem/sec
bool_ree/cdc                                                      2.59     29.0±0.04ms     7.3 MB/sec    1.00     11.2±0.03ms 89.3 MElem/sec
bool_ree/default                                                  4.06     25.1±0.03ms     8.5 MB/sec    1.00      6.2±0.01ms 161.7 MElem/sec
bool_ree/number_distinct_values                                   5.27     37.1±0.06ms     5.7 MB/sec    1.00      7.0±0.01ms 142.1 MElem/sec
bool_ree/parquet_2                                                4.12     25.9±0.03ms     8.2 MB/sec    1.00      6.3±0.01ms 159.0 MElem/sec
bool_ree/zstd                                                     3.78     25.7±0.03ms     8.3 MB/sec    1.00      6.8±0.01ms 146.7 MElem/sec
bool_ree/zstd_parquet_2                                           3.97     26.2±0.03ms     8.1 MB/sec    1.00      6.6±0.01ms 151.3 MElem/sec
fixed_size_binary_ree/bloom_filter                                5.99     74.5±0.45ms    13.5 MB/sec    1.00     12.4±0.22ms 80.5 MElem/sec
fixed_size_binary_ree/cdc                                         2.71     59.8±0.33ms    16.9 MB/sec    1.00     22.1±0.25ms 45.3 MElem/sec
fixed_size_binary_ree/default                                     6.26     65.9±0.35ms    15.3 MB/sec    1.00     10.5±0.29ms 95.0 MElem/sec
fixed_size_binary_ree/number_distinct_values                      6.45     83.9±0.45ms    12.0 MB/sec    1.00     13.0±0.25ms 76.9 MElem/sec
fixed_size_binary_ree/parquet_2                                   9.64     77.6±0.39ms    13.0 MB/sec    1.00      8.1±0.02ms 124.2 MElem/sec
fixed_size_binary_ree/zstd                                        4.55     71.7±0.43ms    14.1 MB/sec    1.00     15.7±0.26ms 63.5 MElem/sec
fixed_size_binary_ree/zstd_parquet_2                              9.14     78.4±1.00ms    12.9 MB/sec    1.00      8.6±0.01ms 116.6 MElem/sec
fixed_size_binary_ree_low_cardinality/bloom_filter                                                       1.00      5.1±0.58ms 197.1 MElem/sec
fixed_size_binary_ree_low_cardinality/cdc                                                                1.00     17.5±0.56ms 57.1 MElem/sec
fixed_size_binary_ree_low_cardinality/default                                                            1.00      5.0±0.59ms 201.6 MElem/sec
fixed_size_binary_ree_low_cardinality/number_distinct_values                                             1.00      5.2±0.59ms 191.4 MElem/sec
fixed_size_binary_ree_low_cardinality/parquet_2                                                          1.00    565.4±3.05µs 1768.7 MElem/sec
fixed_size_binary_ree_low_cardinality/zstd                                                               1.00     25.7±0.59ms 38.8 MElem/sec
fixed_size_binary_ree_low_cardinality/zstd_parquet_2                                                     1.00    622.0±2.76µs 1607.7 MElem/sec
int32_ree/bloom_filter                                            4.38     34.0±0.08ms    12.0 MB/sec    1.00      7.8±0.01ms 128.9 MElem/sec
int32_ree/cdc                                                     2.91     37.4±0.06ms    10.9 MB/sec    1.00     12.8±0.01ms 77.9 MElem/sec
int32_ree/default                                                 4.53     33.6±0.05ms    12.1 MB/sec    1.00      7.4±0.00ms 134.7 MElem/sec
int32_ree/number_distinct_values                                  5.19     50.2±0.08ms     8.1 MB/sec    1.00      9.7±0.01ms 103.3 MElem/sec
int32_ree/parquet_2                                               4.52     33.6±0.04ms    12.1 MB/sec    1.00      7.4±0.01ms 134.6 MElem/sec
int32_ree/zstd                                                    4.29     34.1±0.04ms    11.9 MB/sec    1.00      7.9±0.01ms 125.9 MElem/sec
int32_ree/zstd_parquet_2                                          4.32     34.1±0.04ms    11.9 MB/sec    1.00      7.9±0.01ms 126.7 MElem/sec
int32_ree_95pct_null/bloom_filter                                 4.14     21.1±0.02ms    19.3 MB/sec    1.00      5.1±0.01ms 196.1 MElem/sec
int32_ree_95pct_null/cdc                                          3.20     23.3±0.05ms    17.5 MB/sec    1.00      7.3±0.01ms 137.3 MElem/sec
int32_ree_95pct_null/default                                      4.20     21.0±0.02ms    19.4 MB/sec    1.00      5.0±0.01ms 200.1 MElem/sec
int32_ree_95pct_null/number_distinct_values                       4.16     21.9±0.02ms    18.5 MB/sec    1.00      5.3±0.01ms 189.7 MElem/sec
int32_ree_95pct_null/parquet_2                                    4.19     21.0±0.01ms    19.4 MB/sec    1.00      5.0±0.01ms 199.7 MElem/sec
int32_ree_95pct_null/zstd                                         4.05     21.3±0.02ms    19.1 MB/sec    1.00      5.2±0.01ms 190.6 MElem/sec
int32_ree_95pct_null/zstd_parquet_2                               4.09     21.2±0.03ms    19.2 MB/sec    1.00      5.2±0.01ms 193.2 MElem/sec
int64_ree_low_cardinality/bloom_filter                                                                   1.00    535.9±2.36µs 1865.9 MElem/sec
int64_ree_low_cardinality/cdc                                                                            1.00      7.4±0.02ms 134.5 MElem/sec
int64_ree_low_cardinality/default                                                                        1.00    452.9±2.31µs  2.2 GElem/sec
int64_ree_low_cardinality/number_distinct_values                                                         1.00    668.9±3.47µs 1494.9 MElem/sec
int64_ree_low_cardinality/parquet_2                                                                      1.00    456.6±2.32µs  2.1 GElem/sec
int64_ree_low_cardinality/zstd                                                                           1.00    513.5±2.35µs 1947.6 MElem/sec
int64_ree_low_cardinality/zstd_parquet_2                                                                 1.00    510.5±2.33µs 1958.8 MElem/sec
list_int32_ree/bloom_filter                                                                              1.00    114.0±0.16ms  8.8 MElem/sec
list_int32_ree/cdc                                                                                       1.00    165.0±0.12ms  6.1 MElem/sec
list_int32_ree/default                                                                                   1.00    113.9±0.16ms  8.8 MElem/sec
list_int32_ree/number_distinct_values                                                                    1.00    276.4±0.27ms  3.6 MElem/sec
list_int32_ree/parquet_2                                                                                 1.00    114.2±0.25ms  8.8 MElem/sec
list_int32_ree/zstd                                                                                      1.00    115.8±0.17ms  8.6 MElem/sec
list_int32_ree/zstd_parquet_2                                                                            1.00    114.9±0.17ms  8.7 MElem/sec
list_int32_ree_short_runs/bloom_filter                                                                   1.00    130.5±0.26ms  7.7 MElem/sec
list_int32_ree_short_runs/cdc                                                                            1.00    182.1±0.31ms  5.5 MElem/sec
list_int32_ree_short_runs/default                                                                        1.00    130.3±0.32ms  7.7 MElem/sec
list_int32_ree_short_runs/number_distinct_values                                                         1.00    293.9±0.43ms  3.4 MElem/sec
list_int32_ree_short_runs/parquet_2                                                                      1.00    130.4±0.25ms  7.7 MElem/sec
list_int32_ree_short_runs/zstd                                                                           1.00    135.8±0.25ms  7.4 MElem/sec
list_int32_ree_short_runs/zstd_parquet_2                                                                 1.00    134.9±0.22ms  7.4 MElem/sec
list_of_int32_ree/bloom_filter                                                                           1.00     16.5±0.02ms 60.6 MElem/sec
list_of_int32_ree/cdc                                                                                    1.00     47.5±0.15ms 21.1 MElem/sec
list_of_int32_ree/default                                                                                1.00     16.4±0.05ms 60.8 MElem/sec
list_of_int32_ree/number_distinct_values                                                                 1.00     17.5±0.04ms 57.1 MElem/sec
list_of_int32_ree/parquet_2                                                                              1.00     16.4±0.02ms 61.0 MElem/sec
list_of_int32_ree/zstd                                                                                   1.00     16.9±0.02ms 59.2 MElem/sec
list_of_int32_ree/zstd_parquet_2                                                                         1.00     16.5±0.02ms 60.7 MElem/sec
list_of_int32_ree_alt_empty/bloom_filter                                                                 1.00     44.2±0.11ms 22.6 MElem/sec
list_of_int32_ree_alt_empty/cdc                                                                          1.00     59.6±0.13ms 16.8 MElem/sec
list_of_int32_ree_alt_empty/default                                                                      1.00     44.1±0.11ms 22.7 MElem/sec
list_of_int32_ree_alt_empty/number_distinct_values                                                       1.00     45.2±0.10ms 22.1 MElem/sec
list_of_int32_ree_alt_empty/parquet_2                                                                    1.00     44.1±0.11ms 22.7 MElem/sec
list_of_int32_ree_alt_empty/zstd                                                                         1.00     44.6±0.10ms 22.4 MElem/sec
list_of_int32_ree_alt_empty/zstd_parquet_2                                                               1.00     44.2±0.11ms 22.6 MElem/sec
list_of_int32_ree_alt_null/bloom_filter                                                                  1.00     45.5±0.11ms 22.0 MElem/sec
list_of_int32_ree_alt_null/cdc                                                                           1.00     61.0±0.14ms 16.4 MElem/sec
list_of_int32_ree_alt_null/default                                                                       1.00     45.4±0.10ms 22.0 MElem/sec
list_of_int32_ree_alt_null/number_distinct_values                                                        1.00     46.7±0.10ms 21.4 MElem/sec
list_of_int32_ree_alt_null/parquet_2                                                                     1.00     45.4±0.11ms 22.0 MElem/sec
list_of_int32_ree_alt_null/zstd                                                                          1.00     45.9±0.10ms 21.8 MElem/sec
list_of_int32_ree_alt_null/zstd_parquet_2                                                                1.00     45.5±0.12ms 22.0 MElem/sec
list_of_list_int32_ree/bloom_filter                                                                      1.00    117.0±0.22ms  8.5 MElem/sec
list_of_list_int32_ree/cdc                                                                               1.00    168.2±0.24ms  5.9 MElem/sec
list_of_list_int32_ree/default                                                                           1.00    116.9±0.19ms  8.6 MElem/sec
list_of_list_int32_ree/number_distinct_values                                                            1.00    279.6±0.52ms  3.6 MElem/sec
list_of_list_int32_ree/parquet_2                                                                         1.00    117.0±0.22ms  8.5 MElem/sec
list_of_list_int32_ree/zstd                                                                              1.00    118.7±0.21ms  8.4 MElem/sec
list_of_list_int32_ree/zstd_parquet_2                                                                    1.00    118.2±0.18ms  8.5 MElem/sec
list_string_ree/bloom_filter                                                                             1.00    116.2±0.36ms  8.6 MElem/sec
list_string_ree/cdc                                                                                      1.00    166.6±0.40ms  6.0 MElem/sec
list_string_ree/default                                                                                  1.00    116.1±0.33ms  8.6 MElem/sec
list_string_ree/number_distinct_values                                                                   1.00    212.2±0.60ms  4.7 MElem/sec
list_string_ree/parquet_2                                                                                1.00    116.1±0.33ms  8.6 MElem/sec
list_string_ree/zstd                                                                                     1.00    117.2±0.33ms  8.5 MElem/sec
list_string_ree/zstd_parquet_2                                                                           1.00    117.0±0.45ms  8.5 MElem/sec
numeric_ree_of_dict/bloom_filter                                                                         1.00     10.6±0.03ms 93.9 MElem/sec
numeric_ree_of_dict/cdc                                                                                  1.00     16.0±0.04ms 62.4 MElem/sec
numeric_ree_of_dict/default                                                                              1.00     10.6±0.03ms 94.7 MElem/sec
numeric_ree_of_dict/number_distinct_values                                                               1.00     13.4±0.04ms 74.6 MElem/sec
numeric_ree_of_dict/parquet_2                                                                            1.00     10.6±0.03ms 94.7 MElem/sec
numeric_ree_of_dict/zstd                                                                                 1.00     10.7±0.03ms 93.2 MElem/sec
numeric_ree_of_dict/zstd_parquet_2                                                                       1.00     10.7±0.03ms 93.6 MElem/sec
ree_list_ree_list/bloom_filter                                                                           1.00    114.5±0.22ms  8.7 MElem/sec
ree_list_ree_list/cdc                                                                                    1.00    165.6±0.19ms  6.0 MElem/sec
ree_list_ree_list/default                                                                                1.00    114.1±0.16ms  8.8 MElem/sec
ree_list_ree_list/number_distinct_values                                                                 1.00    277.5±0.58ms  3.6 MElem/sec
ree_list_ree_list/parquet_2                                                                              1.00    114.2±0.16ms  8.8 MElem/sec
ree_list_ree_list/zstd                                                                                   1.00    115.2±0.16ms  8.7 MElem/sec
ree_list_ree_list/zstd_parquet_2                                                                         1.00    114.8±0.17ms  8.7 MElem/sec
ree_struct_of_dict/bloom_filter                                                                          1.00     27.0±0.07ms 37.1 MElem/sec
ree_struct_of_dict/cdc                                                                                   1.00     38.6±0.08ms 25.9 MElem/sec
ree_struct_of_dict/default                                                                               1.00     26.1±0.07ms 38.3 MElem/sec
ree_struct_of_dict/number_distinct_values                                                                1.00     36.1±0.08ms 27.7 MElem/sec
ree_struct_of_dict/parquet_2                                                                             1.00     26.2±0.06ms 38.2 MElem/sec
ree_struct_of_dict/zstd                                                                                  1.00     29.6±0.05ms 33.8 MElem/sec
ree_struct_of_dict/zstd_parquet_2                                                                        1.00     29.5±0.05ms 33.9 MElem/sec
string_ree/bloom_filter                                           3.50    165.7±5.18ms    99.0 MB/sec    1.00     47.3±0.10ms 21.1 MElem/sec
string_ree/cdc                                                    1.84    231.7±6.16ms    70.8 MB/sec    1.00    126.1±0.22ms  7.9 MElem/sec
string_ree/default                                                4.99    130.5±6.42ms   125.7 MB/sec    1.00     26.1±0.08ms 38.3 MElem/sec
string_ree/number_distinct_values                                 5.37    164.6±0.54ms    99.7 MB/sec    1.00     30.7±0.12ms 32.6 MElem/sec
string_ree/parquet_2                                              4.24    128.7±0.36ms   127.5 MB/sec    1.00     30.3±0.06ms 33.0 MElem/sec
string_ree/zstd                                                   2.34    180.8±0.60ms    90.8 MB/sec    1.00     77.2±0.20ms 13.0 MElem/sec
string_ree/zstd_parquet_2                                         3.21    143.3±0.32ms   114.5 MB/sec    1.00     44.6±0.05ms 22.4 MElem/sec
string_ree_95pct_null/bloom_filter                                4.18     24.3±0.05ms    57.9 MB/sec    1.00      5.8±0.01ms 172.0 MElem/sec
string_ree_95pct_null/cdc                                         2.46     31.8±0.08ms    44.2 MB/sec    1.00     12.9±0.01ms 77.3 MElem/sec
string_ree_95pct_null/default                                     4.25     24.1±0.03ms    58.5 MB/sec    1.00      5.7±0.02ms 176.8 MElem/sec
string_ree_95pct_null/number_distinct_values                      4.35     26.2±0.06ms    53.7 MB/sec    1.00      6.0±0.01ms 166.2 MElem/sec
string_ree_95pct_null/parquet_2                                   4.26     24.0±0.03ms    58.5 MB/sec    1.00      5.6±0.01ms 177.2 MElem/sec
string_ree_95pct_null/zstd                                        3.87     24.9±0.03ms    56.6 MB/sec    1.00      6.4±0.01ms 155.7 MElem/sec
string_ree_95pct_null/zstd_parquet_2                              3.90     24.8±0.03ms    56.8 MB/sec    1.00      6.4±0.01ms 157.4 MElem/sec
string_ree_int64_run_ends/bloom_filter                                                                   1.00    656.1±1.99µs 1524.1 MElem/sec
string_ree_int64_run_ends/cdc                                                                            1.00     11.8±0.02ms 84.7 MElem/sec
string_ree_int64_run_ends/default                                                                        1.00    569.8±1.87µs 1755.1 MElem/sec
string_ree_int64_run_ends/number_distinct_values                                                         1.00    824.6±1.64µs 1212.8 MElem/sec
string_ree_int64_run_ends/parquet_2                                                                      1.00    576.0±1.78µs 1736.2 MElem/sec
string_ree_int64_run_ends/zstd                                                                           1.00    633.8±1.78µs 1577.8 MElem/sec
string_ree_int64_run_ends/zstd_parquet_2                                                                 1.00    631.1±1.88µs 1584.6 MElem/sec
string_ree_low_cardinality/bloom_filter                                                                  1.00    649.5±2.36µs 1539.7 MElem/sec
string_ree_low_cardinality/cdc                                                                           1.00     11.8±0.02ms 84.7 MElem/sec
string_ree_low_cardinality/default                                                                       1.00    566.8±2.25µs 1764.3 MElem/sec
string_ree_low_cardinality/number_distinct_values                                                        1.00    821.7±2.12µs 1217.1 MElem/sec
string_ree_low_cardinality/parquet_2                                                                     1.00    571.9±2.23µs 1748.6 MElem/sec
string_ree_low_cardinality/zstd                                                                          1.00    628.9±2.30µs 1590.0 MElem/sec
string_ree_low_cardinality/zstd_parquet_2                                                                1.00    627.6±2.32µs 1593.4 MElem/sec
string_ree_of_dict/bloom_filter                                                                          1.00     11.4±0.05ms 87.8 MElem/sec
string_ree_of_dict/cdc                                                                                   1.00     16.8±0.04ms 59.5 MElem/sec
string_ree_of_dict/default                                                                               1.00     11.3±0.04ms 88.6 MElem/sec
string_ree_of_dict/number_distinct_values                                                                1.00     14.2±0.06ms 70.3 MElem/sec
string_ree_of_dict/parquet_2                                                                             1.00     11.3±0.05ms 88.4 MElem/sec
string_ree_of_dict/zstd                                                                                  1.00     11.6±0.04ms 86.3 MElem/sec
string_ree_of_dict/zstd_parquet_2                                                                        1.00     11.5±0.05ms 86.9 MElem/sec
struct_of_list_of_int32_ree_alt_null/bloom_filter                                                        1.00     44.6±0.08ms 22.4 MElem/sec
struct_of_list_of_int32_ree_alt_null/cdc                                                                 1.00     60.0±0.16ms 16.7 MElem/sec
struct_of_list_of_int32_ree_alt_null/default                                                             1.00     44.4±0.09ms 22.5 MElem/sec
struct_of_list_of_int32_ree_alt_null/number_distinct_values                                              1.00     45.7±0.08ms 21.9 MElem/sec
struct_of_list_of_int32_ree_alt_null/parquet_2                                                           1.00     44.6±0.12ms 22.4 MElem/sec
struct_of_list_of_int32_ree_alt_null/zstd                                                                1.00     45.0±0.08ms 22.2 MElem/sec
struct_of_list_of_int32_ree_alt_null/zstd_parquet_2                                                      1.00     44.6±0.07ms 22.4 MElem/sec
struct_of_list_of_int32_ree_fragmented/bloom_filter                                                      1.00     17.3±0.02ms 57.6 MElem/sec
struct_of_list_of_int32_ree_fragmented/cdc                                                               1.00     48.2±0.16ms 20.7 MElem/sec
struct_of_list_of_int32_ree_fragmented/default                                                           1.00     17.3±0.02ms 57.9 MElem/sec
struct_of_list_of_int32_ree_fragmented/number_distinct_values                                            1.00     18.3±0.02ms 54.7 MElem/sec
struct_of_list_of_int32_ree_fragmented/parquet_2                                                         1.00     17.3±0.04ms 58.0 MElem/sec
struct_of_list_of_int32_ree_fragmented/zstd                                                              1.00     17.7±0.02ms 56.4 MElem/sec
struct_of_list_of_int32_ree_fragmented/zstd_parquet_2                                                    1.00     17.3±0.02ms 57.8 MElem/sec
struct_of_list_of_int32_ree_single_null/bloom_filter                                                     1.00     17.4±0.03ms 57.6 MElem/sec
struct_of_list_of_int32_ree_single_null/cdc                                                              1.00     48.3±0.15ms 20.7 MElem/sec
struct_of_list_of_int32_ree_single_null/default                                                          1.00     17.3±0.03ms 57.9 MElem/sec
struct_of_list_of_int32_ree_single_null/number_distinct_values                                           1.00     18.3±0.02ms 54.6 MElem/sec
struct_of_list_of_int32_ree_single_null/parquet_2                                                        1.00     17.3±0.03ms 57.9 MElem/sec
struct_of_list_of_int32_ree_single_null/zstd                                                             1.00     17.8±0.03ms 56.3 MElem/sec
struct_of_list_of_int32_ree_single_null/zstd_parquet_2                                                   1.00     17.3±0.02ms 57.7 MElem/sec
struct_ree/bloom_filter                                                                                  1.00      3.1±0.00ms 321.2 MElem/sec
struct_ree/cdc                                                                                           1.00     19.4±0.01ms 51.5 MElem/sec
struct_ree/default                                                                                       1.00      2.9±0.00ms 340.7 MElem/sec
struct_ree/number_distinct_values                                                                        1.00      3.4±0.00ms 295.5 MElem/sec
struct_ree/parquet_2                                                                                     1.00      2.9±0.00ms 339.6 MElem/sec
struct_ree/zstd                                                                                          1.00      3.1±0.00ms 326.3 MElem/sec
struct_ree/zstd_parquet_2                                                                                1.00      3.1±0.00ms 327.1 MElem/sec
struct_ree_short_runs/bloom_filter                                                                       1.00     30.1±0.06ms 33.2 MElem/sec
struct_ree_short_runs/cdc                                                                                1.00     47.4±0.06ms 21.1 MElem/sec
struct_ree_short_runs/default                                                                            1.00     29.9±0.06ms 33.4 MElem/sec
struct_ree_short_runs/number_distinct_values                                                             1.00     35.4±0.05ms 28.2 MElem/sec
struct_ree_short_runs/parquet_2                                                                          1.00     30.0±0.05ms 33.4 MElem/sec
struct_ree_short_runs/zstd                                                                               1.00     30.1±0.05ms 33.2 MElem/sec
struct_ree_short_runs/zstd_parquet_2                                                                     1.00     30.1±0.05ms 33.2 MElem/sec

Per-runner information
arrow_writer — shard 1/1

Node: gk3-benchmark-cluster-nap-legsj59f-d84051f5-dpfq

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c5963644938-3039-jq8pc 6.12.94+ #1 SMP Wed Aug 19 07:47:20 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 550.1s
Peak memory 2.7 GiB
Avg memory 2.5 GiB
CPU user 474.8s
CPU sys 68.2s
Peak spill 0 B

branch

Metric Value
Wall time 2285.5s
Peak memory 2.3 GiB
Avg memory 239.9 MiB
CPU user 2281.2s
CPU sys 0.6s
Peak spill 0 B

File an issue against this benchmark runner

@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 14, 2026
@alamb alamb added the performance Speed or memory optimizations label Oct 16, 2026
@HippoBaro

Copy link
Copy Markdown
Contributor Author

run benchmark arrow_writer
shards: 4

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arrow_writer

Sharding factor: 4 (4 workers).

Comparing ree (d454d45) to 6b8df9c (merge-base) diff

Run configuration
run benchmark arrow_writer
shards: 4

Results will be posted when all workers finish.


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arrow_writer

Comparing ree (d454d45) to 6b8df9c (merge-base) diff

Run configuration
run benchmark arrow_writer
shards: 4

Comparison results: View the complete native critcmp output.

The comparison is published in an unlisted Gist because the original inline report exceeded GitHub's comment limit.

Per-runner information
arrow_writer — shard 1/4

Node: gk3-benchmark-cluster-nap-1s09vgvi-9c12f25e-b58q

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6237860805-3546-pw9sw 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1765.4s
Peak memory 2.0 GiB
Avg memory 193.1 MiB
CPU user 1729.8s
CPU sys 30.3s
Peak spill 0 B

branch

Metric Value
Wall time 1580.3s
Peak memory 2.0 GiB
Avg memory 144.2 MiB
CPU user 1561.9s
CPU sys 13.1s
Peak spill 0 B
arrow_writer — shard 2/4

Node: gk3-benchmark-cluster-nap-1s09vgvi-09904f92-tlnk

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6237860805-3547-s2ss5 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1820.4s
Peak memory 2.2 GiB
Avg memory 345.7 MiB
CPU user 1768.1s
CPU sys 50.1s
Peak spill 0 B

branch

Metric Value
Wall time 1705.4s
Peak memory 2.2 GiB
Avg memory 302.8 MiB
CPU user 1669.4s
CPU sys 31.7s
Peak spill 0 B
arrow_writer — shard 3/4

Node: gk3-benchmark-cluster-nap-1s09vgvi-780cabf5-vsqh

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6237860805-3548-649f7 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1955.4s
Peak memory 2.2 GiB
Avg memory 291.9 MiB
CPU user 1910.5s
CPU sys 40.7s
Peak spill 0 B

branch

Metric Value
Wall time 1790.4s
Peak memory 2.2 GiB
Avg memory 256.2 MiB
CPU user 1761.3s
CPU sys 24.8s
Peak spill 0 B
arrow_writer — shard 4/4

Node: gk3-benchmark-cluster-nap-1s09vgvi-5bd55644-tn6k

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6237860805-3549-t2fz7 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1785.4s
Peak memory 2.0 GiB
Avg memory 220.0 MiB
CPU user 1755.1s
CPU sys 26.0s
Peak spill 0 B

branch

Metric Value
Wall time 1655.4s
Peak memory 2.0 GiB
Avg memory 180.6 MiB
CPU user 1634.8s
CPU sys 15.2s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arrow_writer

Comparing ree (cd43e41) to 01a9917 (merge-base) diff

Run configuration
run benchmark arrow_writer
shards: 4

Comparison results: View the complete native critcmp output.

The comparison is published in an unlisted Gist because the original inline report exceeded GitHub's comment limit.

Per-runner information
arrow_writer — shard 1/4

Node: gk3-benchmark-cluster-nap-h91vzyol-ad34dca1-9xjk

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6354015964-3777-8kg6p 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1770.4s
Peak memory 2.1 GiB
Avg memory 193.8 MiB
CPU user 1732.6s
CPU sys 32.5s
Peak spill 0 B

branch

Metric Value
Wall time 1565.3s
Peak memory 2.1 GiB
Avg memory 146.1 MiB
CPU user 1547.6s
CPU sys 11.3s
Peak spill 0 B
arrow_writer — shard 2/4

Node: gk3-benchmark-cluster-nap-h91vzyol-ad34dca1-nqvt

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6354015964-3778-rzk58 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1800.4s
Peak memory 2.2 GiB
Avg memory 349.7 MiB
CPU user 1749.4s
CPU sys 45.8s
Peak spill 0 B

branch

Metric Value
Wall time 1680.4s
Peak memory 2.2 GiB
Avg memory 304.6 MiB
CPU user 1646.4s
CPU sys 28.6s
Peak spill 0 B
arrow_writer — shard 3/4

Node: gk3-benchmark-cluster-nap-h91vzyol-ad34dca1-2hml

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6354015964-3779-twv6l 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1930.4s
Peak memory 2.3 GiB
Avg memory 287.6 MiB
CPU user 1890.7s
CPU sys 37.6s
Peak spill 0 B

branch

Metric Value
Wall time 1775.4s
Peak memory 2.2 GiB
Avg memory 250.6 MiB
CPU user 1751.9s
CPU sys 21.3s
Peak spill 0 B
arrow_writer — shard 4/4

Node: gk3-benchmark-cluster-nap-h91vzyol-ad34dca1-gjcv

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

uname:

Linux bench-c6354015964-3780-c52dl 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Resource Usage

base (merge-base)

Metric Value
Wall time 1785.4s
Peak memory 2.1 GiB
Avg memory 225.1 MiB
CPU user 1755.2s
CPU sys 28.0s
Peak spill 0 B

branch

Metric Value
Wall time 1645.4s
Peak memory 2.1 GiB
Avg memory 184.9 MiB
CPU user 1626.6s
CPU sys 14.4s
Peak spill 0 B

File an issue against this benchmark runner

rustyconover pushed a commit to rustyconover/arrow-rs that referenced this pull request Oct 28, 2026
…e#11838)

# Which issue does this PR close?

<!--
It is not necessary to raise an issue, but it is encouraged if it is a
non-trivial
enhancement/bug.

If this PR relates to an existing issue, but does not fully resolve it,
please change
the wording below from "Closes #NNN" to "Relates to #NNN" or "Part of
#NNN" to avoid
false closing an issue.
-->

- Closes apache#11837
- Contributes to apache#9731
- Part of apache#11273

# Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the
issue then this section is not needed. Explaining clearly why changes
are proposed
helps reviewers understand your changes and offer better suggestions for
fixes.

Please try to explain the problem you are trying to solve in terms of
the user-visible
behavior, rather than the implementation.
-->

See apache#11837. Structural mismatches between the input batch, declared
schemas, and column writers should produce descriptive errors rather
than silently ignore columns or panic. Map-key schema constraints should
also be enforced when an explicit Parquet schema bypasses
Arrow-to-Parquet conversion.

# What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is
sometimes worth providing a summary of the individual changes in this
PR.
-->

Reject mismatches between batch columns, planned Parquet leaves,
physical column writers, and CDC chunkers instead of silently truncating
zipped iteration or panicking on missing writers.

Derive per-field leaf ranges from the target Arrow schema and verify the
Arrow/Parquet leaf counts when creating column writers. Check batch,
writer, and chunker counts before updating row-group accounting, and
validate each field's actual leaf count before dispatching its writes.
Preserve compatible dense, dictionary, and run-end encoded
representations.

Validate map-key schemas when creating an Arrow writer, including when
an explicitly supplied Parquet schema bypasses Arrow-to-Parquet
conversion.

# Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they
covered by existing tests, if so identify these tests)?

If this PR claims a performance improvement, please include evidence
such as
benchmark results.

DO NOT simply paste a list of commands ran to verify the code; this is
what our
CI is for and it pollutes the PR. ONLY explain if testing was included
with this
PR, or why it wasn't.
-->

Add regression coverage for shape mismatches, invalid map-key schemas,
and reachable versus masked or unreferenced map-key nulls. All tests
passing.

# Are there any significant user-facing changes?

<!--
Significant user-facing changes include:
- Breaking public API change
- Significant change to existing functionality (e.g. function returns
something different)

These need to be explicitly called out to ensure we have proper
documentation if
required and to ensure we follow proper semantic versioning.

DO NOT restate the changes of this PR; if a bug was fixed and already
explained
above, we don't need this to be restated as a user-facing change.
-->

No public API changes. Invalid schema or column-count combinations that
were previously accepted, silently ignored, or caused a panic now return
descriptive errors.

Signed-off-by: Hippolyte Barraud <[email protected]>
fornwall pushed a commit to fornwall/arrow-rs that referenced this pull request Oct 31, 2026
…he#11971)

# Which issue does this PR close?

<!--
It is not necessary to raise an issue, but it is encouraged if it is a
non-trivial
enhancement/bug.

If this PR relates to an existing issue, but does not fully resolve it,
please change
the wording below from "Closes #NNN" to "Relates to #NNN" or "Part of
#NNN" to avoid
false closing an issue.
-->

- Contributes to apache#9731
- Contributes to apache#9722
- Part of apache#11273

# Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the
issue then this section is not needed. Explaining clearly why changes
are proposed
helps reviewers understand your changes and offer better suggestions for
fixes.

Please try to explain the problem you are trying to solve in terms of
the user-visible
behavior, rather than the implementation.
-->

The eager Arrow writer repeatedly derives the same schema-only
field-to-leaf mapping when creating and validating row groups, even
though that metadata is invariant for the lifetime of the writer
factory.

# What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is
sometimes worth providing a summary of the individual changes in this
PR.
-->

Build an immutable write-schema plan once per factory and share it
across row groups and column writers. Reuse the cached target fields,
leaf ranges, and Parquet descriptors for both ordinary and CDC paths,
while continuing to derive leaves and levels from each incoming batch.
This removes repeated schema traversal without retaining input arrays or
changing dense, dictionary, REE, view, required-null, or leaf-ownership
semantics.

# Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they
covered by existing tests, if so identify these tests)?

If this PR claims a performance improvement, please include evidence
such as
benchmark results.

DO NOT simply paste a list of commands ran to verify the code; this is
what our
CI is for and it pollutes the PR. ONLY explain if testing was included
with this
PR, or why it wasn't.
-->

All tests passing.

# Are there any significant user-facing changes?

<!--
Significant user-facing changes include:
- Breaking public API change
- Significant change to existing functionality (e.g. function returns
something different)

These need to be explicitly called out to ensure we have proper
documentation if
required and to ensure we follow proper semantic versioning.

DO NOT restate the changes of this PR; if a bug was fixed and already
explained
above, we don't need this to be restated as a user-facing change.
-->

None.

---------

Signed-off-by: Hippolyte Barraud <[email protected]>
Co-authored-by: Ed Seidl <[email protected]>
Co-authored-by: Andrew Lamb <[email protected]>
@HippoBaro

HippoBaro commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@alamb I’m happy to report that all of "Stack A" has now been merged upstream! That was the easier part, since those commits were mostly independent bug fixes and small refactors laying the groundwork for the larger changes that follow.

As we discussed, I was planning to submit the next stack as native stacked GitHub PRs. Unfortunately, I hadn’t accounted for one limitation: all branches in a native stack, including its target branch, must live in the same repository. That's a bummer, and means I can’t use this workflow to target upstream while hosting the branches on my fork.

Would it be possible to arrange for the stack’s branches to be hosted in apache/arrow-rs? If granting me the access needed to push those branches is an option, I’d be happy to follow whatever conventions or restrictions you prefer (I wouldn't need access to main.)

I think a native stack would give reviewers the best experience: each commit would have a focused diff, while its place in the overall design would remain visible. The commits are individually correct and tested, so submitting them one at a time is possible; my concern is that reviewing them in isolation would make the broader architectural changes harder to follow.

If hosting the branches upstream isn’t practical, I’m very happy to find another approach together!

Thanks again for all your help getting this upstream 🙇

@alamb

alamb commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

I think a native stack would give reviewers the best experience: each commit would have a focused diff, while its place in the overall design would remain visible. The commits are individually correct and tested, so submitting them one at a time is possible; my concern is that reviewing them in isolation would make the broader architectural changes harder to follow.

I agree native stacks is probably the best experience, but I think we could get pretty close by just creating multiple PRs and labeling them like

  • Native REE Support (1/8)
  • Native REE Support (2/8)
    ...

If granting me the access needed to push those branches is an option, I’d be happy to follow whatever conventions or restrictions you prefer (I wouldn't need access to main.)

The only people who have write access to the repo are committers on the Arrow project -- https://arrow.apache.org/committers/ -- that that is managed by the ASF / not something I control

@alamb

alamb commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

In terms of trying to help get this PR / set of PRs in / merged, I would like to suggest we start with a motivating example / benchmark that we can use to motivate the work more explicitly and thus attract reviewer attention -- especially as I think the use case is something that is widely interesting to people.

Specifically I think your high level usecase is to implement compaction of multiple parquet files remaining both CPU and memory efficient, which I guaratnee you is SUPER relevant to many others and will be very exciting. However, as currently described "native REE support" making this connection requires quite a bit of intimate knowledge (and I am not sure i would have put it together if I hadn't spoken with you in person first)

So, perhaps we can start with:

  1. A test / harness that shows your usecase with an annotated example (e.g. generate 10 100MB parquet files, and then merge them together into a new single parquet file, reporting the time and peak memory usgae)
  2. Some sort of high level writeup (blog post? Design doc?) that explains the usecase and then sketches the solution to it

@alamb

alamb commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Thank you for this PR @HippoBaro -- now I just need to figure out how to find time to help review it

Store unique `BYTE_ARRAY` values directly in a packed `PLAIN`
dictionary-page buffer, preserving first-seen dictionary IDs. Retain
typed unique-value storage for the other physical types behind a common
storage contract.

Consume dictionary storage when the column writer emits its dictionary
page, allowing the packed byte buffer to be transferred without another
serialization pass or payload copy. Preserve non-consuming `write_dict`
access for experimental callers and tests.

Add borrowed-byte interning that constructs owned values only on a
deduplication miss, preparing for later borrowed batch sinks. The
existing slice input path continues to intern typed values.

Extract dense dictionary-index buffering and serialization into a
helper, include the bit-width header in encoded-size estimates, validate
byte-array prefix lengths, and update memory accounting for packed
storage.

Cover dictionary ordering, duplicate and empty values, page-flush
lifecycle, consuming serialization, lazy construction, and length
overflow.

Signed-off-by: Hippolyte Barraud <[email protected]>
Replace the column encoder's boxed fallback encoder and optional
dictionary encoder with a concrete family selected by physical value
type. Represent dictionary mode and fallback as variants of one active
encoder, preserving eager fallback validation and consuming
dictionary-page emission.

Introduce `TypedColumnChunkEncoder` and family-specific dispatch for
numeric, boolean, byte-array and fixed-length byte-array values.
Preserve custom `DataType` marker identity and the existing statistics,
Bloom-filter and column-accounting responsibilities.

Organize the encoding implementations by physical family and replace the
generic byte-delta implementations with shared concrete backends. Retain
the private `PLAIN` core's state and encoding operations.

Keep `PlainEncoder`, `DeltaLengthByteArrayEncoder` and
`DeltaByteArrayEncoder` as deprecated experimental compatibility
utilities. Preserve descriptor-free construction, `Default`, generic
`DataType` usage, custom markers and relevant trait contracts.
Production families use the private implementations directly, without
compatibility adapters; `get_encoder` retains its boxed public
interface.

Cover factory round trips, delta page reset, concrete and generic
encoder APIs, custom-marker writers, auto-traits and legacy
unsupported-type behavior.

Signed-off-by: Hippolyte Barraud <[email protected]>
Introduce internal producer/sink contracts and route existing numeric
and Boolean writes through family-specific batch consumers. Borrow
contiguous numeric slices directly and gather indexed numeric selections
into 128-value stack batches instead of materializing the entire
selection.

Accumulate numeric extrema and NaN counts in the numeric sink,
classifying each value once for both purposes. Preserve signed/unsigned
integer, floating-point and INT96 ordering, then merge batch extrema
into page statistics. Keep Bloom insertion, value accounting and
active-family encoding within the same consumer.

Derive Boolean extrema and Bloom membership from the batch's true count.
Feed borrowed Boolean slices to the existing PLAIN and RLE encoders,
packing PLAIN values without an intermediate packed allocation.

Retain the generic slice path for byte and fixed-byte values until their
batch consumers are introduced. Boolean indexed gathering also retains
the existing collecting adapter; bounded gathering in this change
applies to numeric selections.

Test gather ordering, empty and partial batches, initialization of only
emitted values, and sink-error propagation.

Signed-off-by: Hippolyte Barraud <[email protected]>
Route `BYTE_ARRAY` and `FIXED_LEN_BYTE_ARRAY` writes through dedicated
borrowed value consumers and remove the shared generic slice consumer.

Deliver variable-width payloads in bounded batches of borrowed slice
handles. Retain borrowed extrema during each source write and copy only
the values needed to update page statistics. Use reusable owned extrema
scratch for fixed-length values, whose producers may expose temporary
conversion storage.

Preserve descriptor-driven byte and decimal ordering, Float16 NaN
semantics, geospatial observation and dictionary/fallback lifecycle.

Process byte statistics as paired bounds, sharing UTF-8 validation
when both bounds reference the same slice. Use one unsigned comparison
for eligible singleton-page boundary ordering, and simplify NaN-count
bookkeeping without changing its type-specific semantics.

Store unique fixed-length dictionary values directly in a contiguous
`PLAIN` page without per-value length prefixes. Preserve first-seen IDs
and transfer the packed buffer when emitting the dictionary page.

Batch fixed-length Bloom-filter updates, account for retained buffers
and scratch capacity, and track unencoded `BYTE_ARRAY` payload totals
even when ordinary statistics are disabled so offset-index accounting
remains available.

Return width-mismatch errors from the column-writing and packed-batch
`BYTE_STREAM_SPLIT` paths while retaining the legacy direct-slice
behavior. Add coverage for these errors, packed dictionary storage and
retained fallback allocations.

Signed-off-by: Hippolyte Barraud <[email protected]>
Separate input delivery from `ColumnChunkEncoder` through a sliceable
`ColumnWriteSource` interface. Coordinate each source window with its
definition and repetition levels, distinguishing level entries from the
present values they consume.

Introduce dense and sparse physical selections and a borrowed
`LeafBatch` handoff from the eager Arrow level planner. Recognize
contiguous selections without reordering values, and preserve null
accounting, level histograms and record boundaries while subdividing
writes.

Size dictionary mini-batches against the remaining dictionary budget
rather than its full configured capacity. Use conservative physical-byte
bounds for fixed-width inputs and source-provided estimates for
variable-width values, while allowing oversized singletons to make
progress.

Add fill-based producers for bounded gathering and conservative size
hints for bitmap index iterators. Cover selection slicing and ordering,
remaining dictionary budgets, page-count boundaries and iterator hints.

Signed-off-by: Hippolyte Barraud <[email protected]>
Bind numeric, Boolean and fixed-length Arrow storage to borrowed
physical sources, then expose selected windows through
`ColumnWriteSource`. Reuse the binding across a leaf write's page
windows without retaining the input array beyond the synchronous write.

Borrow compatible contiguous numeric buffers directly. Gather sparse
selections and perform required integer, Date64 and decimal conversions
in 64-value stack batches instead of constructing complete converted
arrays or selection-sized value vectors.

Keep Boolean input packed, carrying its bit offset and physical
selection into the Boolean consumer. Add packed-range writing and bitmap
counting while preserving `PLAIN` and `RLE` behavior.

Borrow fixed-size binary payload ranges and pack decimal, Float16 and
supported interval representations directly into bounded scratch tiles.
Add the matching packed fixed-length consumer and encoder operations.

Remove `LegacySelectedSlice` and the ordinary fixed-width conversion
helpers. Activate the bridges through existing Arrow write paths while
retaining dictionary materialization until direct key composition is
introduced.

Cover packed Boolean/scalar equivalence, bit offsets and selections,
packed fixed-length statistics, Decimal32/64 writes, all-null Boolean
`RLE` and zero-width `FixedSizeBinary`.

Signed-off-by: Hippolyte Barraud <[email protected]>
Route ordinary Arrow binary and string arrays through the physical batch
sinks using their native offset and view layouts, rather than the legacy
Arrow-specific byte encoder.

Support 32-bit and 64-bit offsets and byte views, borrowing eligible
contiguous ranges and inline-view descriptors. Gather sparse selections
in bounded tiles and estimate page byte requirements from offsets and
views without first materializing the selected values.

Keep dictionary-backed byte inputs on the existing encoder, isolated in
the temporary legacy_byte_array.rs module. This preserves a working
dictionary path while making the ordinary byte-layout migration
reviewable independently of dictionary-key composition, cache lifetime,
and per-page statistics observation.

The subsequent dictionary migration introduces direct key/slot mapping
and removes this temporary module. Retaining it here is an intermediate
migration step, not a second long-term encoding implementation.

Signed-off-by: Hippolyte Barraud <[email protected]>
Compose Arrow dictionary keys with physical value selections so
dictionary-backed inputs use the native encoding bridges without first
materializing decoded arrays. Support all integer key widths and add
support for dictionary-backed binary and string views.

Reuse source-scoped dictionary-slot mappings across mini-batches,
resetting the caches at batch boundaries rather than for each mini-batch
or CDC chunk. Preserve per-page statistics observation and logical NaN
counts when mappings are cached, and use distinct referenced byte slots
for dictionary-budget estimates.

Remove the legacy_byte_array.rs module retained by the ordinary
byte-layout migration, along with the old fixed-width dictionary
materialization. Ordinary and dictionary-backed values now share the
physical delivery pipeline instead of requiring separate Arrow byte
encoders.

Signed-off-by: Hippolyte Barraud <[email protected]>
Represent repeated definition and repetition levels with cumulative
runs, retaining uniform and materialized forms and falling back to
dense buffers when runs become too short. Support slicing, counting,
record-boundary extension and encoding from the compact representation.

Add consumers for borrowed multi-range value selections. Coordinate
level positions and selected-value ordinals through LeafBatch windows,
since null slots occupy level positions without consuming values.

Use borrowed windows for CDC writes instead of cloning and rebasing
per-chunk level and index buffers. Keep structural traversal and
validation eager, and preserve existing CDC framing.

Test compact levels against materialized levels, including sliced
encoding and record-boundary behavior. Cover representation transitions,
coordinated selections, page-value overflow, range byte budgets and
packed Boolean selections.

Signed-off-by: Hippolyte Barraud <[email protected]>
Bind supported ordinary Arrow arrays and nested structures into a
`LevelTree` and emit record-aligned `LeafCursor` tiles containing
coordinated levels and value selections. Keep selections compact as
ranges or sparse indices and use compact level runs when appropriate.

Drive both individual column writers and row-group writes through the
cursor, sharing ancestor and list traversal across compatible leaf
windows. Preserve target-field nullability and required-null
reachability checks.

Use slot and row targets to size tiles without splitting records; a
single oversized record may exceed the slot target. Retain eager
fallback for REE and non-leaf dictionary compositions, and leave
internal CDC writing eager until persistent framing is introduced.

Exercise binding and shared traversal, and compare cursor output with
the eager reference at multiple tile limits, including selected values.
Retain ordinary nested and nullable roundtrips, out-of-order list views,
fixed-size-list slices and required all-null list/struct controls.

Signed-off-by: Hippolyte Barraud <[email protected]>
Introduce `CdcFramer` and `CdcSpan` to describe chunk starts with
coordinated level and selected-value windows. Carry per-leaf CDC state
across cursor tiles and input batches, preserving its lifetime across
row groups.

Flush buffered pages before spans that start a new chunk, rather than
at incidental cursor boundaries, and make empty page flushes a no-op.
Keep CDC boundaries aligned with top-level records; other writer limits
may still split a content-defined chunk across multiple pages.

Route ordinary CDC writes through individual and shared leaf cursors.
Traverse selected source positions alongside their levels and write
borrowed batch windows. Retire the old chunk-discovery and
level-rebasing adapters while retaining eager fallback for REE and
non-leaf dictionary compositions.

Test partition invariance, nested boundaries at batch starts, null and
empty inputs, oversized records, and value/level alignment. Cover
tiny-page nested roundtrips and document that Arrow dictionary key
layout can affect chunk boundaries.

Signed-off-by: Hippolyte Barraud <[email protected]>
Represent repeated physical values as grouped selections and preserve
their counts through selection composition, Arrow value bridges, and
physical-family sinks.

Buffer repeated dictionary indices as runs and pass their counts to the
RLE encoder without first expanding each run into individual indices.
Preserve append order when grouped and dense writes mix, materializing
pending runs when a subsequent dense append requires it.

Preserve logical value counts, NaN multiplicities, and byte-size
accounting while observing extrema and Bloom-filter values by group.
Retain bounded-batch expansion where encoding still requires individual
values, and cover grouped slicing, traversal, and index delivery.

Signed-off-by: Hippolyte Barraud <[email protected]>
Bind run-end boundaries, logical slice offsets, and terminal values to
indexed leaf cursors. Support Int16, Int32, and Int64 run ends,
including terminal dictionary values, and emit grouped physical
selections into the counted encoding pipeline.

Preserve logical null handling and required-field validation while
applying row and slot targets to indexed cursor batches. Activate this
path for top-level run-end-encoded arrays whose values are physical
leaves or dictionaries of physical leaves.

Signed-off-by: Hippolyte Barraud <[email protected]>
Extend indexed leaf cursors to bind non-leaf dictionaries and structs,
allowing their compositions with run-end-encoded arrays to use native
traversal instead of eager materialization.

Compose dictionary keys, run positions, and struct child indices while
preserving logical and physical slice offsets. Maintain normalized
child-field contracts, parent null propagation, and required-field
validation.

Signed-off-by: Hippolyte Barraud <[email protected]>
Extend indexed leaf cursors to bind list, map, and list-view child
bounds, supporting their compositions with run-end-encoded arrays,
dictionaries, and structs without eager structural materialization.

Activate native traversal for these shapes in ordinary and
content-defined-chunking row-group writes. Preserve nested slice
offsets, nullability, and definition and repetition levels while
delivering selected values through the physical encoding pipeline.

Signed-off-by: Hippolyte Barraud <[email protected]>
Bind repeat probes once per cursor to identify repeated nested records
in indexed traversal. Reuse emitted level and value-selection segments
across top-level runs and repeated list children instead of walking the
same structure for every logical occurrence.

Preserve definition levels, repetition-level starts, and null masks
during replay, and coalesce adjacent compatible value groups at replay
boundaries.

Add focused replay and scalar-level regression coverage alongside the
existing native composition and CDC tests. Optimize shapes already
supported by indexed traversal without changing the remaining eager
fallback's scope.

Signed-off-by: Hippolyte Barraud <[email protected]>
Route the remaining individual-column cases through leaf cursors and
remove the production eager level builder, legacy leaf plans, and
fallback selection logic. Use cursor-based traversal for ordinary and
run-end-encoded compositions across writer entry points.

Keep the existing expected-level fixtures as assertions over collected
cursor output instead of emulating the deleted builder interface.
Observe planned maximum levels and actual level streams, traverse
sliced inputs directly, and check output across cursor batch targets.
Preserve independent reader, schema, page-budgeting, dictionary, and
CDC regressions, leaving surviving production helpers in place.

Signed-off-by: Hippolyte Barraud <[email protected]>

This branch has not been deployed

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

Labels

arrow Changes to the arrow crate arrow-buffer arrow-core Core crates related to representing arrow data parquet parquet crate performance Speed or memory optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants