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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Shang Yuanchun (Jira)
xingyuan cheng created FLINK-22817:
--------------------------------------

             Summary: 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
         Attachments: hive-2021-06-01-2.png, hive-2021-06-01-3.png, hive-2021-06-01.png

hello, 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)