apache / apache/datafusion

Reading Avro files supports other types

Ouverte
#7,828 5 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Rust
Étoiles
9.3k
Forks
2.4k
Merge moyen
3 j 11 h
PR mergées (30 j)
362

Description

### 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_

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par AvroArrowArrayReader et les exemples associés de arrow_array_reader.rs afin de comprendre le chemin actuel limité à Record et l’approche de parsing proposée fournie par l’utilisateur. Définissez un point d’extension qui préserve le comportement par défaut actuel tout en permettant des entrées Union Avro comme celles de Paimon, puis vérifiez à la fois le comportement du reader existant et le nouveau chemin.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
rust
Domaine
data-engineering
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.