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

   **Describe the bug**
   
   With the adaptive planner (the default), a `LEFT` or `FULL OUTER JOIN` whose 
other side has no rows never finishes. Each replan turns the finished empty 
stage into a new empty stage, as #2837 describes, so the job keeps creating 
stages and never completes.
   
   It doesn't depend on the table format: it happens with Parquet on both 
sides, and with Iceberg tables.
   
   **To Reproduce**
   
   Standalone Ballista at 2f4938ef, a fresh cluster, a Parquet table `pq` with 
rows `(1, 'a'), (2, 'b'), (3, 'c')`, and a view over it with no rows:
   
   ```sql
   CREATE VIEW pq_empty AS SELECT * FROM pq WHERE id > 100;
   SELECT l.id, r.id FROM pq l LEFT JOIN pq_empty r ON l.id = r.id;
   ```
   
   | Planner | Result |
   |---|---|
   | adaptive (default) | doesn't finish (stopped after 20 s; another run was 
still going after 9 minutes) |
   | adaptive, `ballista.planner.propagate_empty.enabled = false` | 3 rows |
   | static (`ballista.planner.adaptive.enabled = false`) | 3 rows |
   
   `FULL OUTER JOIN` behaves the same.
   
   **Expected behavior**
   
   3 rows, as DataFusion returns.
   
   **Additional context**
   
   - #2837 fixes it.
   - Workaround: `ballista.planner.propagate_empty.enabled = false`, or the 
static planner.
   


-- 
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