ORC: `IS DISTINCT FROM` skips files where the column is all NULL

未关闭
#19,191 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@adiranjan25 已经在做这个了。

开始于 2026年11月29日。

  • #19197 来自 @adiranjan25 —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
java, spark
领域
backend, databases

调研方向

Start by checking the open pull request #19197, which is already linked to this issue. The report identifies ORC predicate pushdown for IS DISTINCT FROM as the failing path and gives SQL to reproduce it on Spark 3.5.5; compare the pushed and control query results. Done means the pushed query includes row 3 from the all-NULL stripe, matching the control.

由索引模型根据 Issue 内容生成。

描述

bug
Apache Iceberg version

1.12.0 (latest release)

Query engine

Spark

Please describe the bug 🐞

On ORC tables, WHERE a IS DISTINCT FROM 7 silently drops the NULL rows of a in files (stripes) where a is all NULL. UPDATE and DELETE with this condition miss the same rows. Parquet is correct. Reproduced on main (9d4f6c7, 2026-11-28) and 1.12.0, Spark 3.5.5.

Reproduction
CREATE TABLE local.db.t (id INT, a INT) USING iceberg TBLPROPERTIES ('write.format.default'='orc');
INSERT INTO local.db.t VALUES (1, 3), (2, 7);
-- a file whose column a is all NULL
INSERT INTO local.db.t VALUES (3, NULL);

SELECT 'pushed', collect_list(id) FROM (SELECT id FROM local.db.t WHERE a IS DISTINCT FROM 7 ORDER BY id);
-- control: same predicate, not pushed down
SELECT 'not pushed', collect_list(id) FROM (SELECT id FROM local.db.t WHERE coalesce(a, a) IS DISTINCT FROM 7 ORDER BY id);
Expected
Query Result
pushed [1,3]
not pushed (control) [1,3]
Actual
Query Result
pushed [1]
not pushed (control) [1,3]
Willingness to contribute
  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
主要语言
Java
星标
9.5k
派生
3.7k
平均合并
2 天 2 小时
30 天内合并 PR
170

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/iceberg 的其他 Issue

查看 apache/iceberg 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。