Skip to content

[python][daft] Preserve pushed filters across source serialization#8061

Merged
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:fix-pushdown-pickle
Jun 1, 2026
Merged

[python][daft] Preserve pushed filters across source serialization#8061
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:fix-pushdown-pickle

Conversation

@QuakeWang
Copy link
Copy Markdown
Contributor

Purpose

PaimonDataSource.__setstate__() restores pushed filter state before reopening the table, but _init_table() then reset _pushed_filters, _paimon_predicate, and _remaining_filters to None.

This made serialized Daft sources lose filters already accepted by push_filters(). In fallback reads, get_tasks(Pushdowns(filters=None, limit=1)) could then plan an unfiltered limited read and return the wrong row.

This PR moves pushdown state initialization to __init__(), keeps _init_table() limited to table-derived metadata, and includes _pushed_filters in the serialized state for consistent explain/debug output.

Tests

  • pytest paimon-python/pypaimon/tests/daft/daft_data_test.py

@JingsongLi
Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 58ed52a into apache:master Jun 1, 2026
6 checks passed
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.

2 participants