Bulk skip in RunLengthBitPackingHybridDecoder / DictionaryValuesReader
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.6k
- Merge moyen
- 3 j 12 h
- PR mergées (30 j)
- 33
Description
### 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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par lire RunLengthBitPackingHybridDecoder.readInt() et readNext(), puis examinez skip(int) dans DictionaryValuesReader et RunLengthBitPackingHybridValuesReader. Confirmez comment les valeurs encodées par dictionnaire sont décodées et identifiez les tests existants pertinents ou leurs points d’entrée. C’est terminé lorsque le saut en masse utilise le chemin du décodeur dans les trois readers tout en préservant le nombre de valeurs ignorées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- data
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 72/100