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

luoyuxia edited comment on FLINK-27304 at 4/25/22 2:10 AM:
-----------------------------------------------------------

[~tartarus] Thanks for reporting it. The reason is that binary will be 
converted into Flink's Bytes type which is VARBINARY,  then it will mapping to 
Calcite's VARBINARY. But when convert it to Hive's data type, the  VARBINARY 
will converted to Hive's voidType which isnot supported in Flink. So the 
excpetion is thrown. We're expected to VARBINARY to Hive's binary type.

I wll open a pr to fix it.


was (Author: luoyuxia):
[~tartarus] Thanks for reporting it. The reason is that binary will be 
converted into Flink's Bytes type which is VARBINARY, but there's no such 
VARBINARY type in Hive so it'll be fall back to void type. So the excpetion is 
thrown.

I wll open a pr to fix it.

> Flink doesn't support Hive primitive type void yet
> --------------------------------------------------
>
>                 Key: FLINK-27304
>                 URL: https://issues.apache.org/jira/browse/FLINK-27304
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Connectors / Hive
>    Affects Versions: 1.13.1, 1.15.0
>            Reporter: tartarus
>            Priority: Major
>              Labels: pull-request-available
>
> We can reproduce through a UT
> Add test case in HiveDialectITCase
> {code:java}
>     @Test
>     public void testHiveVoidType() {
>         tableEnv.loadModule("hive", new 
> HiveModule(hiveCatalog.getHiveVersion()));
>         tableEnv.executeSql(
>                 "create table src (a int, b string, c int, sample 
> array<binary>)");
>         tableEnv.executeSql("select a, one from src lateral view 
> explode(sample) samples as one where a > 0 ");
>     } {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to