跳过导航链接

程序包 org.apache.flink.sql.parser

Flink sql parser.

请参阅: 说明

程序包org.apache.flink.sql.parser的说明

Flink sql parser.

This module contains the DDLs and some custom DMLs for Apache Flink.

Most of the sql grammars belong to sql standard or Flink's dialect. To support a new sql dialect, add a new sql conformance to FlinkSqlConformance, then use this sql conformance to make context aware decisions in parse block. See the usage of FlinkSqlConformance.HIVE in parserImpls.ftl.

To use a specific sql dialect for the parser, config the parser to the specific sql conformance with a code snippet like below:

   SqlParser.create(source,
                SqlParser.config()
                        .withParserFactory(parserImplFactory())
                                .withQuoting(Quoting.DOUBLE_QUOTE)
                                .withUnquotedCasing(Casing.TO_UPPER)
                                .withQuotedCasing(Casing.UNCHANGED)
                                .withConformance(conformance0); // the sql conformance you want use.
 
跳过导航链接

Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.