??????flink 1.12.0??????????????
------------------ ???????? ------------------
??????:
"user-zh"
<[email protected]>;
????????: 2021??7??26??(??????) ????4:43
??????: "user-zh"<[email protected]>;
????: Re: flink 1.13.1 sql hive is_generic = false ??????????????????????
??????
????????????????hive dialect????????
On Mon, Jul 26, 2021 at 2:44 PM Asahi Lee <[email protected]> wrote:
> hi!
> ??????flink
1.13.1??????????sql????hive????????????????????????????????????????????????????????????
> ??????????hive 2.3.6??????????flink-sql-connector-hive-2.3.6????????
>
>
> package com.meritdata.cloud.flink.test;
>
>
> import org.apache.flink.table.api.EnvironmentSettings;
> import org.apache.flink.table.api.TableEnvironment;
>
>
> public class Test {
>
>
> &nbsp; &nbsp; public static void main(String[] args) {
>
>
> &nbsp; &nbsp; &nbsp; &nbsp; EnvironmentSettings bbSettings
=
> EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build();
> &nbsp; &nbsp; &nbsp; &nbsp; TableEnvironment
tableEnvironment =
> TableEnvironment.create(bbSettings);
>
>
> &nbsp; &nbsp; &nbsp; &nbsp;
tableEnvironment.executeSql("create catalog
> myhive with (" +
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; " 'type' = 'hive',
> " +
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; "
> 'default-database' = 'default', " +
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; ")");
>
>
> &nbsp; &nbsp; &nbsp; &nbsp;
tableEnvironment.executeSql("use catalog
> myhive");
> &nbsp; &nbsp; &nbsp; &nbsp;
tableEnvironment.executeSql("create table if
> not exists q1 " +
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; "( id string ) " +
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; "with
> ('is_generic' = 'false')");
>
>
> &nbsp; &nbsp; &nbsp; &nbsp; /**
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
hive????????????????????, ????????
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* desc formatted q1;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* col_name&nbsp;
&nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; data_type&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;
> &nbsp;comment
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Table Parameters:
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
flink.is_generic&nbsp; &nbsp; false
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
flink.schema.0.data-type&nbsp;
> VARCHAR(2147483647)
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
flink.schema.0.name&nbsp; &nbsp;id
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
transient_lastDdTime 1627279802
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
>
>
> &nbsp; &nbsp; }
>
>
>
>
> }
--
Best regards!
Rui Li