jonahgao commented on issue #13904:
URL: https://github.com/apache/datafusion/issues/13904#issuecomment-2562220507

   A subquery is a derived table/relation. A relation is unordered, and you 
can't rely on its tuples being ordered; different database implementations or 
queries have different behaviors. In #12003, DataFusion intentionally optimized 
away unnecessary ordering in subqueries.
   
   Some discussions of other databases:
   - [SQLite: Any way to preserve subquery result order in outer 
query](https://sqlite.org/forum/info/2d5a6e83bb501dffea1207cce3ae09292d1effd656c09471dce1130e9dcf83e6)
   - [MariaDB FAQ: Why is ORDER BY in a FROM Subquery 
Ignored?](https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/)


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