liukun4515 edited a comment on pull request #1487:
URL: https://github.com/apache/arrow-rs/pull/1487#issuecomment-1079712978


   @yjshen  Can you provide sql in the datafusion side?
   I find the sorting of decimal works on my side.
   ```
   ❯ \d food
   
+---------------+--------------+------------+-------------+-----------------+-------------+
   | table_catalog | table_schema | table_name | column_name | data_type       
| is_nullable |
   
+---------------+--------------+------------+-------------+-----------------+-------------+
   | datafusion    | public       | food       | a           | Decimal(10, 5)  
| NO          |
   | datafusion    | public       | food       | b           | Decimal(20, 15) 
| NO          |
   | datafusion    | public       | food       | c           | Boolean         
| NO          |
   
+---------------+--------------+------------+-------------+-----------------+-------------+
   
   ❯ select * from food;
   +---------+-------------------+-------+
   | a       | b                 | c     |
   +---------+-------------------+-------+
   | 0.00001 | 0.000000000001000 | true  |
   | 0.00002 | 0.000000000002000 | false |
   | 0.00002 | 0.000000000002000 | false |
   | 0.00003 | 0.000000000003000 | true  |
   | 0.00003 | 0.000000000003000 | true  |
   | 0.00003 | 0.000000000003000 | true  |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   +---------+-------------------+-------+
   
   
   ```
   
   sort data by desc.
   
   ```
   ❯ select * from food order by a desc;
   +---------+-------------------+-------+
   | a       | b                 | c     |
   +---------+-------------------+-------+
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00005 | 0.000000000005000 | true  |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00004 | 0.000000000004000 | false |
   | 0.00003 | 0.000000000003000 | true  |
   | 0.00003 | 0.000000000003000 | true  |
   | 0.00003 | 0.000000000003000 | true  |
   | 0.00002 | 0.000000000002000 | false |
   | 0.00002 | 0.000000000002000 | false |
   | 0.00001 | 0.000000000001000 | true  |
   +---------+-------------------+-------+
   ```


-- 
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...@arrow.apache.org

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


Reply via email to