[C++] ListArray::FromListView gives wrong nulls for sliced list-view arrays
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
cpp/src/arrow/array/array_nested.cc の ListFromListViewImpl から始め、特にオフセットの処理に注目して、その validity bitmap へのアクセスを FlattenListViewArray と比較してください。スライスされた list-view の例で問題を再現し、その後、ListArray::FromListView と LargeListArray::FromListView が入力の null を保持するように、回帰テストを追加または更新してください。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug, including details regarding any error messages, version, and platform.
ListArray::FromListView (and LargeListArray::FromListView) returns the wrong validity for a sliced list-view array with nulls.
auto views = arrow::json::ArrayFromJSONString(
arrow::list_view(arrow::int32()),
"[[1], [2], [3], [4], [5], [6], [7], [8], null, [10], [11]]")
.ValueOrDie();
auto sliced = std::static_pointer_cast<arrow::ListViewArray>(views->Slice(1));
auto lists =
arrow::ListArray::FromListView(*sliced, arrow::default_memory_pool()).ValueOrDie();
// is null (list view): 0 0 0 0 0 0 0 1 0 0
// is null (list): 0 0 1 1 1 1 1 1 1 1
Expected: the same nulls as the input.
In ListFromListViewImpl (cpp/src/arrow/array/array_nested.cc), the validity bitmap is read with list_view_data->GetValues<uint8_t>(0), which already advances the pointer by offset bytes. It is then passed to bit_util::GetBit(in_validity_bitmap, list_view_data->offset + i), which applies the offset again, in bits. FlattenListViewArray in the same file does this correctly with GetValues<uint8_t>(0, 0).
Found while trying to use FromListView in a compute kernel (GH-33295). Related: GH-51612, where the list_view to list cast could use FromListView. Reproduced on current main, Linux x86_64.
Component(s)
C++
- 主要言語
- C++
- スター
- 17.1k
- フォーク
- 4.3k
- 平均マージ
- 4日 3時間
- マージ済み PR(30日)
- 100
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow のほかの issue
-
Component: C++ Type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
Component: GLib
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
Component: Python Type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apache/arrow#51474 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
Component: Continuous Integration Component: MATLAB Type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
[C++][Parquet] Update bundled Apache Thrift to 0.24.0 for CVE-2026-55969対応中かも @Hanayoshi-8744 が 2 日前に担当しました。 オープンComponent: C++ Component: Parquet Type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/arrow#51354 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
component: split-view platform: windows
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zen-browser/desktop#15616 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/ysql kind/bug priority/medium status/awaiting-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
yugabyte/yugabyte-db#34415 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
WayfireWM/wayfire#3148 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
backend:DirectX
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
llvm/llvm-project#227530 ·
メンテナーはふだん 1 日以内に返信