Skip to content

Report DataFusion operator metrics in IcebergTableScan #2364

@toutane

Description

@toutane

Is your feature request related to a problem or challenge?

IcebergTableScan does not implement ExecutionPlan::metrics(), so EXPLAIN ANALYZE shows an empty metrics=[] on the scan line while every other operator in the plan reports its cost.

This makes query profiling against Iceberg tables blind on the scan, and prevents quantifying optimizations that touch the scan.

Reproducer: EXPLAIN ANALYZE SELECT * FROM t WHERE foo = 1:

CoalesceBatchesExec: ..., metrics=[output_rows=1, elapsed_compute=19µs]
  FilterExec: foo@0 = 1, metrics=[output_rows=1, elapsed_compute=90µs]
    RepartitionExec: ..., metrics=[fetch_time=4.4ms, ...]
      IcebergTableScan predicate:[foo = 1], metrics=[]        <-- empty

Describe the solution you'd like

Wire BaselineMetrics + ExecutionPlanMetricsSet into IcebergTableScan, same pattern as ParquetExec.

Scope limited to the two default metrics (elapsed_compute, output_rows). bytes_scanned is a natural follow-up once #2349 lands: its ScanMetrics counter can be exposed as a custom DataFusion metric in a separate PR.

Willingness to contribute

I can contribute to this feature independently

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions