Bulk skip in RunLengthBitPackingHybridDecoder / DictionaryValuesReader
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.6k
- Merge medio
- 3g 12h
- PR unite (30g)
- 33
Descrizione
### Motivation
Make Hive leverage bulk skip when implementing probe decode for Parquet, similarly to https://issues.apache.org/jira/browse/HIVE-22731, which was about ORC.
### Problem
`ValuesReader.skip(int n)` ships with a naive default:
```java
public void skip(int n) {
for (int i = 0; i < n; i++) skip();
}
```
For dictionary-encoded columns (the common case), each `skip()` bottoms
out in `RunLengthBitPackingHybridDecoder.readInt()` — a mode switch,
array-index arithmetic, and a value the caller immediately discards.
Any filter-then-skip path (column-index row ranges, hash-join probe
filtering, runtime filters) pays this cost per skipped row.
### Proposal
1. Add `RunLengthBitPackingHybridDecoder.skipInts(int n)` — re-use
`readNext()` per run, then advance `currentCount` by
`min(n, currentCount)` instead of walking every value through
`readInt()`.
2. Override `skip(int)` on `DictionaryValuesReader` and
`RunLengthBitPackingHybridValuesReader` to call `decoder.skipInts(n)`.
### Component(s)
Core
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia leggendo RunLengthBitPackingHybridDecoder.readInt() e readNext(), quindi esamina skip(int) in DictionaryValuesReader e RunLengthBitPackingHybridValuesReader. Verifica come vengono decodificati i valori codificati tramite dizionario e identifica i test esistenti rilevanti o i relativi punti di ingresso. Il lavoro è completato quando il salto in blocco utilizza il percorso del decoder in tutti e tre i reader, preservando il numero di valori saltati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 72/100