apache / apache/arrow-java

[Java] Inconsistent logic for type IDs in Union vectors

Đang mở
#255 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Type: bug
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ả

The current logic for calculating the type IDs in UnionVector#getField and DenseUnionVector#getField is:
1. DenseUnionVector uses an increasing counter 
1. UnionVector uses the ordinal of the type enum
1. Both completely ignore the type IDs provided at construction as part of fieldType (if provided)

We encountered this inconsistency while testing a direct roundtrip of a union vector between pyarrow and Java with the C Data Interface ('direct' here means without using VectorSchemaRoot/RecordBatch). The identifiers for the type IDs differ after completing a roundtrip. 

 

**Reporter**: [Roee Shlomo](https://issues.apache.org/jira/browse/ARROW-14271) / @roee88

**Note**: *This issue was originally created as [ARROW-14271](https://issues.apache.org/jira/browse/ARROW-14271). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

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 UnionVector#getField và DenseUnionVector#getField, sau đó lần theo cách fieldType và các type ID được cung cấp cho nó được xử lý trong quá trình xây dựng. Tái hiện roundtrip trực tiếp từ pyarrow sang Java qua C Data Interface và xác minh rằng cả hai loại vector đều duy trì các type ID nhất quán sau roundtrip.

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-engineering
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/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.