[ 
https://issues.apache.org/jira/browse/FLINK-24803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753094#comment-17753094
 ] 

Xin Chen commented on FLINK-24803:
----------------------------------

[~matriv] [~shenzhu0127] [~twalthr]
So,I met a question about the RowData to cast. When I get an byte array and to 
print, it shows the HEX data. Of course it is not what I want.  In the source 
Code like following:
 !screenshot-1.png! 

so the sql like following:

{code:java}
String s1 = "select image, url, errorCode from"
//                + " image_source where url = 
'http://1.1.1.1:11111/flink.jpg'";
tableEnv.executeSql("s1").print();
{code}

Get the results;
+----+--------------------------------+--------------------------------+--------------------------------+
| op |                          image |                            url |        
              errorCode |
+----+--------------------------------+--------------------------------+--------------------------------+
| +I |                        x'310a' | http://10.31.10.14:11180/te... |        
                        |
+----+--------------------------------+--------------------------------+--------------------------------+

Not
+----+--------------------------------+--------------------------------+--------------------------------+
| op |                          image |                            url |        
              errorCode |
+----+--------------------------------+--------------------------------+--------------------------------+
| +I |                        [49,10] | http://10.31.10.14:11180/te... |        
                        |
+----+--------------------------------+--------------------------------+--------------------------------+
I this this is wrong, not expected...

Wish help!

> Fix cast BINARY/VARBINARY to STRING
> -----------------------------------
>
>                 Key: FLINK-24803
>                 URL: https://issues.apache.org/jira/browse/FLINK-24803
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Planner
>            Reporter: Timo Walther
>            Assignee: Marios Trivyzas
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.15.0
>
>
> BINARY/VARBINARY should be printed as regular arrays instead of interpreting 
> them in an arbitrary character set as a string.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to