You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Johannes Moser (Jira)" <ji...@apache.org> on 2021/06/01 10:03:00 UTC

[jira] [Closed] (FLINK-22817) About flink1.13 hive integration Kafka SQL

     [ https://issues.apache.org/jira/browse/FLINK-22817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johannes Moser closed FLINK-22817.
----------------------------------
    Resolution: Invalid

> About flink1.13 hive integration Kafka SQL 
> -------------------------------------------
>
>                 Key: FLINK-22817
>                 URL: https://issues.apache.org/jira/browse/FLINK-22817
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table SQL / Planner
>    Affects Versions: 1.13.1
>         Environment: flink: 1.13.1
> flink calcite: 1.26.1
>  
> kafka-eagle: 2.0.5
> kafka-eagle calcite 1.21.0
>            Reporter: xingyuan cheng
>            Priority: Major
>         Attachments: hive-2021-06-01-2.png, hive-2021-06-01-3.png, hive-2021-06-01.png
>
>
> Hello everyone
> At present, there are codes that depend on hive in many places of the parsed functions and tables. The functions and tables of hive in individual dialects need to be parsed according to the part of flink, so try the analysis method based on flink SPI, which is compatible with kafka's DDL DML
>  
> I observe the community’s proposal
>  Flip-152: [https://cwiki.apache.org/confluence/display/FLINK/FLIP-152%3A+Hive+Query+Syntax+Compatibility]
>  We can know that
> ```
> CREATE CATALOG myhive WITH (
>  'Type' ='hive',
>  'Default-database' ='default',
>  'Hive-conf-dir' ='/data/hive/conf/'
>  );
> To
> USE CATALOG myhive;
> Set table.sql-dialect=hive;
> ```
> When specifying the sql-dialect type, it will follow the SPI from the configuration file
> The org.apache.flink.table.factories.TableFactory file under flink-connector-hive is assigned to HiveParserFactory to parse the corresponding grammar, and HiveParser is the corresponding grammar parser
> And perform grammatical analysis in HiveParserFactory#create
> During the course of investigating kafka-eagle, I found
> Among them, KSQL is also based on calcite for grammatical analysis, and can support DDL and DML of kafka tables
> Test-related classes are in: KSqlParser#TestKSqlParser
> And completed the analysis of the corresponding grammar in KsqlParser#parseQueryKSql
> Does the community have any good suggestions for this proposal?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)