Skip to content

[core] Fix chain table partition listing under data filters.#7268

Open
JunRuiLee wants to merge 2 commits intoapache:masterfrom
JunRuiLee:fix-chain-table-1
Open

[core] Fix chain table partition listing under data filters.#7268
JunRuiLee wants to merge 2 commits intoapache:masterfrom
JunRuiLee:fix-chain-table-1

Conversation

@JunRuiLee
Copy link
Contributor

Purpose

Fix incorrect results for chain table reads with non‑partition filters.

Expected behavior is that chain reads enumerate partitions using only partition predicates, while non‑partition filters apply only when reading splits within each partition.
The current implementation calls listPartitions() on a scan that already applies data filters, so partition listing gets pruned by non‑partition predicates. This can skip fallback partitions and yield empty or incomplete results.

Tests

  • `SparkChainTableITCase

@JunRuiLee
Copy link
Contributor Author

Hi @Aitozi , could you please help review this PR? Thanks!

@JunRuiLee JunRuiLee force-pushed the fix-chain-table-1 branch from 521e5b1 to b1e7e07 Compare March 3, 2026 07:29
@JunRuiLee
Copy link
Contributor Author

Gentle ping @Aitozi for review when you have time.

@Aitozi
Copy link
Contributor

Aitozi commented Mar 9, 2026

Thanks @JunRuiLee for the fix, LGTM +1.

Do you have any other comments for this? cc @JingsongLi @Stefanietry

Copy link
Contributor

@Aitozi Aitozi left a comment

Choose a reason for hiding this comment

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

+1

@Aitozi
Copy link
Contributor

Aitozi commented Mar 9, 2026

I want to point another thing here, that the same problem should also exist in the FallbackReadScan#plan, It mix using the partition filter and data filter, which would lead to the scan.fallback-branch not based on the partition only.

Can you also create a fix for that, you can do that in another PR. @JunRuiLee

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

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.

3 participants