Bulk skip in RunLengthBitPackingHybridDecoder / DictionaryValuesReader
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.6k
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 33
Descripción
### 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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Empieza leyendo RunLengthBitPackingHybridDecoder.readInt() y readNext(), y después inspecciona skip(int) en DictionaryValuesReader y RunLengthBitPackingHybridValuesReader. Confirma cómo se decodifican los valores codificados mediante diccionario e identifica las pruebas existentes relevantes o sus puntos de entrada. La tarea está terminada cuando el salto masivo usa la ruta del decodificador en los tres readers y conserva el número de valores saltados.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- data
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 72/100