suremarc commented on issue #8838:
URL: 
https://github.com/apache/arrow-datafusion/issues/8838#issuecomment-1920144404

   Just to make sure we're all on the same page, I think the first case (single 
order by expression) already works due to monotonicity, and I think `CAST` is 
considered monotonic. In the original post I mentioned that the following query 
does not require a sort, due to having only one sorting column:
   ```sql
   EXPLAIN
   SELECT 
       CAST(c_customer_sk AS BIGINT) AS c_customer_sk_big
   FROM delta_encoding_required_column
   ORDER BY c_customer_sk_big DESC;
   ```
   
   The second case (multiple order by expressions) is the troublesome one, 
because I think monotonicity alone is not sufficient (that's where 
one-to-one-ness becomes relevant). 


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

Reply via email to