apache / apache/arrow-java

How to iterate over a record batch?

Đang mở
#468 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Type: usage
Ngôn ngữ chính
Java
Star
94
Fork
152
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
11

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với cách sử dụng VectorSchemaRoot, getVector, getObject và contentToTSVString được mô tả trong issue, sau đó so sánh chúng với tài liệu Java được liên kết ở đó. Xác định cách được tài liệu mô tả để đọc từng vector với kiểu Java cụ thể tương ứng, và coi công việc hoàn tất khi một người mới có thể lặp qua một batch mà không phải reverse-engineering các ánh xạ kiểu hoặc phân tích lại các chuỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
data
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.