Window constructors panic when the expression list is empty
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Empieza en windows/window_agg_exec.rs y lee WindowAggExec::try_new y BoundedWindowAggExec::try_new, donde el issue identifica lecturas no comprobadas de la primera expresión. Añade pruebas de regresión para listas de expresiones vacías y verifica que ambos constructores devuelvan DataFusionError::Plan antes de derivar el esquema o las propiedades de partición. Se considera terminado cuando los casos con listas vacías devuelven errores en lugar de provocar un panic, mientras que los planes no vacíos conservan su comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
WindowAggExec::try_new and BoundedWindowAggExec::try_new index window_expr[0] when the list is empty. Both constructors return Result, but this input panics instead of returning an error.
The physical plan decoder reaches these constructors when a WindowAggExecNode contains a valid child and no window_expr entries. With panic = "abort", decoding that node stops the process.
To reproduce
use std::sync::Arc;
use arrow::datatypes::Schema;
use datafusion_physical_plan::empty::EmptyExec;
use datafusion_physical_plan::windows::{BoundedWindowAggExec, WindowAggExec};
use datafusion_physical_plan::InputOrderMode;
let input = Arc::new(EmptyExec::new(Arc::new(Schema::empty())));
WindowAggExec::try_new(vec![], input.clone(), false); // panics
BoundedWindowAggExec::try_new(vec![], input, InputOrderMode::Linear, false); // panics
The first panic was found in a peer-plan fuzz run using DataFusion 55.1.0: https://github.com/telekom/sutura/actions/runs/42873920210/job/130032073633
The unchanged input is 21 bytes, base64 ehMKBhoECgAQARoEEgKgARgUUIBA. The failure is index out of bounds: the len is 0 but the index is 0 in windows/window_agg_exec.rs. The current upstream source also has the unchecked first-element reads in both constructors; I have not run the reproducer on upstream main.
Expected behavior
Return DataFusionError::Plan when there is no window expression, before deriving the schema or partition properties. Nonempty window plans keep their current behavior.
Additional context
We are preparing a small vendored fix and worker-decode regression tests in sutura. This report is limited to the empty expression list. It does not establish that every malformed physical plan is refused.
AI assistance was used to investigate and draft this report.
- Lenguaje dominante
- Rust
- Estrellas
- 9.6k
- Forks
- 2.6k
- Merge medio
- 3 d 4 h
- PR fusionados (30 d)
- 345
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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 apache/datafusion
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/datafusion#27094 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Substrait consumer doesn't recognise `shift_left` / `shift_right` from functions_arithmetic.yamlPosiblemente ocupada @jonasHanhan la tomó hace 9 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/datafusion#27059 ·
Los mantenedores suelen responder en 1 día
-
`ProjectionExprs::project_statistics` computes approximate `Statistics::total_byte_size` ignoring column statsPosiblemente ocupada @joseph-isaacs la tomó hace 9 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/datafusion#27050 ·
Los mantenedores suelen responder en 1 día
-
physical-plan: decoding an Unnest or Explain node with an unset field panicsPosiblemente ocupada @geoHeil la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/datafusion#26999 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
datafusion-proto: decoding an AvroScan node without the avro feature panicsPosiblemente ocupada @geoHeil la tomó hace 8 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
apache/datafusion#26998 ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/datafusion
Issues similares
-
area:schema documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ElectronicWave/Elemental#252 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dekobon/big-code-analysis#1887 ·
Los mantenedores suelen responder en 1 día
-
Shell中文符号输入异常Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día