Skip to content

[native_datafusion] [Spark SQL Tests] Dynamic Partition Pruning (DPP) not working correctly #3313

Closed

Description

@andygrove

Summary

3 Spark SQL tests fail due to DPP-related issues when native_datafusion scan is used in auto mode.

Failing Tests

  • DynamicPartitionPruningSuite: "static scan metrics" — scanOption.isDefined was false
  • ExplainSuite: "explain formatted - check presence of subquery in case of DPP" — expected 2 subqueries, found 0
  • Multiple TASK_WRITE_FAILED errors in DPP-related stages

Root Cause

nativeDataFusionScan already has a check for dynamic pruning filters (isDynamicPruningFilter), but these tests use DPP scenarios (e.g. static pruning, subqueries) that may bypass that check. The fallback logic may need to be broadened, or the plan structure produced by native_datafusion may not be compatible with DPP expectations.

Related

Discovered in CI for #3307 (enable native_datafusion in auto scan mode).

Activity

  1. peterxcli commented on Jan 30, 2026

    @peterxcli
    Member

    take

  2. added a commit that references this issue on Mar 13, 2026
    eacc865
  3. andygrove commented on Apr 23, 2026

    @andygrove
    MemberAuthor

    Reopening. When enabling native_datafusion in auto scan mode with Spark 4.0.1 and unignoring the IgnoreCometNativeDataFusion("…/3321") tags, this DPP test still fails:

    • DynamicPartitionPruningSuite: "Subquery reuse across the whole plan" (fails in V1SuiteAEOff; passes in V2SuiteAEOff, V2FilterSuiteAEOff; AEOn variants are skipped via DisableAdaptiveExecution). Failure: List(880, 787, 660) had size 3 instead of expected size 2 — whole-plan subquery reusing not working correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions