Backport ANSI skipped-operand fix for arithmetic and concat to branch-1.2
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Read docs/source/contributor-guide/backporting.md and compare the branch-1.2 implementation using NullShortCircuit with the fix proposed in PR 7456, which depends on LazyLogical from PR 7326. Reproduce the ANSI-mode query in the issue and investigate whether wrapping operands gives Spark-compatible results and what performance tradeoff it introduces. Done means proposing and implementing a viable backport approach with correctness and performance addressed.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
branch-1.2 has the ANSI bug from https://github.com/apache/datafusion-comet/issues/7246 for arithmetic and concat: native Comet evaluates an operand on rows where Spark skips it, so a query Spark answers fails with CAST_INVALID_INPUT. For example, with spark.sql.ansi.enabled=true:
CREATE TABLE t(n int, txt string) USING parquet;
INSERT INTO t VALUES (NULL, 'bad'), (3, '6');
SELECT n + CAST(txt AS INT) FROM t; -- Spark: NULL, 9. Comet: CAST_INVALID_INPUT
The fix on main is https://github.com/apache/datafusion-comet/pull/7456 (not merged yet). It cannot be cherry-picked as is: it builds on https://github.com/apache/datafusion-comet/pull/7326 (LazyLogical, speculative evaluation), which branch-1.2 does not have. branch-1.2 does have NullShortCircuit (https://github.com/apache/datafusion-comet/pull/6716), so a backport could wrap the operands without speculation.
This issue tracks whether, and how, to backport the fix to branch-1.2, as docs/source/contributor-guide/backporting.md asks for a correctness fix.
Steps to reproduce
Run the query above on branch-1.2 with ANSI mode on.
Expected behavior
Comet returns the same result as Spark: NULL where n is NULL, without evaluating CAST(txt AS INT) there.
Additional context
- Without speculation, the wrapped form is up to about 2x slower than eager evaluation for cheap operands such as
a * (b - c)on batches with NULLs (benchmark in https://github.com/apache/datafusion-comet/pull/7456). Maintainers may prefer to backport with speculation included, or to accept the slowdown for correctness. - Once https://github.com/apache/datafusion-comet/pull/7456 merges, the backport would be decided per
backporting.md.
Willingness to contribute
I can contribute a fix for this bug independently
- 主要言語
- Scala
- スター
- 1.3k
- フォーク
- 414
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 210
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/datafusion-comet のほかの issue
-
requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/datafusion-comet#7583 ·
メンテナーはふだん 2 日以内に返信
-
bug priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
apache/datafusion-comet#7559 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area:writer bug priority:low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/datafusion-comet#7558 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/datafusion-comet#7557 ·
メンテナーはふだん 2 日以内に返信
-
`rand` and `randn` with an integer seed fall back to Spark without a fallback reason対応中かも @galaxytemple が 3 日前に担当しました。 オープンrequires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/datafusion-comet#7479 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
apache/datafusion-comet の issue をすべて見る
似ている issue
-
A-api C-bug S-ready-for-human
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ergoplatform/ergo#2932 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lichess-org/lila#22454 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
chipsalliance/rocket-chip#3845 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 13 日以内に返信