Append gathered bits without an intermediate BooleanBuffer

Aperta
#12,398 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
data

Direzione di ricerca

Start with take_bits and the Boolean indexed coalescing path added in #12336, then look at BooleanBufferBuilder in arrow-buffer to see how bits are appended. Decide whether the new append-style gather is a builder method over lower-level inputs or an arrow-select helper that takes a builder, without creating a dependency cycle with arrow-array. Done means checked and unchecked index handling, null indices and sliced offsets behave as before, and benchmarks for take and coalescing show no regression on sparse and dense selections.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

performance

take_bits returns a newly allocated BooleanBuffer. In #12336, Boolean indexed coalescing then appends that buffer to an existing BooleanBufferBuilder, adding an intermediate allocation and copy.

Add an append-style indexed gather that writes selected bits directly into an existing builder. Preserve checked and unchecked index handling, null indices, sliced source offsets, and the existing take_bits behavior for current callers.

BooleanBufferBuilder lives in arrow-buffer, while the current implementation consumes PrimitiveArray from arrow-array, so the API should avoid introducing a dependency cycle. This may be a builder method over lower-level inputs or an arrow-select helper that accepts a builder.

Benchmark both take and Boolean indexed coalescing across sparse and dense selections to make sure direct appends do not regress the existing packed implementation.

Follow-up from https://github.com/apache/arrow-rs/pull/12336#discussion_r4652332025.

Lingua principale
Rust
Stelle
3.7k
Fork
1.5k
Merge medio
2g 16h
PR unite (30g)
183

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-rs

Tutte le issue di apache/arrow-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.