Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Iceberg data tables whose names end with a metadata-table name fall back to Spark

未关闭 适合新手
#6,719 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@aryan9948 已经在做这个了。

开始于 2026年10月6日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
scala, spark
领域
backend, databases

调研方向

Issue 指向 CometScanRule.isIcebergMetadataTable 和 IcebergReflection.getTable(scan);首先找到这些入口点,并检查元数据表是如何识别的。为 user_files、snapshots 和 order_history 添加测试覆盖,并增加一次对实际 .files 元数据表的读取。完成标准是普通表名不再触发回退逻辑,而实际的元数据表仍会触发。

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

描述

requires-triage
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

环境准备

从这里开始

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

apache/datafusion-comet 的其他 Issue

查看 apache/datafusion-comet 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

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