apache / apache/arrow-java

How to iterate over a record batch?

Aberta
#468 4 comentários 0 reações 0 responsáveis Ver no GitHub
Type: usage
Linguagem predominante
Java
Estrelas
94
Forks
152
Merge médio
3d 16h
PRs com merge (30d)
11

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo uso de VectorSchemaRoot, getVector, getObject e contentToTSVString descrito na issue e, em seguida, compare-o com a documentação Java vinculada nela. Identifique a forma documentada de ler cada vetor com seu tipo Java concreto e considere o trabalho concluído quando uma pessoa nova no projeto puder iterar sobre um batch sem precisar fazer engenharia reversa dos mapeamentos de tipos nem reanalisar strings.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java
Domínio
data
Tipo de issue
Documentação
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.