andygrove opened a new issue, #2047:
URL: https://github.com/apache/datafusion-ballista/issues/2047

   ## Describe the bug
   
   With adaptive execution enabled (`ballista.planner.adaptive.enabled=true`), 
a large set of TPC-DS queries fail with the same internal assertion:
   
   ```
   DataFusionError(Internal("Assertion failed: partition < self.partitions:
     EmptyExec invalid partition N (expected less than 1)"))
   ```
   
   The consumer requests partition `N` (observed 1–7) from an `EmptyExec` that 
was built with a single partition (`expected less than 1`). The **same queries 
succeed under the static planner** (AQE off), so this is specific to the 
adaptive planner's partitioning of an `EmptyExec` (or of the stage that 
consumes it).
   
   ## Affected queries (SF1)
   
   15 queries fail with this exact assertion:
   
   ```
   q1 q8 q16 q24 q29 q34 q37 q41 q43 q44 q46 q54 q61 q68 q73
   ```
   
   (partition index in the message varies per query: q1→1, q8→3, q29→4, q37→5, 
q44→6, q46→7, …)
   
   ## To Reproduce
   
   Generate SF1 TPC-DS Parquet, start a scheduler + executor, then:
   
   ```
   tpcds --host localhost --port 50050 --path <data> --partitions 16 --verify \
     --query 1 -c datafusion.optimizer.prefer_hash_join=false \
     -c ballista.planner.adaptive.enabled=true
   # -> Job failed due to stage N failed: ... EmptyExec invalid partition 1 
(expected less than 1)
   ```
   
   The same query with `ballista.planner.adaptive.enabled` unset (static 
planner) succeeds.
   
   ## Expected behavior
   
   Adaptive execution runs these queries to completion, as the static planner 
does.
   
   ## Additional context
   
   Reproduced at SF1 on a 1-scheduler / 1-executor native cluster (8 slots, 16 
partitions), base `apache/main` @ f45996cf.
   
   Two other AQE-only failures were seen in the same sweep and look 
**separate** from this assertion (not included above):
   - **q72** — `ResourcesExhausted` on `HashJoinInput` (memory-pool exhaustion 
under the adaptive broadcast path).
   - **q23, q77** — hang (>180s), consistent with a cross-stage dynamic-filter 
deadlock.
   
   Part of the adaptive-execution epic #1359; distinct from #1826 (TPC-DS Q72 
AQE `OffsetOverflowError`). Surfaced by the TPC-DS correctness harness proposed 
in the PR for #1845.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to