Optimize/auto complete (#178)
* feat: optimize hive function name auto complete * feat: optimize flink rules that c3 prefer to * feat: optimize flink autoComplete * test: flink auto complete unit tests
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -169,6 +169,7 @@ import { PredicateContext } from "./FlinkSqlParser";
|
||||
import { LikePredicateContext } from "./FlinkSqlParser";
|
||||
import { ValueExpressionContext } from "./FlinkSqlParser";
|
||||
import { PrimaryExpressionContext } from "./FlinkSqlParser";
|
||||
import { FunctionNameCreateContext } from "./FlinkSqlParser";
|
||||
import { FunctionNameContext } from "./FlinkSqlParser";
|
||||
import { FunctionParamContext } from "./FlinkSqlParser";
|
||||
import { DereferenceDefinitionContext } from "./FlinkSqlParser";
|
||||
@ -191,10 +192,13 @@ import { UnquotedIdentifierContext } from "./FlinkSqlParser";
|
||||
import { QuotedIdentifierContext } from "./FlinkSqlParser";
|
||||
import { WhenClauseContext } from "./FlinkSqlParser";
|
||||
import { CatalogPathContext } from "./FlinkSqlParser";
|
||||
import { CatalogPathCreateContext } from "./FlinkSqlParser";
|
||||
import { DatabasePathContext } from "./FlinkSqlParser";
|
||||
import { DatabasePathCreateContext } from "./FlinkSqlParser";
|
||||
import { TablePathCreateContext } from "./FlinkSqlParser";
|
||||
import { TablePathContext } from "./FlinkSqlParser";
|
||||
import { ViewPathContext } from "./FlinkSqlParser";
|
||||
import { ViewPathCreateContext } from "./FlinkSqlParser";
|
||||
import { UidContext } from "./FlinkSqlParser";
|
||||
import { WithOptionContext } from "./FlinkSqlParser";
|
||||
import { IfNotExistsContext } from "./FlinkSqlParser";
|
||||
@ -2115,6 +2119,17 @@ export interface FlinkSqlParserListener extends ParseTreeListener {
|
||||
*/
|
||||
exitPrimaryExpression?: (ctx: PrimaryExpressionContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.functionNameCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterFunctionNameCreate?: (ctx: FunctionNameCreateContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `FlinkSqlParser.functionNameCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitFunctionNameCreate?: (ctx: FunctionNameCreateContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.functionName`.
|
||||
* @param ctx the parse tree
|
||||
@ -2357,6 +2372,17 @@ export interface FlinkSqlParserListener extends ParseTreeListener {
|
||||
*/
|
||||
exitCatalogPath?: (ctx: CatalogPathContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.catalogPathCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterCatalogPathCreate?: (ctx: CatalogPathCreateContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `FlinkSqlParser.catalogPathCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitCatalogPathCreate?: (ctx: CatalogPathCreateContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.databasePath`.
|
||||
* @param ctx the parse tree
|
||||
@ -2401,6 +2427,28 @@ export interface FlinkSqlParserListener extends ParseTreeListener {
|
||||
*/
|
||||
exitTablePath?: (ctx: TablePathContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.viewPath`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterViewPath?: (ctx: ViewPathContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `FlinkSqlParser.viewPath`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitViewPath?: (ctx: ViewPathContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.viewPathCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterViewPathCreate?: (ctx: ViewPathCreateContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `FlinkSqlParser.viewPathCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitViewPathCreate?: (ctx: ViewPathCreateContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `FlinkSqlParser.uid`.
|
||||
* @param ctx the parse tree
|
||||
|
@ -169,6 +169,7 @@ import { PredicateContext } from "./FlinkSqlParser";
|
||||
import { LikePredicateContext } from "./FlinkSqlParser";
|
||||
import { ValueExpressionContext } from "./FlinkSqlParser";
|
||||
import { PrimaryExpressionContext } from "./FlinkSqlParser";
|
||||
import { FunctionNameCreateContext } from "./FlinkSqlParser";
|
||||
import { FunctionNameContext } from "./FlinkSqlParser";
|
||||
import { FunctionParamContext } from "./FlinkSqlParser";
|
||||
import { DereferenceDefinitionContext } from "./FlinkSqlParser";
|
||||
@ -191,10 +192,13 @@ import { UnquotedIdentifierContext } from "./FlinkSqlParser";
|
||||
import { QuotedIdentifierContext } from "./FlinkSqlParser";
|
||||
import { WhenClauseContext } from "./FlinkSqlParser";
|
||||
import { CatalogPathContext } from "./FlinkSqlParser";
|
||||
import { CatalogPathCreateContext } from "./FlinkSqlParser";
|
||||
import { DatabasePathContext } from "./FlinkSqlParser";
|
||||
import { DatabasePathCreateContext } from "./FlinkSqlParser";
|
||||
import { TablePathCreateContext } from "./FlinkSqlParser";
|
||||
import { TablePathContext } from "./FlinkSqlParser";
|
||||
import { ViewPathContext } from "./FlinkSqlParser";
|
||||
import { ViewPathCreateContext } from "./FlinkSqlParser";
|
||||
import { UidContext } from "./FlinkSqlParser";
|
||||
import { WithOptionContext } from "./FlinkSqlParser";
|
||||
import { IfNotExistsContext } from "./FlinkSqlParser";
|
||||
@ -1423,6 +1427,13 @@ export interface FlinkSqlParserVisitor<Result> extends ParseTreeVisitor<Result>
|
||||
*/
|
||||
visitPrimaryExpression?: (ctx: PrimaryExpressionContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.functionNameCreate`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitFunctionNameCreate?: (ctx: FunctionNameCreateContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.functionName`.
|
||||
* @param ctx the parse tree
|
||||
@ -1577,6 +1588,13 @@ export interface FlinkSqlParserVisitor<Result> extends ParseTreeVisitor<Result>
|
||||
*/
|
||||
visitCatalogPath?: (ctx: CatalogPathContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.catalogPathCreate`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitCatalogPathCreate?: (ctx: CatalogPathCreateContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.databasePath`.
|
||||
* @param ctx the parse tree
|
||||
@ -1605,6 +1623,20 @@ export interface FlinkSqlParserVisitor<Result> extends ParseTreeVisitor<Result>
|
||||
*/
|
||||
visitTablePath?: (ctx: TablePathContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.viewPath`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitViewPath?: (ctx: ViewPathContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.viewPathCreate`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitViewPathCreate?: (ctx: ViewPathCreateContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `FlinkSqlParser.uid`.
|
||||
* @param ctx the parse tree
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -393,10 +393,11 @@ import { SortByClauseContext } from "./HiveSqlParser";
|
||||
import { TrimFunctionContext } from "./HiveSqlParser";
|
||||
import { Function_Context } from "./HiveSqlParser";
|
||||
import { Null_treatmentContext } from "./HiveSqlParser";
|
||||
import { FunctionNameCreateContext } from "./HiveSqlParser";
|
||||
import { FunctionNameForDDLContext } from "./HiveSqlParser";
|
||||
import { FunctionNameForInvokeContext } from "./HiveSqlParser";
|
||||
import { UserDefinedFuncNameContext } from "./HiveSqlParser";
|
||||
import { FunctionNameCreateContext } from "./HiveSqlParser";
|
||||
import { InternalFunctionNameContext } from "./HiveSqlParser";
|
||||
import { CastExpressionContext } from "./HiveSqlParser";
|
||||
import { CaseExpressionContext } from "./HiveSqlParser";
|
||||
import { WhenExpressionContext } from "./HiveSqlParser";
|
||||
@ -4820,6 +4821,17 @@ export interface HiveSqlParserListener extends ParseTreeListener {
|
||||
*/
|
||||
exitNull_treatment?: (ctx: Null_treatmentContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `HiveSqlParser.functionNameCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterFunctionNameCreate?: (ctx: FunctionNameCreateContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `HiveSqlParser.functionNameCreate`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitFunctionNameCreate?: (ctx: FunctionNameCreateContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `HiveSqlParser.functionNameForDDL`.
|
||||
* @param ctx the parse tree
|
||||
@ -4854,15 +4866,15 @@ export interface HiveSqlParserListener extends ParseTreeListener {
|
||||
exitUserDefinedFuncName?: (ctx: UserDefinedFuncNameContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `HiveSqlParser.functionNameCreate`.
|
||||
* Enter a parse tree produced by `HiveSqlParser.internalFunctionName`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterFunctionNameCreate?: (ctx: FunctionNameCreateContext) => void;
|
||||
enterInternalFunctionName?: (ctx: InternalFunctionNameContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `HiveSqlParser.functionNameCreate`.
|
||||
* Exit a parse tree produced by `HiveSqlParser.internalFunctionName`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitFunctionNameCreate?: (ctx: FunctionNameCreateContext) => void;
|
||||
exitInternalFunctionName?: (ctx: InternalFunctionNameContext) => void;
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by `HiveSqlParser.castExpression`.
|
||||
|
@ -393,10 +393,11 @@ import { SortByClauseContext } from "./HiveSqlParser";
|
||||
import { TrimFunctionContext } from "./HiveSqlParser";
|
||||
import { Function_Context } from "./HiveSqlParser";
|
||||
import { Null_treatmentContext } from "./HiveSqlParser";
|
||||
import { FunctionNameCreateContext } from "./HiveSqlParser";
|
||||
import { FunctionNameForDDLContext } from "./HiveSqlParser";
|
||||
import { FunctionNameForInvokeContext } from "./HiveSqlParser";
|
||||
import { UserDefinedFuncNameContext } from "./HiveSqlParser";
|
||||
import { FunctionNameCreateContext } from "./HiveSqlParser";
|
||||
import { InternalFunctionNameContext } from "./HiveSqlParser";
|
||||
import { CastExpressionContext } from "./HiveSqlParser";
|
||||
import { CaseExpressionContext } from "./HiveSqlParser";
|
||||
import { WhenExpressionContext } from "./HiveSqlParser";
|
||||
@ -3263,6 +3264,13 @@ export interface HiveSqlParserVisitor<Result> extends ParseTreeVisitor<Result> {
|
||||
*/
|
||||
visitNull_treatment?: (ctx: Null_treatmentContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `HiveSqlParser.functionNameCreate`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitFunctionNameCreate?: (ctx: FunctionNameCreateContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `HiveSqlParser.functionNameForDDL`.
|
||||
* @param ctx the parse tree
|
||||
@ -3285,11 +3293,11 @@ export interface HiveSqlParserVisitor<Result> extends ParseTreeVisitor<Result> {
|
||||
visitUserDefinedFuncName?: (ctx: UserDefinedFuncNameContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `HiveSqlParser.functionNameCreate`.
|
||||
* Visit a parse tree produced by `HiveSqlParser.internalFunctionName`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitFunctionNameCreate?: (ctx: FunctionNameCreateContext) => Result;
|
||||
visitInternalFunctionName?: (ctx: InternalFunctionNameContext) => Result;
|
||||
|
||||
/**
|
||||
* Visit a parse tree produced by `HiveSqlParser.castExpression`.
|
||||
|
Reference in New Issue
Block a user