Skip to content

Refactor RleEncoder::flush_bit_packed_run to make flow clearer#9735

Open
etseidl wants to merge 1 commit intoapache:mainfrom
etseidl:refactor_rle_flush
Open

Refactor RleEncoder::flush_bit_packed_run to make flow clearer#9735
etseidl wants to merge 1 commit intoapache:mainfrom
etseidl:refactor_rle_flush

Conversation

@etseidl
Copy link
Copy Markdown
Contributor

@etseidl etseidl commented Apr 15, 2026

Which issue does this PR close?

Rationale for this change

The transition from bit-packed to RLE encoding is a bit confusing. See issue for more details.

What changes are included in this PR?

Splits flush_bit_packed_run into two functions and modifies flush_buffered_values to use the new finish_bit_packed_run.

Are these changes tested?

Should be covered by existing tests

Are there any user-facing changes?

No, only makes changes to APIs marked experimental

@github-actions github-actions bot added the parquet Changes to the parquet crate label Apr 15, 2026
@etseidl
Copy link
Copy Markdown
Contributor Author

etseidl commented Apr 15, 2026

cc @HippoBaro as this may conflict with your work

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 15, 2026

run benchmark arrow_writer

@adriangbot
Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4255377477-1330-9dh29 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 refactor_rle_flush (15dc1d1) to 38d78c3 (merge-base) diff
BENCH_NAME=arrow_writer
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_writer
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Makes sense to me -- I also had codex verify that this is indeed covered by existing tests

Thank you @etseidl

@jhorstmann
Copy link
Copy Markdown
Contributor

Looks good to me, the code comments are also clearer now.

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

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor RleEncoder::flush_bit_packed_run

4 participants