apache / apache/datafusion

Reading Avro files supports other types

Abierto
#7,828 5 comentarios 1 reacción 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Rust
Estrellas
9.3k
Forks
2.4k
Merge medio
3 d 11 h
PR fusionados (30 d)
362

Descripción

### Is your feature request related to a problem or challenge?

I am now integrating [incubator-paimon](https://github.com/apache/incubator-paimon)(it is a streaming data lake platform), when reading the avro file, an exception message will appear: **expected avro schema to be a record**, because `AvroArrowArrayReader` only supports `AvroSchema::Record`, but the avro file format of paimon is Union type([code here](https://github.com/apache/incubator-paimon/blob/d2ddaa9bfb865a93b12c7a0294cf936071bbc08b/paimon-format/src/main/java/org/apache/paimon/format/avro/AvroSchemaConverter.java#L224))

### Describe the solution you'd like

It would be better if the parsing format could be implemented by the user. The default implementation is still the current way, no problem.

### Describe alternatives you've considered

My current solution: [here](https://github.com/Asura7969/arrow-datafusion/blob/8e3b23561baded77c1604a936dea1f40d30ebd66/datafusion/core/src/datasource/avro_to_arrow/arrow_array_reader.rs#L84) and [this](https://github.com/Asura7969/arrow-datafusion/blob/8e3b23561baded77c1604a936dea1f40d30ebd66/datafusion/core/src/datasource/avro_to_arrow/arrow_array_reader.rs#L110)

### Additional context

_No response_

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con AvroArrowArrayReader y los ejemplos vinculados de arrow_array_reader.rs para entender la ruta actual de solo Record y el enfoque de parsing propuesto proporcionado por el usuario. Define un punto de extensión que preserve el comportamiento predeterminado actual y permita entradas Union Avro como las de Paimon, y luego verifica tanto el comportamiento del reader existente como la nueva ruta.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
data-engineering
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.