kawadakk commented on issue #12709:
URL: https://github.com/apache/datafusion/issues/12709#issuecomment-4190254028
@theirix Thank you for the fix, but `Binary || Binary` still evaluates to
`Utf8`, which does not work if they are not valid UTF-8 strings and does not
match PostgreSQL's behavior:
```console
$ datafusion-cli
> select arrow_typeof(x'31' || x'32');
+--------------------------------------------+
| arrow_typeof(Binary("49") || Binary("50")) |
+--------------------------------------------+
| Utf8 |
+--------------------------------------------+
1 row(s) fetched.
Elapsed 0.003 seconds.
> select x'ff' || x'af';
Optimizer rule 'simplify_expressions' failed
caused by
Arrow error: Invalid argument error: Encountered non UTF-8 data: invalid
utf-8 sequence of 1 bytes from index 0
```
```console
$ psql
postgres=# select decode('31', 'hex') || decode('32', 'hex');
?column?
----------
\x3132
(1 row)
postgres=# select decode('ff', 'hex') || decode('af', 'hex');
?column?
----------
\xffaf
(1 row)
```
--
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]