Push fallible scalar functions through sparse Dict arrays
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- data-engineering, performance
Línea de trabajo
Start by reading vortex-array/src/arrays/dict/compute/rules.rs, especially DictionaryScalarFnValuesPushDownRule and the handling of has_all_values_referenced(). Benchmark the existing row-wise and dictionary push-down paths for sparse dictionaries, including fallible functions such as utf8_to_json and checked integer division. Done means sparse dictionary values are evaluated through the new path when the heuristic permits, while edge cases and regressions are covered by benchmarks and tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem or motivation
DictionaryScalarFnValuesPushDownRule (vortex-array/src/arrays/dict/compute/rules.rs) skips fallible scalar functions when has_all_values_referenced() is false, because a reduce rule cannot inspect codes to avoid evaluating unreferenced entries. On sliced or filtered dictionaries (where all_values_referenced is reset), fallible scalar functions like utf8_to_json, json_to_utf8, parse_uuid, or checked integer division fall back to row-wise execution, re-evaluating duplicate values and losing dictionary encoding downstream.
Proposed solution
Add an execution-time ExecuteParentKernel<Dict> for AnyScalarFn that handles sparse dictionaries (!has_all_values_referenced() and !signature.is_infallible()), gated by a benchmarked heuristic so it only runs when it beats row-wise execution.
Two approaches to evaluate and benchmark:
- Masking unreferenced values (strict functions only): use
DictArrayExt::compute_referenced_values_maskto mask out unreferenced entries invalues, then evaluate the scalar function on the masked values without allocating a rank table, remappingcodes, or copyingvalues. - Compacting referenced values (works for non-strict functions too): scan
codesto buildreferenced_indicesand remapcodes, gather referenced values, evaluate the scalar function once per distinct referenced value, and return aDictwithall_values_referenced = true.
Open questions:
- What cardinality ratio (
values.len() / codes.len()) or function-cost signal prevents regressions on cheap fallible functions (such as integer division) over near-dense dictionaries? - Should this decline on non-host (CUDA) codes, empty inputs, and strict functions with null constant siblings (to preserve short-circuiting and execution-time checks)?
Additional context
Prototype and review discussion in #12537 (closed pending benchmarks and a clear cost heuristic). Related to #12535 and #11693.
- Lenguaje dominante
- Rust
- Estrellas
- 3.2k
- Forks
- 239
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 684
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vortex-data/vortex
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vortex-data/vortex#12633 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
vortex-data/vortex#12628 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
vortex-data/vortex#12491 ·
Los mantenedores suelen responder en 1 día
-
Fallible constructor for nested_case_whenPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vortex-data/vortex#11425 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
vortex-data/vortex#12635 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vortex-data/vortex
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
marklauter/tsong#110 ·
-
docs enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wasm-bindgen/wasm-bindgen#5503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
area: engine bug needs milestone
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Mudcrab-Team/mudcrab#1197 · 1 comentario ·
Los mantenedores suelen responder en 1 día