apache / apache/arrow-java

How to iterate over a record batch?

Ouverte
#468 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Type: usage
Langage dominant
Java
Étoiles
94
Forks
152
Merge moyen
3 j 16 h
PR mergées (30 j)
11

Description

### Describe the usage question you have. Please include as many useful details as possible.

Now I have a `VectorSchemaRoot`. I can see to iterate over the batch with `getVector` and then `getObject`.

But the return value is of type `Obejct`. And I wonder how I can downcast it for some useful class I can retrieve the real value (string, int, float, etc.).

I know we have the field info of each vetcor, but I don't know the mapping between field type to real Java class. It looks over challenge to remember all the mapping by reverse engineering the code, and it may change as version evolves.

I checked https://arrow.apache.org/docs/java/index.html but all the pages tell about constructing a batch and how to move it from one place to another, rather than tell about how to read and dump a batch to a typed two-dimensional matrix.

The most trivial usage, `contentToTSVString`, call `Object::toString` on each cell. But I don't thing we should convert all the values to String and reparse it to concrete type.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par l’utilisation de VectorSchemaRoot, getVector, getObject et contentToTSVString décrite dans l’issue, puis comparez-la avec la documentation Java qui y est liée. Identifiez la manière documentée de lire chaque vecteur avec son type Java concret, et considérez le travail terminé lorsqu’un nouveau contributeur peut parcourir un batch sans devoir rétroconcevoir les correspondances de types ni réanalyser des chaînes.

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

Évaluation

Stack technique
java
Domaine
data
Type d'issue
Documentation
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

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