You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Snapshot tests in physical_optimizer are not deterministic across CPU-count environments #22543
Several insta snapshot tests in datafusion/core/tests/physical_optimizer/ capture RepartitionExec: partitioning=RoundRobinBatch(N), input_partitions=M where N is the host's CPU core count. On hosts whose core count differs from the snapshot environment, the assertions fail despite the optimizer behavior being correct.
Reproduction
On a 24-core / 24-thread machine, against current main (HEAD 2453bec66):
cargo test -p datafusion --test core_integration \
physical_optimizer::ensure_requirements::test_filter_over_multi_partition_sort_limit
Closing — this was fixed upstream by #22789 (commit bad743dc3, "test: make ensure_requirements tests deterministic"), which landed before the snapshot tests in question would have been a blocker. Verified the fix on apache/main by rebasing PR #22542 (array_sum) onto post-bad743dc3 and observing the previously-failing test_filter_over_multi_partition_sort_limit go green on a 24-core host. Thanks to whoever picked it up.
Activity
crm26 commentedon Jun 19, 2026
Closing — this was fixed upstream by #22789 (commit
bad743dc3, "test: make ensure_requirements tests deterministic"), which landed before the snapshot tests in question would have been a blocker. Verified the fix on apache/main by rebasing PR #22542 (array_sum) onto post-bad743dc3and observing the previously-failingtest_filter_over_multi_partition_sort_limitgo green on a 24-core host. Thanks to whoever picked it up.