test: no test on main reaches the folded UnsafeArrayData literal fix from #6666
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
spark/src/test/resources/sql-tests/operators/one_row_relation.sql から始めてください。このファイルには -- ConstantFolding: enabled ディレクティブがありません。また CometSqlFileTestSuite は、ファイルがそれを要求しない限り定数畳み込みをスキップします。そのディレクティブをこれらのクエリに追加するか、expressions/array/folded_array_map_literals.sql に移動してください。そして、リテラルが Comet オペレータの下で実行されるようにしてください。たとえばテーブル上で射影するなどです。spark/src/main/scala/org/apache/comet/serde/literals.scala の toArray[Any] 呼び出しを元に戻したときにスイートが失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
#6666 changed CometLiteral to read array literal values with toArray[Any](elementType) instead of ArrayData.array. A constant-folded array such as sequence(1, 5) is an UnsafeArrayData, and UnsafeArrayData.array() throws. Before the change, planning such a query failed with UNSUPPORTED_CALL.
The test added for that change is the first three queries in spark/src/test/resources/sql-tests/operators/one_row_relation.sql. That file has no -- ConstantFolding: enabled line, and CometSqlFileTestSuite excludes ConstantFolding unless the file asks for it (the directive came in #6731, two days after #6666). So SELECT sequence(1, 5) there never folds. It runs through the native CometSequence, and the CometLiteral lines from #6666 are never reached. I couldn't find another test on main that folds an array into an UnsafeArrayData literal under a Comet operator, so putting .array back should go unnoticed.
Found in #7449, the branch-1.1 backport of the fix, which adds a Scala test that does fold: https://github.com/apache/datafusion-comet/pull/7449#pullrequestreview-5754272211
Steps to reproduce
- On
main, change the twotoArray[Any](...)calls inspark/src/main/scala/org/apache/comet/serde/literals.scalaback to.array. - Run
CometSqlFileTestSuiteforone_row_relation. With folding excluded,sequence(1, 5)stays aSequenceexpression, so the reverted lines are never called and the file should still pass.
Expected behavior
A test on main fails when the fix is reverted. Either of these would do it:
- Add
-- ConstantFolding: enabledto the queries inone_row_relation.sql, or move them into a fixture that has it, such asexpressions/array/folded_array_map_literals.sql. - Port the test from #7449, which projects
sequence(1, 5)andarray(sequence(1, 3), sequence(4, 5))over a Parquet table. The nested query covers the innermakeListLiteralcall as well.
Additional context
The queries need to read from a table, or run over a OneRowRelation with folding on, so that the folded literal sits under an operator Comet converts.
- 主要言語
- Scala
- スター
- 1.3k
- フォーク
- 405
- 平均マージ
- 3日 7時間
- マージ済み PR(30日)
- 225
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/datafusion-comet のほかの issue
-
`rand` and `randn` with an integer seed fall back to Spark without a fallback reason対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンrequires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/datafusion-comet#7479 ·
メンテナーはふだん 2 日以内に返信
-
area:writer enhancement requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
apache/datafusion-comet#7463 ·
メンテナーはふだん 2 日以内に返信
-
requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/datafusion-comet#7453 ·
メンテナーはふだん 2 日以内に返信
-
area:ci enhancement priority:low requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/datafusion-comet#7319 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area:ci bug priority:low requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/datafusion-comet#7315 ·
メンテナーはふだん 2 日以内に返信
apache/datafusion-comet の issue をすべて見る
似ている issue
-
Area: PDF support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
orbeon/orbeon-forms#8055 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lichess-org/database#103 ·
-
kind:bug priority:major
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[BUG] The LZ4 shuffle decompressor leaks a reference on its inputs when an output allocation failsオープン? - Needs Triage bug shuffle
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/cudf-spark#16770 ·
メンテナーはふだん 1 日以内に返信
-
Spark benchmarks crash with `[INVALID_DRIVER_MEMORY]` on JVMs whose default heap is below Spark's ~450 MB minimum対応中かも @sendaoYan が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100