Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#6,719 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@aryan9948 đang làm issue này rồi.

Từ ngày 6/10/2026.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
scala, spark
Lĩnh vực
backend, databases

Hướng nghiên cứu

Issue chỉ đến CometScanRule.isIcebergMetadataTable và IcebergReflection.getTable(scan); hãy bắt đầu bằng cách tìm các điểm đầu vào này và kiểm tra cách xác định các bảng metadata. Bổ sung kiểm thử cho user_files, snapshots và order_history, cùng với một lần đọc thực tế bảng metadata .files. Hoàn thành khi tên bảng thông thường không còn kích hoạt cơ chế dự phòng và các bảng metadata thực tế vẫn kích hoạt cơ chế đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Scala
Star
1.3k
Fork
383
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
413

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/datafusion-comet

Tất cả issue của apache/datafusion-comet

Issue tương tự

Thêm issue về Scala

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.