Skip to content

feat(datafusion): show pushed-down limit in IcebergTableScan EXPLAIN output#2360

Merged
blackmwk merged 2 commits intoapache:mainfrom
toutane:feat/datafusion-scan-display-limit
Apr 23, 2026
Merged

feat(datafusion): show pushed-down limit in IcebergTableScan EXPLAIN output#2360
blackmwk merged 2 commits intoapache:mainfrom
toutane:feat/datafusion-scan-display-limit

Conversation

@toutane
Copy link
Copy Markdown
Contributor

@toutane toutane commented Apr 23, 2026

Which issue does this PR close?

What changes are included in this PR?

Emit limit:[N] in IcebergTableScan's DisplayAs output when a LIMIT is pushed down to the scan. When no limit is pushed down, the output is unchanged.

  • Before (unchanged):
    IcebergTableScan projection:[id,name] predicate:[...]

  • After (new, only when a limit reaches the scan):
    IcebergTableScan projection:[...] predicate:[] limit:[3]

Are these changes tested?

Yes: new EXPLAIN ... LIMIT 3 assertion in crates/sqllogictest/testdata/slts/df_test/basic_queries.slt. Existing snapshots are unchanged, which confirms the additive-only behavior.

@toutane toutane marked this pull request as ready for review April 23, 2026 09:09
Copy link
Copy Markdown
Contributor

@blackmwk blackmwk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @toutane for this pr!

@blackmwk blackmwk merged commit c82c42e into apache:main Apr 23, 2026
20 checks passed
toutane added a commit to DataDog/iceberg-rust that referenced this pull request Apr 29, 2026
…output (apache#2360)

## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes apache#123` indicates that this PR will close issue apache#123.
-->

- Closes apache#2359.

## What changes are included in this PR?

<!--
Provide a summary of the modifications in this PR. List the main changes
such as new features, bug fixes, refactoring, or any other updates.
-->

Emit ` limit:[N]` in `IcebergTableScan`'s `DisplayAs` output when a
`LIMIT` is pushed down to the scan. When no limit is pushed down, the
output is unchanged.

- Before (unchanged):
`IcebergTableScan projection:[id,name] predicate:[...]`

- After (new, only when a limit reaches the scan):
`IcebergTableScan projection:[...] predicate:[] limit:[3]`

## Are these changes tested?

<!--
Specify what test covers (unit test, integration test, etc.).

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

Yes: new `EXPLAIN ... LIMIT 3` assertion in
`crates/sqllogictest/testdata/slts/df_test/basic_queries.slt`. Existing
snapshots are unchanged, which confirms the additive-only behavior.

(cherry picked from commit c82c42e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display limit in IcebergTableScan EXPLAIN output when pushed down

2 participants