Skip to content

[AURON #2219] Expose numFiles and numPartitions metrics for native Iceberg scan#2220

Draft
weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit:feat/expose-iceberg-native-scan-metrics
Draft

[AURON #2219] Expose numFiles and numPartitions metrics for native Iceberg scan#2220
weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit:feat/expose-iceberg-native-scan-metrics

Conversation

@weimingdiit
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2219

Rationale for this change

Native Iceberg scan currently exposes native file scan metrics, but it does not report the driver-side numFiles and numPartitions metrics that regular native file scans expose. These metrics are useful for understanding the scan planning result in Spark SQL UI.

What changes are included in this PR?

This PR adds numFiles and numPartitions metrics to NativeIcebergTableScanExec.

  • Adds Native.files_read and Native.partitions_read metrics.
  • Populates these metrics after Iceberg file tasks are converted into Spark file partitions.
  • Posts the driver metric updates via SQLMetrics.postDriverMetricUpdates.
  • Adds integration test coverage for the new native Iceberg scan metrics.

Are there any user-facing changes?

Yes. Spark SQL metrics for native Iceberg scans now include file count and partition count.

How was this patch tested?

CI.

@weimingdiit weimingdiit force-pushed the feat/expose-iceberg-native-scan-metrics branch 2 times, most recently from b2f44c6 to 5226d46 Compare April 28, 2026 04:01
…ive Iceberg scan

Signed-off-by: weimingdiit <weimingdiit@gmail.com>
@weimingdiit weimingdiit force-pushed the feat/expose-iceberg-native-scan-metrics branch from 5226d46 to 8d8408c Compare April 28, 2026 06:01
@github-actions github-actions Bot added the spark label Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose numFiles and numPartitions metrics for native Iceberg scan

1 participant