[VL] A broadcast anti join drops build rows that its filter can still match through coalesce or nvl

オープン
#13,711 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@LuciferYang がすでに取り組んでいます。

2026年11月21日 から。

  • #13712 @LuciferYang による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
scala, sql
領域
databases

調査の方向性

Start at SparkShims.isNullIntolerant(condition), which only inspects the root of the join filter; compare that decision with the native hash-table build path that drops null build rows. Use the issue's probe/build SQL to reproduce, then check both coalesce and nvl variants against Spark. Done when the broadcast anti join returns only (2, 1) with default config, and the driver-side build path agrees. Note linked PR #13712 is already open.

索引モデルが issue の本文から書いたものです。

説明

For a broadcast anti join with a filter, the native hash table build leaves out the build rows that are null in any build column the filter references, when it is told the filter is null-intolerant. Gluten decides that with SparkShims.isNullIntolerant(condition), which only checks the root of the condition. A filter like p.x > coalesce(b.y, 0) has a null-intolerant root (GreaterThan), so the rows with a null y are dropped, although coalesce(null, 0) is 0 and they can match.

With the default configuration:

-- probe(k, x) = (1, 5), (2, 1)
-- build(k, y) = (1, null), (2, 3)
SELECT * FROM probe WHERE NOT EXISTS
  (SELECT 1 FROM build WHERE probe.k = build.k AND probe.x > coalesce(build.y, 0))

Spark returns (2, 1). Gluten returns (1, 5) and (2, 1). nvl, LEFT ANTI JOIN and the driver-side hash table build behave the same. It reproduces on v1.8.0-rc1.

This issue was written with the assistance of AI (Claude Opus).

主要言語
Scala
スター
1.6k
フォーク
685
平均マージ
4日 16時間
マージ済み PR(30日)
84

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/gluten のほかの issue

apache/gluten の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。