[Java] UnionListWriter does not behave properly when multiple lists are written in the same list
- Langage dominant
- Java
- Étoiles
- 94
- Forks
- 152
- Merge moyen
- 3 j 16 h
- PR mergées (30 j)
- 11
Description
if you run the following code:
```Java
ListVector listVector = new ListVector("list", allocator, null);
listVector.allocateNew();
UnionListWriter listWriter = new UnionListWriter(listVector);
listWriter.start();
listWriter.startList();
listWriter.list("a").startList();
listWriter.list("a").bigInt().writeBigInt(1);
listWriter.list("a").bigInt().writeBigInt(2);
listWriter.list("a").bigInt().writeBigInt(3);
listWriter.list("a").endList();
listWriter.list("a").startList();
listWriter.list("a").bigInt().writeBigInt(4);
listWriter.list("a").bigInt().writeBigInt(5);
listWriter.list("a").endList();
listWriter.endList();
listWriter.end();
listWriter.setValueCount(1);
```
listVector will contain:
```
[{"a":[1,2,3,4,5]}]
```
Instead of
```
[{"a":[1,2,3],[4,5]}]
```
**Reporter**: [Abdel Hakim Deneche](https://issues.apache.org/jira/browse/ARROW-307) / @adeneche
**Note**: *This issue was originally created as [ARROW-307](https://issues.apache.org/jira/browse/ARROW-307). 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 UnionListWriter et la configuration de ListVector présentée dans le reproducteur, puis exécutez l’exemple pour observer comment sont stockées les sections répétées de list("a"). Suivez le comportement du writer pour les listes imbriquées et ajoutez un test de régression basé sur l’exemple. C’est terminé lorsque la valeur est représentée sous la forme [{"a":[1,2,3],[4,5]}] plutôt que comme une seule liste aplatie.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- data
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100