-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid argument error: the data type binary has no natural order #7343
Labels
bug
Something isn't working
Comments
Marking as a good first issue as there is a reproducer and I think the fix should be relatively straightforward |
18 tasks
This may be fixed in the next arrow release, which adds Binary support to lexsort |
A slightly simpler way to reproduce without the need for datafusion-cli: #[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(())
} |
I have verified that this now works in datafusion 34. Tests added in #7839 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
On running the query below on the Clickbench multi file dataset,
we get this error,
To Reproduce
Download the data using,
A
hits_multi
directory with the parquet files will be created.Execute the above queries,
Expected behavior
The queries should run successfully without erroring.
Additional context
Datafusion 29.0.0
The text was updated successfully, but these errors were encountered: