physical-plan: decoding an Unnest or Explain node with an unset field panics
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
- 75/100
Línea de trabajo
Empieza en datafusion/physical-plan/src/unnest.rs, en UnnestExec::try_from_proto, donde se hace unwrap de recursion.input_column y recursion.output_column. Luego revisa datafusion/physical-plan/src/explain.rs, en stringified_plan_from_proto y ExplainExec::try_from_proto, donde se hace unwrap de plan_type y plan_type_enum. Está terminado cuando ambas rutas devuelven un internal_err que nombra el campo faltante, con una prueba de decodificación para cada caso.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Two physical plan decoders in datafusion-physical-plan panic on a field the wire leaves unset. Their neighbours return an error in the same situation.
UnnestExec::try_from_proto unwraps both columns of each recursion option:
input_column: recursion.input_column.as_ref().unwrap().into(),
output_column: recursion.output_column.as_ref().unwrap().into(),
RecursionUnnestOption.input_column and .output_column are optional messages, so a peer can leave either one unset. A few lines earlier, the same function refuses a missing options with internal_datafusion_err!:
ExplainExec::try_from_proto maps each stringified plan through stringified_plan_from_proto. That function panics when plan_type, or its plan_type_enum, is unset:
ExplainExec::try_from_proto itself refuses a missing schema with an error:
The same code is in 55.1.0, at src/unnest.rs lines 473-474 and src/explain.rs lines 355-363.
To Reproduce
Decode a PhysicalPlanNode with datafusion_proto::bytes::physical_plan_from_bytes, where the node is one of:
- an
Explainnode with aschemaand oneStringifiedPlan::default()instringified_plans, soplan_typeisNone; - an
Unnestnode with a decodableinputandschema, andoptions.recursionsholding oneRecursionUnnestOption::default(), soinput_columnisNone.
Both reach the panic without any earlier check failing. I found these by reading the decode path and have not run these exact inputs here yet. I will add the panic output once a decode test on our side has run.
Expected behavior
Return internal_err! naming the missing field, as the sibling checks do. The caller then gets Err and keeps running.
Additional context
This matters wherever a process decodes plans it did not encode itself, such as a distributed worker that receives plan stages from peers. A malformed node panics the decoding task, and under panic = "abort" it stops the whole process. A related case in datafusion-proto is #26998.
The fix is two ok_or_else calls plus a decode test for each. I can open the PR if that is welcome.
- Lenguaje dominante
- Rust
- Estrellas
- 9.6k
- Forks
- 2.6k
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 322
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
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
apache/datafusion#26998 ·
Los mantenedores suelen responder en 1 día
-
`repeat` on `LargeUtf8` aborts the process on a result size no allocation can satisfyPosiblemente ocupada @shahwazreza la tomó hace 2 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/datafusion#26948 ·
Los mantenedores suelen responder en 1 día
-
[Bug] atan2 does not normalize -0.0 the way Spark doesPosiblemente ocupada @pujitha24 la tomó hace 3 días. Abiertobug spark
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/datafusion#26333 ·
Los mantenedores suelen responder en 1 día
-
Unparser turns NULL list literals into `[]` and fails on NULL struct/map literalsQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug help wanted unparser
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/datafusion#26316 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Struct union type coercion takes field nullability from the wrong field when field order differsQuizá libre de nuevo @med9110 la tomó hace 19 días y no hay ningún pull request abierto. Abiertobug help wanted logical-expr tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/datafusion#26296 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/datafusion
Issues similares
-
example
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rust-lang-nursery/rust-cookbook#954 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 70/100
OpenZeppelin/openzeppelin-relayer#967 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
DecisionOutcome::label() / n_dosed(): engine-side mapping so downstream needs no wildcard armAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
src/runs.rs:1987: a missing --source-run-id now answers 400 "Source run ... does not exist", not 404Abiertonightly-audit
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
antithesishq/snouty#602 ·
Los mantenedores suelen responder en 1 día