datafusion-proto: decoding an AvroScan node without the avro feature panics
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 85/100
Línea de trabajo
El pánico es el brazo #[cfg(not(feature = "avro"))] para AvroScan en datafusion/proto/src/physical_plan/mod.rs, alrededor de las líneas 1238-1247. Copia el brazo ParquetScan justo encima, que devuelve not_impl_err! para el mismo caso. Está terminado cuando decodificar un nodo AvroScan con las funciones predeterminadas devuelve Err en lugar de entrar en pánico, lo que un nuevo test construido sin la función avro puede comprobar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
datafusion-proto is built without avro by default, since its default features are ["parquet"]. In that build, PhysicalPlanNode::try_into_physical_plan panics on an AvroScan node:
#[cfg(not(feature = "avro"))]
panic!(
"Unable to process a Avro PhysicalPlan when `avro` feature is not enabled"
)
The ParquetScan arm just above it handles the same situation with not_impl_err!:
The same code is in 55.1.0, src/physical_plan/mod.rs, lines 1100-1108.
To Reproduce
Build datafusion-proto with default features, then decode a PhysicalPlanNode whose physical_plan_type is AvroScan(Default::default()):
let node = protobuf::PhysicalPlanNode {
physical_plan_type: Some(protobuf::physical_plan_node::PhysicalPlanType::AvroScan(Default::default())),
};
let _ = datafusion_proto::bytes::physical_plan_from_bytes(&node.encode_to_vec(), &ctx.task_ctx());
The arm is an unconditional panic!, so this panics before the node's contents are looked at.
Expected behavior
Return not_impl_err!, as the ParquetScan arm does, so a caller gets Err and keeps running.
Additional context
This matters wherever a process decodes plans it did not encode itself. One example is a distributed worker that receives plan stages from peers. A few bytes of input panic the decoding task, and under panic = "abort" they stop the whole process.
A fix is one line, plus a decode test with the feature off. 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 2/5 1-3 horas Aptitud para principiantes 75/100
apache/datafusion#26999 ·
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
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 70/100
OpenZeppelin/openzeppelin-relayer#967 ·
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
libnativeapi/nativeapi#21 ·