Skip to content

Sort-aware Iceberg reads: per-partition streaming merge + report ordering and grouping (v1) #5337

Description

@parthchandra

What is the problem the feature request solves?

The native Iceberg scan now preserves the sort order instead of throwing it away. Within each Spark partition it reads each already-sorted file as its own stream and k-way-merges them into one sorted stream, then tells Spark the output is sorted so redundant sorts can be dropped. It also reports Iceberg's key-grouped partitioning so
storage-partitioned joins can skip the shuffle.

Scope of this first version:

  • Ordering reporting is limited to plain-column (identity) sort keys that are in the projection. Anything else falls back to an unordered read, so it's always correct.
  • Two flags: spark.comet.scan.icebergNative.sortMerge.enabled (on by default) and spark.comet.scan.icebergNative.reportPartitioning.enabled (off by default).
  • No changes to iceberg-rust.

Describe the potential solution

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

area:scanParquet scan / data readingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions