Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#6,719 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@aryan9948 is already working on this.

Since Oct 6, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
scala, spark
Domain
backend, databases

Research direction

The issue points to CometScanRule.isIcebergMetadataTable and IcebergReflection.getTable(scan); start by locating those entry points and checking how metadata tables are identified. Add coverage for user_files, snapshots, and order_history, alongside a real .files metadata-table read. Done when ordinary table names no longer trigger the fallback and actual metadata tables still do.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Scala
Stars
1.3k
Forks
383
Avg merge
2d 4h
Merged PRs (30d)
413

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/datafusion-comet

All issues in apache/datafusion-comet

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.