924060929 opened a new pull request, #64530:
URL: https://github.com/apache/doris/pull/64530
## Proposed changes
Stabilize the flaky regression test `prune_bucket_with_bucket_shuffle_join`.
### Problem
With `enable_nereids_distribute_planner=true`, the `RIGHT OUTER JOIN` in
this case has a
non-deterministic distribution: it can be planned as either `BUCKET_SHUFFLE`
or `PARTITIONED`.
Both plans are correct — `BUCKET_SHUFFLE` just has one fewer exchange.
The choice is **sticky within a JDBC connection**: every `explain` on the
same connection
returns the same distribution. The regression framework reuses one
connection per suite
(`SuiteContext.getConnection()` caches it in a `ThreadLocal`), so the
existing
`retry(120, 1000)` retries on the same sticky connection and can never flip
`PARTITIONED` → `BUCKET_SHUFFLE`. Once a run lands on `PARTITIONED`, the
`assertTrue(result.contains("RIGHT OUTER JOIN(BUCKET_SHUFFLE)"))` assertion
fails for all
120 retries → flaky failure.
### Fix
After enabling the distribute planner, explain once and check whether the
plan actually
chose `BUCKET_SHUFFLE`:
- if yes → run the existing bucket-shuffle-specific checks (single exchange,
tablet
pruning, result check);
- if no → return early.
This is a test-only change; it does not touch FE/BE planner behavior. Both
distributions
already produce correct results.
## Further comments
The underlying non-determinism (benign tie-break vs. whether the planner
should
deterministically prefer `BUCKET_SHUFFLE`) is a separate planner question
and is left
as-is here; this PR only removes the flakiness from the regression case.
--
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]