Iceberg data tables whose names end with a metadata-table name fall back to Spark
维护者通常 1 天内回复
@aryan9948 已经在做这个了。
开始于 2026年10月6日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
调研方向
Issue 指向 CometScanRule.isIcebergMetadataTable 和 IcebergReflection.getTable(scan);首先找到这些入口点,并检查元数据表是如何识别的。为 user_files、snapshots 和 order_history 添加测试覆盖,并增加一次对实际 .files 元数据表的读取。完成标准是普通表名不再触发回退逻辑,而实际的元数据表仍会触发。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
CometScanRule.isIcebergMetadataTable matches the table name with endsWith against the metadata table names (files, snapshots, history, entries, manifests, partitions, ...) with no separator. Any ordinary Iceberg table whose name ends with one of those words is treated as a metadata table and falls back to Spark with Iceberg Metadata tables are not supported, for example user_files, order_history, daily_partitions, or a table named snapshots.
val name = scanExec.table.name().toLowerCase(Locale.ROOT)
metadataTableSuffix.exists(name.endsWith)
Steps to reproduce
CREATE TABLE cat.db.user_files (id INT, name STRING) USING iceberg;
INSERT INTO cat.db.user_files VALUES (1, 'a'), (2, 'b');
SELECT * FROM cat.db.user_files;
With spark.comet.scan.icebergNative.enabled=true and spark.comet.explain.fallback.enabled=true the scan is reported as:
BatchScan cat.db.user_files [COMET: Iceberg Metadata tables are not supported]
The same table named users gets CometIcebergNativeScan.
Expected behavior
Only real metadata tables (cat.db.user_files.files, ...metadata.json#files) should fall back.
Additional context
Proposed fix: recognize a metadata table by its Iceberg type. Every metadata table extends org.apache.iceberg.BaseMetadataTable, and the table is reachable through the existing IcebergReflection.getTable(scan). Fall back to a whole-segment name match (.files, #files) only when the table cannot be reached. Happy to open a PR with a test covering user_files, snapshots and order_history plus a real .files read.
- 主要语言
- Scala
- 星标
- 1.3k
- 派生
- 383
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 413
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datafusion-comet 的其他 Issue
-
ANSI integral SUM overflow reports "integer overflow" without Spark's try_add suggestion可能已有人在做 @0lai0 于 2 天前认领。 未关闭area:aggregation bug priority:medium
难度 2/5 1-3 小时 新手友好度 82/100
apache/datafusion-comet#6661 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Native from_json with a schema that repeats a field name fails with "ArrowArray struct has 2 children (expected 1)"可能已有人在做 @Samearth17 于 3 天前认领。 未关闭area:expressions area:ffi bug good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 70/100
apache/datafusion-comet#6592 ·
维护者通常 1 天内回复
-
Casting to a struct type with repeated field names fails with "ArrowArray struct has 2 children (expected 1)"可能已有人在做 @Samearth17 于 3 天前认领。 未关闭area:expressions area:ffi bug good first issue priority:high
难度 2/5 1-3 小时 新手友好度 68/100
apache/datafusion-comet#6591 ·
维护者通常 1 天内回复
-
arrays_zip with two same-named inputs fails with "ArrowArray struct has 2 children (expected 1)"可能已有人在做 @mohitgurav20 于 10 天前认领。 未关闭area:expressions area:ffi bug priority:high
难度 2/5 1-3 小时 新手友好度 78/100
apache/datafusion-comet#6251 · 4 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
ci: a transient Maven Central failure in lint-java is reported as a scalafix violation可能已有人在做 @andygrove 于 18 天前认领。 未关闭area:ci bug priority:low
难度 2/5 1-3 小时 新手友好度 84/100
apache/datafusion-comet#6060 ·
维护者通常 1 天内回复
查看 apache/datafusion-comet 的全部 Issue
相似的 Issue
-
module: unknown type: bug/reported
难度 1/5 1 小时以内 新手友好度 78/100
OpenXiangShan/XiangShan#6688 ·
维护者通常 1 天内回复
-
bug documentation
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
bug 🐞 Untriaged user issue
难度 2/5 1-3 小时 新手友好度 68/100
valkey-io/valkey-glide#7306 · 1 条评论 ·
维护者通常 2 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 68/100
lichess-org/lila#21988 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
playframework/playframework#14336 ·
维护者通常 1 天内回复