[
https://issues.apache.org/jira/browse/FLINK-24803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753094#comment-17753094
]
Xin Chen edited comment on FLINK-24803 at 8/11/23 8:22 AM:
-----------------------------------------------------------
[~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:
!image-2023-08-11-16-21-20-773.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... |
|
+----+--------------------------------+--------------------------------+--------------------------------+
*Why Not*:
+----+--------------------------------+--------------------------------+--------------------------------+
| op | image | url |
errorCode |
+----+--------------------------------+--------------------------------+--------------------------------+
| +I | [49,10] | http://10.31.10.14:11180/te... |
|
+----+--------------------------------+--------------------------------+--------------------------------+
I this this is wrong, not expected...
Wish help!
was (Author: JIRAUSER298666):
[~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:
!image-2023-08-11-16-21-20-773.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
>
> Attachments: image-2023-08-11-16-21-20-773.png
>
>
> 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)