apache / apache/arrow-java

[Java] Inconsistent logic for type IDs in Union vectors

未關閉
#255 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Type: bug
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
11

描述

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

貢獻指南

開啟貢獻指南

研究方向

從 UnionVector#getField 和 DenseUnionVector#getField 開始,然後追蹤建構期間如何處理 fieldType 及其提供的類型 ID。重現直接的 pyarrow 到 Java C Data Interface roundtrip,並驗證兩種向量型別在 roundtrip 後都保留一致的類型 ID。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
data-engineering
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。