check alter sql and syntax (#156)

* check and update abort and alter sql

* delete superfluous space

* update grammar lib after change alter parser

* update alter parser to be compatible

---------

Co-authored-by: zhaoge <>
This commit is contained in:
XCynthia
2023-09-06 11:46:46 +08:00
committed by GitHub
parent ded9f28e36
commit 6dad62ddf4
17 changed files with 12348 additions and 11838 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT
// Generated from /Users/xuxiaoqi/Documents/dt-sql-parser-copy/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT
import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
@ -11,6 +11,7 @@ import { VectorizationOnlyContext } from "./HiveSqlParser";
import { VectorizatonDetailContext } from "./HiveSqlParser";
import { ExecStatementContext } from "./HiveSqlParser";
import { LoadStatementContext } from "./HiveSqlParser";
import { DropPartitionsIgnoreClauseContext } from "./HiveSqlParser";
import { ReplicationClauseContext } from "./HiveSqlParser";
import { ExportStatementContext } from "./HiveSqlParser";
import { ImportStatementContext } from "./HiveSqlParser";
@ -77,6 +78,7 @@ import { PrivlegeDefContext } from "./HiveSqlParser";
import { PrivilegeTypeContext } from "./HiveSqlParser";
import { PrincipalSpecificationContext } from "./HiveSqlParser";
import { PrincipalNameContext } from "./HiveSqlParser";
import { PrincipalAlterNameContext } from "./HiveSqlParser";
import { WithGrantOptionContext } from "./HiveSqlParser";
import { GrantOptionForContext } from "./HiveSqlParser";
import { AdminOptionForContext } from "./HiveSqlParser";
@ -268,6 +270,7 @@ import { AlterStatementSuffixTouchContext } from "./HiveSqlParser";
import { AlterStatementSuffixArchiveContext } from "./HiveSqlParser";
import { AlterStatementSuffixUnArchiveContext } from "./HiveSqlParser";
import { PartitionLocationContext } from "./HiveSqlParser";
import { AlterStatementSuffixRecoverPartitionsContext } from "./HiveSqlParser";
import { AlterStatementSuffixDropPartitionsContext } from "./HiveSqlParser";
import { AlterStatementSuffixPropertiesContext } from "./HiveSqlParser";
import { AlterViewSuffixPropertiesContext } from "./HiveSqlParser";
@ -609,6 +612,17 @@ export interface HiveSqlParserListener extends ParseTreeListener {
*/
exitLoadStatement?: (ctx: LoadStatementContext) => void;
/**
* Enter a parse tree produced by `HiveSqlParser.dropPartitionsIgnoreClause`.
* @param ctx the parse tree
*/
enterDropPartitionsIgnoreClause?: (ctx: DropPartitionsIgnoreClauseContext) => void;
/**
* Exit a parse tree produced by `HiveSqlParser.dropPartitionsIgnoreClause`.
* @param ctx the parse tree
*/
exitDropPartitionsIgnoreClause?: (ctx: DropPartitionsIgnoreClauseContext) => void;
/**
* Enter a parse tree produced by `HiveSqlParser.replicationClause`.
* @param ctx the parse tree
@ -1335,6 +1349,17 @@ export interface HiveSqlParserListener extends ParseTreeListener {
*/
exitPrincipalName?: (ctx: PrincipalNameContext) => void;
/**
* Enter a parse tree produced by `HiveSqlParser.principalAlterName`.
* @param ctx the parse tree
*/
enterPrincipalAlterName?: (ctx: PrincipalAlterNameContext) => void;
/**
* Exit a parse tree produced by `HiveSqlParser.principalAlterName`.
* @param ctx the parse tree
*/
exitPrincipalAlterName?: (ctx: PrincipalAlterNameContext) => void;
/**
* Enter a parse tree produced by `HiveSqlParser.withGrantOption`.
* @param ctx the parse tree
@ -3436,6 +3461,17 @@ export interface HiveSqlParserListener extends ParseTreeListener {
*/
exitPartitionLocation?: (ctx: PartitionLocationContext) => void;
/**
* Enter a parse tree produced by `HiveSqlParser.alterStatementSuffixRecoverPartitions`.
* @param ctx the parse tree
*/
enterAlterStatementSuffixRecoverPartitions?: (ctx: AlterStatementSuffixRecoverPartitionsContext) => void;
/**
* Exit a parse tree produced by `HiveSqlParser.alterStatementSuffixRecoverPartitions`.
* @param ctx the parse tree
*/
exitAlterStatementSuffixRecoverPartitions?: (ctx: AlterStatementSuffixRecoverPartitionsContext) => void;
/**
* Enter a parse tree produced by `HiveSqlParser.alterStatementSuffixDropPartitions`.
* @param ctx the parse tree

View File

@ -1,4 +1,4 @@
// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT
// Generated from /Users/xuxiaoqi/Documents/dt-sql-parser-copy/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT
import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
@ -11,6 +11,7 @@ import { VectorizationOnlyContext } from "./HiveSqlParser";
import { VectorizatonDetailContext } from "./HiveSqlParser";
import { ExecStatementContext } from "./HiveSqlParser";
import { LoadStatementContext } from "./HiveSqlParser";
import { DropPartitionsIgnoreClauseContext } from "./HiveSqlParser";
import { ReplicationClauseContext } from "./HiveSqlParser";
import { ExportStatementContext } from "./HiveSqlParser";
import { ImportStatementContext } from "./HiveSqlParser";
@ -77,6 +78,7 @@ import { PrivlegeDefContext } from "./HiveSqlParser";
import { PrivilegeTypeContext } from "./HiveSqlParser";
import { PrincipalSpecificationContext } from "./HiveSqlParser";
import { PrincipalNameContext } from "./HiveSqlParser";
import { PrincipalAlterNameContext } from "./HiveSqlParser";
import { WithGrantOptionContext } from "./HiveSqlParser";
import { GrantOptionForContext } from "./HiveSqlParser";
import { AdminOptionForContext } from "./HiveSqlParser";
@ -268,6 +270,7 @@ import { AlterStatementSuffixTouchContext } from "./HiveSqlParser";
import { AlterStatementSuffixArchiveContext } from "./HiveSqlParser";
import { AlterStatementSuffixUnArchiveContext } from "./HiveSqlParser";
import { PartitionLocationContext } from "./HiveSqlParser";
import { AlterStatementSuffixRecoverPartitionsContext } from "./HiveSqlParser";
import { AlterStatementSuffixDropPartitionsContext } from "./HiveSqlParser";
import { AlterStatementSuffixPropertiesContext } from "./HiveSqlParser";
import { AlterViewSuffixPropertiesContext } from "./HiveSqlParser";
@ -580,6 +583,13 @@ export interface HiveSqlParserVisitor<Result> extends ParseTreeVisitor<Result> {
*/
visitLoadStatement?: (ctx: LoadStatementContext) => Result;
/**
* Visit a parse tree produced by `HiveSqlParser.dropPartitionsIgnoreClause`.
* @param ctx the parse tree
* @return the visitor result
*/
visitDropPartitionsIgnoreClause?: (ctx: DropPartitionsIgnoreClauseContext) => Result;
/**
* Visit a parse tree produced by `HiveSqlParser.replicationClause`.
* @param ctx the parse tree
@ -1042,6 +1052,13 @@ export interface HiveSqlParserVisitor<Result> extends ParseTreeVisitor<Result> {
*/
visitPrincipalName?: (ctx: PrincipalNameContext) => Result;
/**
* Visit a parse tree produced by `HiveSqlParser.principalAlterName`.
* @param ctx the parse tree
* @return the visitor result
*/
visitPrincipalAlterName?: (ctx: PrincipalAlterNameContext) => Result;
/**
* Visit a parse tree produced by `HiveSqlParser.withGrantOption`.
* @param ctx the parse tree
@ -2379,6 +2396,13 @@ export interface HiveSqlParserVisitor<Result> extends ParseTreeVisitor<Result> {
*/
visitPartitionLocation?: (ctx: PartitionLocationContext) => Result;
/**
* Visit a parse tree produced by `HiveSqlParser.alterStatementSuffixRecoverPartitions`.
* @param ctx the parse tree
* @return the visitor result
*/
visitAlterStatementSuffixRecoverPartitions?: (ctx: AlterStatementSuffixRecoverPartitionsContext) => Result;
/**
* Visit a parse tree produced by `HiveSqlParser.alterStatementSuffixDropPartitions`.
* @param ctx the parse tree