matriv commented on pull request #18221:
URL: https://github.com/apache/flink/pull/18221#issuecomment-1008678390


   Postgres uses a hexademical representation:
   ```
   postgres=# select '\000\001\034\127'::bytea::varchar(20);
     varchar   
   ------------
    \x00011c57
   (1 row)
   ```
   
   MySQL seems to follow the approach of this PR:
   ```
   SELECT CAST(CAST('\000\001\034\127' AS BINARY(10)) AS CHAR(20))
   =>
   CAST(CAST('\000\001\034\127' AS BINARY(10)) AS CHAR(20))
   --
   0001341
   ```
   
   For spark: 
https://stackoverflow.com/questions/45471823/how-do-i-convert-binary-string-to-scala-string-in-spark-scala
   
   For databricks I found this: 
https://docs.databricks.com/sql/language-manual/data-types/binary-type.html 
(hex representation)
   
   
   
   
   
   


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