[Java] Inconsistent logic for type IDs in Union vectors
- Langage dominant
- Java
- Étoiles
- 94
- Forks
- 152
- Merge moyen
- 3 j 16 h
- PR mergées (30 j)
- 11
Description
The current logic for calculating the type IDs in UnionVector#getField and DenseUnionVector#getField is:
1. DenseUnionVector uses an increasing counter
1. UnionVector uses the ordinal of the type enum
1. Both completely ignore the type IDs provided at construction as part of fieldType (if provided)
We encountered this inconsistency while testing a direct roundtrip of a union vector between pyarrow and Java with the C Data Interface ('direct' here means without using VectorSchemaRoot/RecordBatch). The identifiers for the type IDs differ after completing a roundtrip.
**Reporter**: [Roee Shlomo](https://issues.apache.org/jira/browse/ARROW-14271) / @roee88
**Note**: *This issue was originally created as [ARROW-14271](https://issues.apache.org/jira/browse/ARROW-14271). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par UnionVector#getField et DenseUnionVector#getField, puis suivez la manière dont fieldType et ses ID de type fournis sont gérés lors de la construction. Reproduisez l’aller-retour direct de pyarrow vers Java via C Data Interface et vérifiez que les deux types de vecteurs conservent des ID de type cohérents après l’aller-retour.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- data-engineering
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100