kosiew opened a new pull request, #16257:
URL: https://github.com/apache/datafusion/pull/16257

   ## Which issue does this PR close?
   
   - Closes #16180.
   
   ## Rationale for this change
   
   Intermittent test failures were observed in the `limit.slt` SQL logic test 
file on the `main` branch, specifically related to a query that uses a `LIMIT` 
clause without an `ORDER BY`. Since SQL `LIMIT` behavior is non-deterministic 
without a defined order, this led to flaky test results.
   
   This change explicitly adds an `ORDER BY part_key` to the `LIMIT` subquery 
to ensure deterministic results and resolve test flakiness.
   
   ## What changes are included in this PR?
   
   - Added `ORDER BY part_key` to the subquery in `limit.slt` to make the 
result deterministic when using `LIMIT`.
   
   ## Are these changes tested?
   
   Yes. The change modifies an existing SQL logic test to enforce a 
deterministic result, which now consistently passes in CI runs.
   
   Tested with:
   ```
   for i in {1..100}; do
     echo "Run #$i"
     cargo test -p datafusion-sqllogictest limit || break
   done
   ```
   
   ## Are there any user-facing changes?
   
   No. This change only affects internal test stability and does not impact the 
user-facing API or behavior.
   
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to