Iceberg data tables whose names end with a metadata-table name fall back to Spark
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
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datafusion-comet
-
ANSI integral SUM overflow reports "integer overflow" without Spark's try_add suggestionPossibly taken @0lai0 claimed this 2 days ago. Openarea:aggregation bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/datafusion-comet#6661 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Native from_json with a schema that repeats a field name fails with "ArrowArray struct has 2 children (expected 1)"Possibly taken @Samearth17 claimed this 3 days ago. Openarea:expressions area:ffi bug good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/datafusion-comet#6592 ·
Maintainers usually reply within 1 day
-
Casting to a struct type with repeated field names fails with "ArrowArray struct has 2 children (expected 1)"Possibly taken @Samearth17 claimed this 3 days ago. Openarea:expressions area:ffi bug good first issue priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/datafusion-comet#6591 ·
Maintainers usually reply within 1 day
-
arrays_zip with two same-named inputs fails with "ArrowArray struct has 2 children (expected 1)"Possibly taken @mohitgurav20 claimed this 10 days ago. Openarea:expressions area:ffi bug priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/datafusion-comet#6251 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
ci: a transient Maven Central failure in lint-java is reported as a scalafix violationPossibly taken @andygrove claimed this 18 days ago. Openarea:ci bug priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion-comet#6060 ·
Maintainers usually reply within 1 day
All issues in apache/datafusion-comet
Similar issues
-
C21 publishes `reactivemongo/core/SSL` as Java 23 bytecode — TLS connections fail on any JDK < 23Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ReactiveMongo/ReactiveMongo#1520 ·
Maintainers usually reply within 1 day
-
module: unknown type: bug/reported
Difficulty 1/5 Under an hour Newbie friendliness 78/100
OpenXiangShan/XiangShan#6688 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug 🐞 Untriaged user issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
valkey-io/valkey-glide#7306 · 1 comment ·
Maintainers usually reply within 2 days