fornwall opened a new issue, #26012:
URL: https://github.com/apache/datafusion/issues/26012
### Describe the bug
A `CASE <expr> WHEN <literal> THEN <literal> ...` with at least two
branches, where the operand and WHEN literals are `FixedSizeBinary`, panics
during execution instead of returning a result.
### To Reproduce
```sql
SELECT CASE x
WHEN arrow_cast(X'01', 'FixedSizeBinary(1)') THEN 1
WHEN arrow_cast(X'02', 'FixedSizeBinary(1)') THEN 2
ELSE 3
END AS r
FROM (SELECT arrow_cast(X'03', 'FixedSizeBinary(1)') AS x);
```
```text
thread 'main' panicked at arrow-array-60.0.0/src/cast.rs:938:29:
binary array
```
The same query with plain `Binary` values (no `arrow_cast`) returns `3`, and
so does the `FixedSizeBinary` query with only one `WHEN` branch.
### Expected behavior
The query returns `3`.
### Additional context
Reproduced with datafusion-cli on `main` (14b8de8b7).
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]