How to iterate over a record batch?
- Lenguaje dominante
- Java
- Estrellas
- 94
- Forks
- 152
- Merge medio
- 3 d 16 h
- PR fusionados (30 d)
- 11
Descripción
### 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.
Guía de contribución
Línea de trabajo
Comienza con el uso de VectorSchemaRoot, getVector, getObject y contentToTSVString descrito en el issue, y luego compáralo con la documentación de Java enlazada allí. Identifica la forma documentada de leer cada vector con su tipo concreto de Java, y considera terminado el trabajo cuando una persona nueva pueda iterar sobre un batch sin tener que hacer ingeniería inversa de las correspondencias de tipos ni volver a analizar cadenas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- data
- Tipo de issue
- Documentación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100