wuchong commented on pull request #18221:
URL: https://github.com/apache/flink/pull/18221#issuecomment-1009561036
I tried to run `SELECT CAST(CAST(x'68656C6C6F20636F6465' AS BINARY(10)) AS
CHAR(10))` in mysql, but it returns `hello code` instead of hex result. Maybe
we can follow the Postgres way, PG has a configuration `bytea_output` to
control the output format.
```sql
pg> SET bytea_output = 'hex';
pg> SELECT CAST(CAST('\x68656C6C6F20636F6465' AS bytea) AS CHAR(10));
\x68656c6c
pg> SET bytea_output = 'escape';
pg> SELECT CAST(CAST('\x68656C6C6F20636F6465' AS bytea) AS CHAR(10));
hello code
```
Flink can introduce such configuration with default `escape` to keep
compatibility.
--
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]