yjshen commented on issue #7343:
URL: 
https://github.com/apache/arrow-datafusion/issues/7343#issuecomment-1694725645

   A slightly simpler way to reproduce without the need for datafusion-cli:
   ```rs
   #[tokio::test]
   async fn binary_order() -> Result<()> {
       let schema = Arc::new(Schema::new(vec![
           Field::new("a", DataType::Binary, false),
           Field::new("b", DataType::Int32, false),
       ]));
       let batch = RecordBatch::try_new(
           schema.clone(),
           vec![Arc::new(BinaryArray::from(vec![
               "a".as_bytes(),
               "b".as_bytes(),
               "c".as_bytes(),
           ])),
           Arc::new(Int32Array::from(vec![1, 2, 3]))],
       )?;
   
       let ctx = SessionContext::new();
       ctx.register_batch("aa", batch)?;
       let result = ctx.sql("select a from aa where a <> '' order by b, 
a").await?;
       let result = result.collect().await?;
       let expected = vec![
           "+----+",
           "| a  |",
           "+----+",
           "| 61 |",
           "| 62 |",
           "| 63 |",
           "+----+",
       ];
       assert_batches_eq!(expected, &result);
       Ok(())
   }
   ```


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