This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new a2753b65e [Spark]: Remove useless spark grammar MIGRATE commands
(#2847)
a2753b65e is described below
commit a2753b65e2053087496dff26282b80ff47470867
Author: baiyangtx <[email protected]>
AuthorDate: Mon May 20 11:41:35 2024 +0800
[Spark]: Remove useless spark grammar MIGRATE commands (#2847)
* remove migrate command in spark3.2
* remove migrate command in spark3.3
---
.../amoro/spark/sql/parser/ArcticSqlCommand.g4 | 131 -----
.../sql/parser/ArcticSqlCommandBaseListener.java | 159 ------
.../sql/parser/ArcticSqlCommandBaseVisitor.java | 84 ---
.../spark/sql/parser/ArcticSqlCommandLexer.java | 194 -------
.../spark/sql/parser/ArcticSqlCommandListener.java | 120 ----
.../spark/sql/parser/ArcticSqlCommandParser.java | 635 ---------------------
.../spark/sql/parser/ArcticSqlCommandVisitor.java | 78 ---
.../catalyst/parser/ArcticCommandAstParser.java | 53 --
.../parser/ArcticSqlExtensionsParser.scala | 20 +-
.../test/suites/sql/TestArcticCommandSQL.java | 67 ---
.../sql/parser/ArcticSqlCommandBaseListener.java | 159 ------
.../sql/parser/ArcticSqlCommandBaseVisitor.java | 84 ---
.../spark/sql/parser/ArcticSqlCommandLexer.java | 194 -------
.../spark/sql/parser/ArcticSqlCommandListener.java | 120 ----
.../spark/sql/parser/ArcticSqlCommandParser.java | 635 ---------------------
.../spark/sql/parser/ArcticSqlCommandVisitor.java | 78 ---
.../catalyst/parser/ArcticCommandAstParser.java | 54 --
.../parser/ArcticSqlExtensionsParser.scala | 20 +-
.../test/suites/sql/TestArcticCommandSQL.java | 67 ---
19 files changed, 6 insertions(+), 2946 deletions(-)
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/antlr4/org/apache/amoro/spark/sql/parser/ArcticSqlCommand.g4
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/antlr4/org/apache/amoro/spark/sql/parser/ArcticSqlCommand.g4
deleted file mode 100644
index c1f020d56..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/antlr4/org/apache/amoro/spark/sql/parser/ArcticSqlCommand.g4
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * The parser file is forked from spark 3.2.0's SqlBase.g4
- */
-
-grammar ArcticSqlCommand;
-
-arcticCommand
- : arcticStatement
- ;
-
-arcticStatement
- : MIGRATE source=multipartIdentifier TO ARCTIC target=multipartIdentifier
#migrateStatement
- ;
-
-multipartIdentifier
- : parts+=errorCapturingIdentifier ('.' parts+=errorCapturingIdentifier)*
- ;
-
-// this rule is used for explicitly capturing wrong identifiers such as
test-table, which should actually be `test-table`
-// replace identifier with errorCapturingIdentifier where the immediate follow
symbol is not an expression, otherwise
-// valid expressions such as "a-b" can be recognized as an identifier
-errorCapturingIdentifier
- : identifier errorCapturingIdentifierExtra
- ;
-
-// extra left-factoring grammar
-errorCapturingIdentifierExtra
- : (MINUS identifier)+ #errorIdent
- | #realIdent
- ;
-
-identifier
- : strictIdentifier
- ;
-
-strictIdentifier
- : IDENTIFIER #unquotedIdentifier
- | quotedIdentifier #quotedIdentifierAlternative
- ;
-
-quotedIdentifier
- : BACKQUOTED_IDENTIFIER
- ;
-
-// NOTE: If you add a new token in the list below, you should update the list
of keywords
-// and reserved tag in `docs/sql-ref-ansi-compliance.md#sql-keywords`.
-
-//============================
-// Start of the keywords list
-//============================
-//--SPARK-KEYWORD-LIST-START
-MIGRATE: 'MIGRATE';
-ARCTIC: 'ARCTIC' ;
-TO: 'TO' ;
-
-
-EQ : '=' | '==';
-NSEQ: '<=>';
-NEQ : '<>';
-NEQJ: '!=';
-LT : '<';
-LTE : '<=' | '!>';
-GT : '>';
-GTE : '>=' | '!<';
-
-PLUS: '+';
-MINUS: '-';
-ASTERISK: '*';
-SLASH: '/';
-PERCENT: '%';
-TILDE: '~';
-AMPERSAND: '&';
-PIPE: '|';
-CONCAT_PIPE: '||';
-HAT: '^';
-
-STRING
- : '\'' ( ~('\''|'\\') | ('\\' .) )* '\''
- | '"' ( ~('"'|'\\') | ('\\' .) )* '"'
- ;
-
-IDENTIFIER
- : (LETTER | DIGIT | '_')+
- ;
-
-BACKQUOTED_IDENTIFIER
- : '`' ( ~'`' | '``' )* '`'
- ;
-
-fragment DECIMAL_DIGITS
- : DIGIT+ '.' DIGIT*
- | '.' DIGIT+
- ;
-
-fragment EXPONENT
- : 'E' [+-]? DIGIT+
- ;
-
-fragment DIGIT
- : [0-9]
- ;
-
-fragment LETTER
- : [A-Z]
- ;
-
-
-
-// Catch-all for anything we can't recognize.
-// We use this to be able to ignore and recover all the text
-// when splitting statements with DelimiterLexer
-UNRECOGNIZED
- : .
- ;
-
-
-
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseListener.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseListener.java
deleted file mode 100644
index 6d5931b6b..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseListener.java
+++ /dev/null
@@ -1,159 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.tree.ErrorNode;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
-/**
- * This class provides an empty implementation of {@link
ArcticSqlCommandListener},
- * which can be extended to create a listener which only needs to handle a
subset
- * of the available methods.
- */
-public class ArcticSqlCommandBaseListener implements ArcticSqlCommandListener {
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx)
{ }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx)
{ }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterRealIdent(ArcticSqlCommandParser.RealIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterIdentifier(ArcticSqlCommandParser.IdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx) {
}
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx) { }
-
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void enterEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void exitEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void visitTerminal(TerminalNode node) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void visitErrorNode(ErrorNode node) { }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseVisitor.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseVisitor.java
deleted file mode 100644
index 21e126447..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseVisitor.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
-
-/**
- * This class provides an empty implementation of {@link
ArcticSqlCommandVisitor},
- * which can be extended to create a visitor which only needs to handle a
subset
- * of the available methods.
- *
- * @param <T> The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-public class ArcticSqlCommandBaseVisitor<T> extends
AbstractParseTreeVisitor<T> implements ArcticSqlCommandVisitor<T> {
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) {
return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx)
{ return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx) {
return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx) {
return visitChildren(ctx); }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandLexer.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandLexer.java
deleted file mode 100644
index ea3791127..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandLexer.java
+++ /dev/null
@@ -1,194 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.*;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class ArcticSqlCommandLexer extends Lexer {
- static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, MIGRATE=2, ARCTIC=3, TO=4, EQ=5, NSEQ=6, NEQ=7, NEQJ=8,
LT=9,
- LTE=10, GT=11, GTE=12, PLUS=13, MINUS=14, ASTERISK=15,
SLASH=16, PERCENT=17,
- TILDE=18, AMPERSAND=19, PIPE=20, CONCAT_PIPE=21, HAT=22,
STRING=23, IDENTIFIER=24,
- BACKQUOTED_IDENTIFIER=25, UNRECOGNIZED=26;
- public static String[] channelNames = {
- "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
- };
-
- public static String[] modeNames = {
- "DEFAULT_MODE"
- };
-
- private static String[] makeRuleNames() {
- return new String[] {
- "T__0", "MIGRATE", "ARCTIC", "TO", "EQ", "NSEQ", "NEQ",
"NEQJ", "LT",
- "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK",
"SLASH", "PERCENT",
- "TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE", "HAT",
"STRING", "IDENTIFIER",
- "BACKQUOTED_IDENTIFIER", "DECIMAL_DIGITS", "EXPONENT",
"DIGIT", "LETTER",
- "UNRECOGNIZED"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'.'", "'MIGRATE'", "'ARCTIC'", "'TO'", null,
"'<=>'", "'<>'",
- "'!='", "'<'", null, "'>'", null, "'+'", "'-'", "'*'",
"'/'", "'%'",
- "'~'", "'&'", "'|'", "'||'", "'^'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, "MIGRATE", "ARCTIC", "TO", "EQ", "NSEQ",
"NEQ", "NEQJ", "LT",
- "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK",
"SLASH", "PERCENT",
- "TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE", "HAT",
"STRING", "IDENTIFIER",
- "BACKQUOTED_IDENTIFIER", "UNRECOGNIZED"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new
VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "<INVALID>";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
-
- public ArcticSqlCommandLexer(CharStream input) {
- super(input);
- _interp = new
LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- @Override
- public String getGrammarFileName() { return "ArcticSqlCommand.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public String[] getChannelNames() { return channelNames; }
-
- @Override
- public String[] getModeNames() { return modeNames; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public static final String _serializedATN =
-
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\34\u00d2\b\1\4\2"+
-
"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
-
"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
-
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
-
"\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\3\2"+
-
"\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3"+
-
"\5\3\5\3\6\3\6\3\6\5\6W\n\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3"+
-
"\n\3\n\3\13\3\13\3\13\3\13\5\13i\n\13\3\f\3\f\3\r\3\r\3\r\3\r\5\rq\n\r"+
-
"\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24"+
-
"\3\25\3\25\3\26\3\26\3\26\3\27\3\27\3\30\3\30\3\30\3\30\7\30\u008c\n\30"+
-
"\f\30\16\30\u008f\13\30\3\30\3\30\3\30\3\30\3\30\7\30\u0096\n\30\f\30"+
-
"\16\30\u0099\13\30\3\30\5\30\u009c\n\30\3\31\3\31\3\31\6\31\u00a1\n\31"+
-
"\r\31\16\31\u00a2\3\32\3\32\3\32\3\32\7\32\u00a9\n\32\f\32\16\32\u00ac"+
-
"\13\32\3\32\3\32\3\33\6\33\u00b1\n\33\r\33\16\33\u00b2\3\33\3\33\7\33"+
-
"\u00b7\n\33\f\33\16\33\u00ba\13\33\3\33\3\33\6\33\u00be\n\33\r\33\16\33"+
-
"\u00bf\5\33\u00c2\n\33\3\34\3\34\5\34\u00c6\n\34\3\34\6\34\u00c9\n\34"+
- "\r\34\16\34\u00ca\3\35\3\35\3\36\3\36\3\37\3\37\2\2
\3\3\5\4\7\5\t\6\13"+
-
"\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'"+
-
"\25)\26+\27-\30/\31\61\32\63\33\65\2\67\29\2;\2=\34\3\2\b\4\2))^^\4\2"+
-
"$$^^\3\2bb\4\2--//\3\2\62;\3\2C\\\2\u00e0\2\3\3\2\2\2\2\5\3\2\2\2\2\7"+
-
"\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2"+
-
"\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2"+
-
"\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2"+
-
"\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2"+
-
"\2=\3\2\2\2\3?\3\2\2\2\5A\3\2\2\2\7I\3\2\2\2\tP\3\2\2\2\13V\3\2\2\2\r"+
-
"X\3\2\2\2\17\\\3\2\2\2\21_\3\2\2\2\23b\3\2\2\2\25h\3\2\2\2\27j\3\2\2\2"+
-
"\31p\3\2\2\2\33r\3\2\2\2\35t\3\2\2\2\37v\3\2\2\2!x\3\2\2\2#z\3\2\2\2%"+
-
"|\3\2\2\2\'~\3\2\2\2)\u0080\3\2\2\2+\u0082\3\2\2\2-\u0085\3\2\2\2/\u009b"+
-
"\3\2\2\2\61\u00a0\3\2\2\2\63\u00a4\3\2\2\2\65\u00c1\3\2\2\2\67\u00c3\3"+
-
"\2\2\29\u00cc\3\2\2\2;\u00ce\3\2\2\2=\u00d0\3\2\2\2?@\7\60\2\2@\4\3\2"+
-
"\2\2AB\7O\2\2BC\7K\2\2CD\7I\2\2DE\7T\2\2EF\7C\2\2FG\7V\2\2GH\7G\2\2H\6"+
-
"\3\2\2\2IJ\7C\2\2JK\7T\2\2KL\7E\2\2LM\7V\2\2MN\7K\2\2NO\7E\2\2O\b\3\2"+
-
"\2\2PQ\7V\2\2QR\7Q\2\2R\n\3\2\2\2SW\7?\2\2TU\7?\2\2UW\7?\2\2VS\3\2\2\2"+
-
"VT\3\2\2\2W\f\3\2\2\2XY\7>\2\2YZ\7?\2\2Z[\7@\2\2[\16\3\2\2\2\\]\7>\2\2"+
-
"]^\7@\2\2^\20\3\2\2\2_`\7#\2\2`a\7?\2\2a\22\3\2\2\2bc\7>\2\2c\24\3\2\2"+
-
"\2de\7>\2\2ei\7?\2\2fg\7#\2\2gi\7@\2\2hd\3\2\2\2hf\3\2\2\2i\26\3\2\2\2"+
-
"jk\7@\2\2k\30\3\2\2\2lm\7@\2\2mq\7?\2\2no\7#\2\2oq\7>\2\2pl\3\2\2\2pn"+
-
"\3\2\2\2q\32\3\2\2\2rs\7-\2\2s\34\3\2\2\2tu\7/\2\2u\36\3\2\2\2vw\7,\2"+
- "\2w
\3\2\2\2xy\7\61\2\2y\"\3\2\2\2z{\7\'\2\2{$\3\2\2\2|}\7\u0080\2\2}"+
-
"&\3\2\2\2~\177\7(\2\2\177(\3\2\2\2\u0080\u0081\7~\2\2\u0081*\3\2\2\2\u0082"+
-
"\u0083\7~\2\2\u0083\u0084\7~\2\2\u0084,\3\2\2\2\u0085\u0086\7`\2\2\u0086"+
-
".\3\2\2\2\u0087\u008d\7)\2\2\u0088\u008c\n\2\2\2\u0089\u008a\7^\2\2\u008a"+
-
"\u008c\13\2\2\2\u008b\u0088\3\2\2\2\u008b\u0089\3\2\2\2\u008c\u008f\3"+
-
"\2\2\2\u008d\u008b\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u0090\3\2\2\2\u008f"+
-
"\u008d\3\2\2\2\u0090\u009c\7)\2\2\u0091\u0097\7$\2\2\u0092\u0096\n\3\2"+
-
"\2\u0093\u0094\7^\2\2\u0094\u0096\13\2\2\2\u0095\u0092\3\2\2\2\u0095\u0093"+
-
"\3\2\2\2\u0096\u0099\3\2\2\2\u0097\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098"+
-
"\u009a\3\2\2\2\u0099\u0097\3\2\2\2\u009a\u009c\7$\2\2\u009b\u0087\3\2"+
-
"\2\2\u009b\u0091\3\2\2\2\u009c\60\3\2\2\2\u009d\u00a1\5;\36\2\u009e\u00a1"+
-
"\59\35\2\u009f\u00a1\7a\2\2\u00a0\u009d\3\2\2\2\u00a0\u009e\3\2\2\2\u00a0"+
-
"\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a2\u00a3\3\2"+
-
"\2\2\u00a3\62\3\2\2\2\u00a4\u00aa\7b\2\2\u00a5\u00a9\n\4\2\2\u00a6\u00a7"+
-
"\7b\2\2\u00a7\u00a9\7b\2\2\u00a8\u00a5\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a9"+
-
"\u00ac\3\2\2\2\u00aa\u00a8\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\u00ad\3\2"+
-
"\2\2\u00ac\u00aa\3\2\2\2\u00ad\u00ae\7b\2\2\u00ae\64\3\2\2\2\u00af\u00b1"+
-
"\59\35\2\u00b0\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b2"+
-
"\u00b3\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b4\u00b8\7\60\2\2\u00b5\u00b7\5"+
-
"9\35\2\u00b6\u00b5\3\2\2\2\u00b7\u00ba\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b8"+
-
"\u00b9\3\2\2\2\u00b9\u00c2\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u00bd\7\60"+
-
"\2\2\u00bc\u00be\59\35\2\u00bd\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf"+
-
"\u00bd\3\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c2\3\2\2\2\u00c1\u00b0\3\2"+
-
"\2\2\u00c1\u00bb\3\2\2\2\u00c2\66\3\2\2\2\u00c3\u00c5\7G\2\2\u00c4\u00c6"+
-
"\t\5\2\2\u00c5\u00c4\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c8\3\2\2\2\u00c7"+
-
"\u00c9\59\35\2\u00c8\u00c7\3\2\2\2\u00c9\u00ca\3\2\2\2\u00ca\u00c8\3\2"+
-
"\2\2\u00ca\u00cb\3\2\2\2\u00cb8\3\2\2\2\u00cc\u00cd\t\6\2\2\u00cd:\3\2"+
-
"\2\2\u00ce\u00cf\t\7\2\2\u00cf<\3\2\2\2\u00d0\u00d1\13\2\2\2\u00d1>\3"+
-
"\2\2\2\25\2Vhp\u008b\u008d\u0095\u0097\u009b\u00a0\u00a2\u00a8\u00aa\u00b2"+
- "\u00b8\u00bf\u00c1\u00c5\u00ca\2";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i),
i);
- }
- }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandListener.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandListener.java
deleted file mode 100644
index 50a88dff9..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandListener.java
+++ /dev/null
@@ -1,120 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.tree.ParseTreeListener;
-
-/**
- * This interface defines a complete listener for a parse tree produced by
- * {@link ArcticSqlCommandParser}.
- */
-public interface ArcticSqlCommandListener extends ParseTreeListener {
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#arcticCommand}.
- * @param ctx the parse tree
- */
- void enterArcticCommand(ArcticSqlCommandParser.ArcticCommandContext
ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#arcticCommand}.
- * @param ctx the parse tree
- */
- void exitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx);
- /**
- * Enter a parse tree produced by the {@code migrateStatement}
- * labeled alternative in {@link
ArcticSqlCommandParser#arcticStatement}.
- * @param ctx the parse tree
- */
- void
enterMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx);
- /**
- * Exit a parse tree produced by the {@code migrateStatement}
- * labeled alternative in {@link
ArcticSqlCommandParser#arcticStatement}.
- * @param ctx the parse tree
- */
- void
exitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#multipartIdentifier}.
- * @param ctx the parse tree
- */
- void
enterMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#multipartIdentifier}.
- * @param ctx the parse tree
- */
- void
exitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#errorCapturingIdentifier}.
- * @param ctx the parse tree
- */
- void
enterErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#errorCapturingIdentifier}.
- * @param ctx the parse tree
- */
- void
exitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx);
- /**
- * Enter a parse tree produced by the {@code errorIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void enterErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx);
- /**
- * Exit a parse tree produced by the {@code errorIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void exitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx);
- /**
- * Enter a parse tree produced by the {@code realIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void enterRealIdent(ArcticSqlCommandParser.RealIdentContext ctx);
- /**
- * Exit a parse tree produced by the {@code realIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void exitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#identifier}.
- * @param ctx the parse tree
- */
- void enterIdentifier(ArcticSqlCommandParser.IdentifierContext ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#identifier}.
- * @param ctx the parse tree
- */
- void exitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx);
- /**
- * Enter a parse tree produced by the {@code unquotedIdentifier}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
enterUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx);
- /**
- * Exit a parse tree produced by the {@code unquotedIdentifier}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
exitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx);
- /**
- * Enter a parse tree produced by the {@code
quotedIdentifierAlternative}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
enterQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx);
- /**
- * Exit a parse tree produced by the {@code quotedIdentifierAlternative}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
exitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#quotedIdentifier}.
- * @param ctx the parse tree
- */
- void
enterQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#quotedIdentifier}.
- * @param ctx the parse tree
- */
- void
exitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx);
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandParser.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandParser.java
deleted file mode 100644
index 6395a81c8..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandParser.java
+++ /dev/null
@@ -1,635 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.misc.*;
-import org.antlr.v4.runtime.tree.*;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class ArcticSqlCommandParser extends Parser {
- static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, MIGRATE=2, ARCTIC=3, TO=4, EQ=5, NSEQ=6, NEQ=7, NEQJ=8,
LT=9,
- LTE=10, GT=11, GTE=12, PLUS=13, MINUS=14, ASTERISK=15,
SLASH=16, PERCENT=17,
- TILDE=18, AMPERSAND=19, PIPE=20, CONCAT_PIPE=21, HAT=22,
STRING=23, IDENTIFIER=24,
- BACKQUOTED_IDENTIFIER=25, UNRECOGNIZED=26;
- public static final int
- RULE_arcticCommand = 0, RULE_arcticStatement = 1,
RULE_multipartIdentifier = 2,
- RULE_errorCapturingIdentifier = 3,
RULE_errorCapturingIdentifierExtra = 4,
- RULE_identifier = 5, RULE_strictIdentifier = 6,
RULE_quotedIdentifier = 7;
- private static String[] makeRuleNames() {
- return new String[] {
- "arcticCommand", "arcticStatement",
"multipartIdentifier", "errorCapturingIdentifier",
- "errorCapturingIdentifierExtra", "identifier",
"strictIdentifier", "quotedIdentifier"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'.'", "'MIGRATE'", "'ARCTIC'", "'TO'", null,
"'<=>'", "'<>'",
- "'!='", "'<'", null, "'>'", null, "'+'", "'-'", "'*'",
"'/'", "'%'",
- "'~'", "'&'", "'|'", "'||'", "'^'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, "MIGRATE", "ARCTIC", "TO", "EQ", "NSEQ",
"NEQ", "NEQJ", "LT",
- "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK",
"SLASH", "PERCENT",
- "TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE", "HAT",
"STRING", "IDENTIFIER",
- "BACKQUOTED_IDENTIFIER", "UNRECOGNIZED"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new
VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "<INVALID>";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
- @Override
- public String getGrammarFileName() { return "ArcticSqlCommand.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public ArcticSqlCommandParser(TokenStream input) {
- super(input);
- _interp = new
ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- public static class ArcticCommandContext extends ParserRuleContext {
- public ArcticStatementContext arcticStatement() {
- return getRuleContext(ArcticStatementContext.class,0);
- }
- public ArcticCommandContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_arcticCommand; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterArcticCommand(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitArcticCommand(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitArcticCommand(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ArcticCommandContext arcticCommand() throws
RecognitionException {
- ArcticCommandContext _localctx = new ArcticCommandContext(_ctx,
getState());
- enterRule(_localctx, 0, RULE_arcticCommand);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(16);
- arcticStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ArcticStatementContext extends ParserRuleContext {
- public ArcticStatementContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_arcticStatement; }
-
- public ArcticStatementContext() { }
- public void copyFrom(ArcticStatementContext ctx) {
- super.copyFrom(ctx);
- }
- }
- public static class MigrateStatementContext extends
ArcticStatementContext {
- public MultipartIdentifierContext source;
- public MultipartIdentifierContext target;
- public TerminalNode MIGRATE() { return
getToken(ArcticSqlCommandParser.MIGRATE, 0); }
- public TerminalNode TO() { return
getToken(ArcticSqlCommandParser.TO, 0); }
- public TerminalNode ARCTIC() { return
getToken(ArcticSqlCommandParser.ARCTIC, 0); }
- public List<MultipartIdentifierContext> multipartIdentifier() {
- return
getRuleContexts(MultipartIdentifierContext.class);
- }
- public MultipartIdentifierContext multipartIdentifier(int i) {
- return
getRuleContext(MultipartIdentifierContext.class,i);
- }
- public MigrateStatementContext(ArcticStatementContext ctx) {
copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterMigrateStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitMigrateStatement(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitMigrateStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ArcticStatementContext arcticStatement() throws
RecognitionException {
- ArcticStatementContext _localctx = new
ArcticStatementContext(_ctx, getState());
- enterRule(_localctx, 2, RULE_arcticStatement);
- try {
- _localctx = new MigrateStatementContext(_localctx);
- enterOuterAlt(_localctx, 1);
- {
- setState(18);
- match(MIGRATE);
- setState(19);
- ((MigrateStatementContext)_localctx).source =
multipartIdentifier();
- setState(20);
- match(TO);
- setState(21);
- match(ARCTIC);
- setState(22);
- ((MigrateStatementContext)_localctx).target =
multipartIdentifier();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class MultipartIdentifierContext extends
ParserRuleContext {
- public ErrorCapturingIdentifierContext errorCapturingIdentifier;
- public List<ErrorCapturingIdentifierContext> parts = new
ArrayList<ErrorCapturingIdentifierContext>();
- public List<ErrorCapturingIdentifierContext>
errorCapturingIdentifier() {
- return
getRuleContexts(ErrorCapturingIdentifierContext.class);
- }
- public ErrorCapturingIdentifierContext
errorCapturingIdentifier(int i) {
- return
getRuleContext(ErrorCapturingIdentifierContext.class,i);
- }
- public MultipartIdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_multipartIdentifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterMultipartIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitMultipartIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitMultipartIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MultipartIdentifierContext multipartIdentifier() throws
RecognitionException {
- MultipartIdentifierContext _localctx = new
MultipartIdentifierContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_multipartIdentifier);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(24);
-
((MultipartIdentifierContext)_localctx).errorCapturingIdentifier =
errorCapturingIdentifier();
-
((MultipartIdentifierContext)_localctx).parts.add(((MultipartIdentifierContext)_localctx).errorCapturingIdentifier);
- setState(29);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==T__0) {
- {
- {
- setState(25);
- match(T__0);
- setState(26);
-
((MultipartIdentifierContext)_localctx).errorCapturingIdentifier =
errorCapturingIdentifier();
-
((MultipartIdentifierContext)_localctx).parts.add(((MultipartIdentifierContext)_localctx).errorCapturingIdentifier);
- }
- }
- setState(31);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ErrorCapturingIdentifierContext extends
ParserRuleContext {
- public IdentifierContext identifier() {
- return getRuleContext(IdentifierContext.class,0);
- }
- public ErrorCapturingIdentifierExtraContext
errorCapturingIdentifierExtra() {
- return
getRuleContext(ErrorCapturingIdentifierExtraContext.class,0);
- }
- public ErrorCapturingIdentifierContext(ParserRuleContext
parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_errorCapturingIdentifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterErrorCapturingIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitErrorCapturingIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitErrorCapturingIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ErrorCapturingIdentifierContext errorCapturingIdentifier()
throws RecognitionException {
- ErrorCapturingIdentifierContext _localctx = new
ErrorCapturingIdentifierContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_errorCapturingIdentifier);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(32);
- identifier();
- setState(33);
- errorCapturingIdentifierExtra();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ErrorCapturingIdentifierExtraContext extends
ParserRuleContext {
- public ErrorCapturingIdentifierExtraContext(ParserRuleContext
parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_errorCapturingIdentifierExtra; }
-
- public ErrorCapturingIdentifierExtraContext() { }
- public void copyFrom(ErrorCapturingIdentifierExtraContext ctx) {
- super.copyFrom(ctx);
- }
- }
- public static class ErrorIdentContext extends
ErrorCapturingIdentifierExtraContext {
- public List<TerminalNode> MINUS() { return
getTokens(ArcticSqlCommandParser.MINUS); }
- public TerminalNode MINUS(int i) {
- return getToken(ArcticSqlCommandParser.MINUS, i);
- }
- public List<IdentifierContext> identifier() {
- return getRuleContexts(IdentifierContext.class);
- }
- public IdentifierContext identifier(int i) {
- return getRuleContext(IdentifierContext.class,i);
- }
- public ErrorIdentContext(ErrorCapturingIdentifierExtraContext
ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterErrorIdent(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitErrorIdent(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitErrorIdent(this);
- else return visitor.visitChildren(this);
- }
- }
- public static class RealIdentContext extends
ErrorCapturingIdentifierExtraContext {
- public RealIdentContext(ErrorCapturingIdentifierExtraContext
ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterRealIdent(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitRealIdent(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitRealIdent(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ErrorCapturingIdentifierExtraContext
errorCapturingIdentifierExtra() throws RecognitionException {
- ErrorCapturingIdentifierExtraContext _localctx = new
ErrorCapturingIdentifierExtraContext(_ctx, getState());
- enterRule(_localctx, 8, RULE_errorCapturingIdentifierExtra);
- int _la;
- try {
- setState(42);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case MINUS:
- _localctx = new ErrorIdentContext(_localctx);
- enterOuterAlt(_localctx, 1);
- {
- setState(37);
- _errHandler.sync(this);
- _la = _input.LA(1);
- do {
- {
- {
- setState(35);
- match(MINUS);
- setState(36);
- identifier();
- }
- }
- setState(39);
- _errHandler.sync(this);
- _la = _input.LA(1);
- } while ( _la==MINUS );
- }
- break;
- case EOF:
- case T__0:
- case TO:
- _localctx = new RealIdentContext(_localctx);
- enterOuterAlt(_localctx, 2);
- {
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class IdentifierContext extends ParserRuleContext {
- public StrictIdentifierContext strictIdentifier() {
- return getRuleContext(StrictIdentifierContext.class,0);
- }
- public IdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_identifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IdentifierContext identifier() throws RecognitionException
{
- IdentifierContext _localctx = new IdentifierContext(_ctx,
getState());
- enterRule(_localctx, 10, RULE_identifier);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(44);
- strictIdentifier();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class StrictIdentifierContext extends ParserRuleContext {
- public StrictIdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_strictIdentifier; }
-
- public StrictIdentifierContext() { }
- public void copyFrom(StrictIdentifierContext ctx) {
- super.copyFrom(ctx);
- }
- }
- public static class QuotedIdentifierAlternativeContext extends
StrictIdentifierContext {
- public QuotedIdentifierContext quotedIdentifier() {
- return getRuleContext(QuotedIdentifierContext.class,0);
- }
- public
QuotedIdentifierAlternativeContext(StrictIdentifierContext ctx) {
copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterQuotedIdentifierAlternative(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitQuotedIdentifierAlternative(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitQuotedIdentifierAlternative(this);
- else return visitor.visitChildren(this);
- }
- }
- public static class UnquotedIdentifierContext extends
StrictIdentifierContext {
- public TerminalNode IDENTIFIER() { return
getToken(ArcticSqlCommandParser.IDENTIFIER, 0); }
- public UnquotedIdentifierContext(StrictIdentifierContext ctx) {
copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterUnquotedIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitUnquotedIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitUnquotedIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final StrictIdentifierContext strictIdentifier() throws
RecognitionException {
- StrictIdentifierContext _localctx = new
StrictIdentifierContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_strictIdentifier);
- try {
- setState(48);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case IDENTIFIER:
- _localctx = new
UnquotedIdentifierContext(_localctx);
- enterOuterAlt(_localctx, 1);
- {
- setState(46);
- match(IDENTIFIER);
- }
- break;
- case BACKQUOTED_IDENTIFIER:
- _localctx = new
QuotedIdentifierAlternativeContext(_localctx);
- enterOuterAlt(_localctx, 2);
- {
- setState(47);
- quotedIdentifier();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class QuotedIdentifierContext extends ParserRuleContext {
- public TerminalNode BACKQUOTED_IDENTIFIER() { return
getToken(ArcticSqlCommandParser.BACKQUOTED_IDENTIFIER, 0); }
- public QuotedIdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_quotedIdentifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterQuotedIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitQuotedIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitQuotedIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final QuotedIdentifierContext quotedIdentifier() throws
RecognitionException {
- QuotedIdentifierContext _localctx = new
QuotedIdentifierContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_quotedIdentifier);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(50);
- match(BACKQUOTED_IDENTIFIER);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static final String _serializedATN =
-
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\34\67\4\2\t\2\4\3"+
-
"\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\3\2\3\2\3\3\3\3\3"+
-
"\3\3\3\3\3\3\3\3\4\3\4\3\4\7\4\36\n\4\f\4\16\4!\13\4\3\5\3\5\3\5\3\6\3"+
-
"\6\6\6(\n\6\r\6\16\6)\3\6\5\6-\n\6\3\7\3\7\3\b\3\b\5\b\63\n\b\3\t\3\t"+
-
"\3\t\2\2\n\2\4\6\b\n\f\16\20\2\2\2\62\2\22\3\2\2\2\4\24\3\2\2\2\6\32\3"+
-
"\2\2\2\b\"\3\2\2\2\n,\3\2\2\2\f.\3\2\2\2\16\62\3\2\2\2\20\64\3\2\2\2\22"+
-
"\23\5\4\3\2\23\3\3\2\2\2\24\25\7\4\2\2\25\26\5\6\4\2\26\27\7\6\2\2\27"+
-
"\30\7\5\2\2\30\31\5\6\4\2\31\5\3\2\2\2\32\37\5\b\5\2\33\34\7\3\2\2\34"+
- "\36\5\b\5\2\35\33\3\2\2\2\36!\3\2\2\2\37\35\3\2\2\2\37
\3\2\2\2 \7\3\2"+
-
"\2\2!\37\3\2\2\2\"#\5\f\7\2#$\5\n\6\2$\t\3\2\2\2%&\7\20\2\2&(\5\f\7\2"+
-
"\'%\3\2\2\2()\3\2\2\2)\'\3\2\2\2)*\3\2\2\2*-\3\2\2\2+-\3\2\2\2,\'\3\2"+
-
"\2\2,+\3\2\2\2-\13\3\2\2\2./\5\16\b\2/\r\3\2\2\2\60\63\7\32\2\2\61\63"+
-
"\5\20\t\2\62\60\3\2\2\2\62\61\3\2\2\2\63\17\3\2\2\2\64\65\7\33\2\2\65"+
- "\21\3\2\2\2\6\37),\62";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i),
i);
- }
- }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandVisitor.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandVisitor.java
deleted file mode 100644
index 011f6a284..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandVisitor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-
-/**
- * This interface defines a complete generic visitor for a parse tree produced
- * by {@link ArcticSqlCommandParser}.
- *
- * @param <T> The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-public interface ArcticSqlCommandVisitor<T> extends ParseTreeVisitor<T> {
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#arcticCommand}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx);
- /**
- * Visit a parse tree produced by the {@code migrateStatement}
- * labeled alternative in {@link
ArcticSqlCommandParser#arcticStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext
ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#multipartIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#errorCapturingIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx);
- /**
- * Visit a parse tree produced by the {@code errorIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx);
- /**
- * Visit a parse tree produced by the {@code realIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#identifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx);
- /**
- * Visit a parse tree produced by the {@code unquotedIdentifier}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx);
- /**
- * Visit a parse tree produced by the {@code
quotedIdentifierAlternative}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#quotedIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext
ctx);
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/java/org/apache/amoro/spark/sql/catalyst/parser/ArcticCommandAstParser.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/java/org/apache/amoro/spark/sql/catalyst/parser/ArcticCommandAstParser.java
deleted file mode 100644
index e0ef000c2..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/java/org/apache/amoro/spark/sql/catalyst/parser/ArcticCommandAstParser.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.amoro.spark.sql.catalyst.parser;
-
-import org.antlr.v4.runtime.RuleContext;
-import org.apache.amoro.spark.sql.catalyst.plans.MigrateToArcticStatement;
-import org.apache.amoro.spark.sql.parser.ArcticSqlCommandBaseVisitor;
-import org.apache.amoro.spark.sql.parser.ArcticSqlCommandParser;
-import org.apache.spark.sql.catalyst.SQLConfHelper;
-import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan;
-import scala.collection.JavaConverters;
-import scala.collection.Seq;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class ArcticCommandAstParser extends ArcticSqlCommandBaseVisitor<Object>
- implements SQLConfHelper {
-
- @Override
- public LogicalPlan
visitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) {
- return (LogicalPlan) ArcticParserUtils.withOrigin(ctx, () ->
visit(ctx.arcticStatement()));
- }
-
- @Override
- public LogicalPlan
visitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) {
- Seq<String> source = multipartIdentifier(ctx.source);
- Seq<String> target = multipartIdentifier(ctx.target);
- return new MigrateToArcticStatement(source, target);
- }
-
- private Seq<String>
multipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx) {
- List<String> identifier =
-
ctx.parts.stream().map(RuleContext::getText).map(String::trim).collect(Collectors.toList());
- return JavaConverters.asScalaBuffer(identifier);
- }
-}
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
index 88610da2f..883c734d4 100644
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
+++
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
@@ -26,7 +26,6 @@ import scala.util.Try
import org.antlr.v4.runtime._
import org.antlr.v4.runtime.atn.PredictionMode
import org.antlr.v4.runtime.misc.{Interval, ParseCancellationException}
-import org.apache.amoro.spark.sql.catalyst.parser.ArcticCommandAstParser
import org.apache.amoro.spark.sql.catalyst.plans.UnresolvedMergeIntoArcticTable
import org.apache.amoro.spark.sql.parser._
import org.apache.amoro.spark.table.ArcticSparkTable
@@ -48,7 +47,6 @@ class ArcticSqlExtensionsParser(delegate: ParserInterface)
extends ParserInterfa
with SQLConfHelper {
private lazy val createTableAstBuilder = new ArcticSqlExtendAstBuilder()
- private lazy val arcticCommandAstVisitor = new ArcticCommandAstParser()
/**
* Parse a string to a DataType.
@@ -98,11 +96,6 @@ class ArcticSqlExtensionsParser(delegate: ParserInterface)
extends ParserInterfa
delegate.parseTableSchema(sqlText)
}
- def isArcticCommand(sqlText: String): Boolean = {
- val normalized =
sqlText.toLowerCase(Locale.ROOT).trim().replaceAll("\\s+", " ")
- (normalized.contains("migrate") && normalized.contains("to arctic"))
- }
-
private val arcticExtendSqlFilters: Seq[String => Boolean] = Seq(
s => s.contains("create table") && s.contains("primary key"),
s => s.contains("create temporary table") && s.contains("primary key"))
@@ -112,37 +105,30 @@ class ArcticSqlExtensionsParser(delegate:
ParserInterface) extends ParserInterfa
arcticExtendSqlFilters.exists(f => f(normalized))
}
- def buildLexer(sql: String): Option[Lexer] = {
+ private def buildLexer(sql: String): Option[Lexer] = {
lazy val charStream = new UpperCaseCharStream(CharStreams.fromString(sql))
if (isArcticExtendSql(sql)) {
Some(new ArcticSqlExtendLexer(charStream))
- } else if (isArcticCommand(sql)) {
- Some(new ArcticSqlCommandLexer(charStream))
} else {
Option.empty
}
}
- def buildAntlrParser(stream: TokenStream, lexer: Lexer): Parser = {
+ private def buildAntlrParser(stream: TokenStream, lexer: Lexer): Parser = {
lexer match {
case _: ArcticSqlExtendLexer =>
val parser = new ArcticSqlExtendParser(stream)
parser.legacy_exponent_literal_as_decimal_enabled =
conf.exponentLiteralAsDecimalEnabled
parser.SQL_standard_keyword_behavior = conf.ansiEnabled
parser
- case _: ArcticSqlCommandLexer =>
- val parser = new ArcticSqlCommandParser(stream)
- parser
case _ =>
throw new IllegalStateException("no suitable parser found")
}
}
- def toLogicalResult(parser: Parser): LogicalPlan = parser match {
+ private def toLogicalResult(parser: Parser): LogicalPlan = parser match {
case p: ArcticSqlExtendParser =>
createTableAstBuilder.visitExtendStatement(p.extendStatement())
- case p: ArcticSqlCommandParser =>
- arcticCommandAstVisitor.visitArcticCommand(p.arcticCommand())
}
/**
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/test/java/org/apache/amoro/spark/test/suites/sql/TestArcticCommandSQL.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/test/java/org/apache/amoro/spark/test/suites/sql/TestArcticCommandSQL.java
deleted file mode 100644
index 9d9d6271f..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/src/test/java/org/apache/amoro/spark/test/suites/sql/TestArcticCommandSQL.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.amoro.spark.test.suites.sql;
-
-import org.apache.amoro.spark.test.MixedTableTestBase;
-import org.apache.amoro.spark.test.extensions.EnableCatalogSelect;
-import org.apache.amoro.spark.test.utils.TestTable;
-import org.apache.iceberg.types.Types;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import java.util.stream.Stream;
-
-@EnableCatalogSelect
[email protected](byTableFormat = true)
-public class TestArcticCommandSQL extends MixedTableTestBase {
-
- public static Stream<Arguments> testMigrate() {
- Types.NestedField[] fields = {
- Types.NestedField.required(1, "id", Types.IntegerType.get()),
- Types.NestedField.required(2, "data", Types.StringType.get()),
- Types.NestedField.required(3, "pt", Types.StringType.get())
- };
-
- return Stream.of(
- Arguments.arguments(fields, new String[0], SPARK_SESSION_CATALOG),
- Arguments.arguments(fields, new String[] {"pt"},
SPARK_SESSION_CATALOG),
- Arguments.arguments(fields, new String[0], MIXED_ICEBERG_CATALOG),
- Arguments.arguments(fields, new String[] {"pt"},
MIXED_ICEBERG_CATALOG));
- }
-
- @EnableCatalogSelect.SelectCatalog(use = SPARK_SESSION_CATALOG)
- @ParameterizedTest
- @MethodSource
- public void testMigrate(Types.NestedField[] fields, String[] pt, String
targetCatalog) {
-
- TestTable source = TestTable.format(MIXED_HIVE, fields).pt(pt).build();
- createHiveSource(source.hiveSchema, source.hivePartitions);
- sql(
- "insert overwrite "
- + source()
- + " values "
- + " ( 1, 'aaa', '0001' ), "
- + " ( 2, 'bbb', '0002' ) ");
-
- sql("CREATE DATABASE IF NOT EXISTS " + targetCatalog + "." +
target().database);
- sql("migrate " + source() + " to arctic " + targetCatalog + "." +
target());
- sql("DROP TABLE IF EXISTS " + targetCatalog + "." + target());
- }
-}
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseListener.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseListener.java
deleted file mode 100644
index 6d5931b6b..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseListener.java
+++ /dev/null
@@ -1,159 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.tree.ErrorNode;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
-/**
- * This class provides an empty implementation of {@link
ArcticSqlCommandListener},
- * which can be extended to create a listener which only needs to handle a
subset
- * of the available methods.
- */
-public class ArcticSqlCommandBaseListener implements ArcticSqlCommandListener {
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx)
{ }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx)
{ }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterRealIdent(ArcticSqlCommandParser.RealIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterIdentifier(ArcticSqlCommandParser.IdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx) {
}
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
enterQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void
exitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx) { }
-
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void enterEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void exitEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void visitTerminal(TerminalNode node) { }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation does nothing.</p>
- */
- @Override public void visitErrorNode(ErrorNode node) { }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseVisitor.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseVisitor.java
deleted file mode 100644
index 21e126447..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandBaseVisitor.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
-
-/**
- * This class provides an empty implementation of {@link
ArcticSqlCommandVisitor},
- * which can be extended to create a visitor which only needs to handle a
subset
- * of the available methods.
- *
- * @param <T> The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-public class ArcticSqlCommandBaseVisitor<T> extends
AbstractParseTreeVisitor<T> implements ArcticSqlCommandVisitor<T> {
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) {
return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx)
{ return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx) { return
visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx) {
return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * <p>The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.</p>
- */
- @Override public T
visitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx) {
return visitChildren(ctx); }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandLexer.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandLexer.java
deleted file mode 100644
index ea3791127..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandLexer.java
+++ /dev/null
@@ -1,194 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.*;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class ArcticSqlCommandLexer extends Lexer {
- static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, MIGRATE=2, ARCTIC=3, TO=4, EQ=5, NSEQ=6, NEQ=7, NEQJ=8,
LT=9,
- LTE=10, GT=11, GTE=12, PLUS=13, MINUS=14, ASTERISK=15,
SLASH=16, PERCENT=17,
- TILDE=18, AMPERSAND=19, PIPE=20, CONCAT_PIPE=21, HAT=22,
STRING=23, IDENTIFIER=24,
- BACKQUOTED_IDENTIFIER=25, UNRECOGNIZED=26;
- public static String[] channelNames = {
- "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
- };
-
- public static String[] modeNames = {
- "DEFAULT_MODE"
- };
-
- private static String[] makeRuleNames() {
- return new String[] {
- "T__0", "MIGRATE", "ARCTIC", "TO", "EQ", "NSEQ", "NEQ",
"NEQJ", "LT",
- "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK",
"SLASH", "PERCENT",
- "TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE", "HAT",
"STRING", "IDENTIFIER",
- "BACKQUOTED_IDENTIFIER", "DECIMAL_DIGITS", "EXPONENT",
"DIGIT", "LETTER",
- "UNRECOGNIZED"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'.'", "'MIGRATE'", "'ARCTIC'", "'TO'", null,
"'<=>'", "'<>'",
- "'!='", "'<'", null, "'>'", null, "'+'", "'-'", "'*'",
"'/'", "'%'",
- "'~'", "'&'", "'|'", "'||'", "'^'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, "MIGRATE", "ARCTIC", "TO", "EQ", "NSEQ",
"NEQ", "NEQJ", "LT",
- "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK",
"SLASH", "PERCENT",
- "TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE", "HAT",
"STRING", "IDENTIFIER",
- "BACKQUOTED_IDENTIFIER", "UNRECOGNIZED"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new
VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "<INVALID>";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
-
- public ArcticSqlCommandLexer(CharStream input) {
- super(input);
- _interp = new
LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- @Override
- public String getGrammarFileName() { return "ArcticSqlCommand.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public String[] getChannelNames() { return channelNames; }
-
- @Override
- public String[] getModeNames() { return modeNames; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public static final String _serializedATN =
-
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\34\u00d2\b\1\4\2"+
-
"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
-
"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
-
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
-
"\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\3\2"+
-
"\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3"+
-
"\5\3\5\3\6\3\6\3\6\5\6W\n\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3"+
-
"\n\3\n\3\13\3\13\3\13\3\13\5\13i\n\13\3\f\3\f\3\r\3\r\3\r\3\r\5\rq\n\r"+
-
"\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24"+
-
"\3\25\3\25\3\26\3\26\3\26\3\27\3\27\3\30\3\30\3\30\3\30\7\30\u008c\n\30"+
-
"\f\30\16\30\u008f\13\30\3\30\3\30\3\30\3\30\3\30\7\30\u0096\n\30\f\30"+
-
"\16\30\u0099\13\30\3\30\5\30\u009c\n\30\3\31\3\31\3\31\6\31\u00a1\n\31"+
-
"\r\31\16\31\u00a2\3\32\3\32\3\32\3\32\7\32\u00a9\n\32\f\32\16\32\u00ac"+
-
"\13\32\3\32\3\32\3\33\6\33\u00b1\n\33\r\33\16\33\u00b2\3\33\3\33\7\33"+
-
"\u00b7\n\33\f\33\16\33\u00ba\13\33\3\33\3\33\6\33\u00be\n\33\r\33\16\33"+
-
"\u00bf\5\33\u00c2\n\33\3\34\3\34\5\34\u00c6\n\34\3\34\6\34\u00c9\n\34"+
- "\r\34\16\34\u00ca\3\35\3\35\3\36\3\36\3\37\3\37\2\2
\3\3\5\4\7\5\t\6\13"+
-
"\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'"+
-
"\25)\26+\27-\30/\31\61\32\63\33\65\2\67\29\2;\2=\34\3\2\b\4\2))^^\4\2"+
-
"$$^^\3\2bb\4\2--//\3\2\62;\3\2C\\\2\u00e0\2\3\3\2\2\2\2\5\3\2\2\2\2\7"+
-
"\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2"+
-
"\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2"+
-
"\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2"+
-
"\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2"+
-
"\2=\3\2\2\2\3?\3\2\2\2\5A\3\2\2\2\7I\3\2\2\2\tP\3\2\2\2\13V\3\2\2\2\r"+
-
"X\3\2\2\2\17\\\3\2\2\2\21_\3\2\2\2\23b\3\2\2\2\25h\3\2\2\2\27j\3\2\2\2"+
-
"\31p\3\2\2\2\33r\3\2\2\2\35t\3\2\2\2\37v\3\2\2\2!x\3\2\2\2#z\3\2\2\2%"+
-
"|\3\2\2\2\'~\3\2\2\2)\u0080\3\2\2\2+\u0082\3\2\2\2-\u0085\3\2\2\2/\u009b"+
-
"\3\2\2\2\61\u00a0\3\2\2\2\63\u00a4\3\2\2\2\65\u00c1\3\2\2\2\67\u00c3\3"+
-
"\2\2\29\u00cc\3\2\2\2;\u00ce\3\2\2\2=\u00d0\3\2\2\2?@\7\60\2\2@\4\3\2"+
-
"\2\2AB\7O\2\2BC\7K\2\2CD\7I\2\2DE\7T\2\2EF\7C\2\2FG\7V\2\2GH\7G\2\2H\6"+
-
"\3\2\2\2IJ\7C\2\2JK\7T\2\2KL\7E\2\2LM\7V\2\2MN\7K\2\2NO\7E\2\2O\b\3\2"+
-
"\2\2PQ\7V\2\2QR\7Q\2\2R\n\3\2\2\2SW\7?\2\2TU\7?\2\2UW\7?\2\2VS\3\2\2\2"+
-
"VT\3\2\2\2W\f\3\2\2\2XY\7>\2\2YZ\7?\2\2Z[\7@\2\2[\16\3\2\2\2\\]\7>\2\2"+
-
"]^\7@\2\2^\20\3\2\2\2_`\7#\2\2`a\7?\2\2a\22\3\2\2\2bc\7>\2\2c\24\3\2\2"+
-
"\2de\7>\2\2ei\7?\2\2fg\7#\2\2gi\7@\2\2hd\3\2\2\2hf\3\2\2\2i\26\3\2\2\2"+
-
"jk\7@\2\2k\30\3\2\2\2lm\7@\2\2mq\7?\2\2no\7#\2\2oq\7>\2\2pl\3\2\2\2pn"+
-
"\3\2\2\2q\32\3\2\2\2rs\7-\2\2s\34\3\2\2\2tu\7/\2\2u\36\3\2\2\2vw\7,\2"+
- "\2w
\3\2\2\2xy\7\61\2\2y\"\3\2\2\2z{\7\'\2\2{$\3\2\2\2|}\7\u0080\2\2}"+
-
"&\3\2\2\2~\177\7(\2\2\177(\3\2\2\2\u0080\u0081\7~\2\2\u0081*\3\2\2\2\u0082"+
-
"\u0083\7~\2\2\u0083\u0084\7~\2\2\u0084,\3\2\2\2\u0085\u0086\7`\2\2\u0086"+
-
".\3\2\2\2\u0087\u008d\7)\2\2\u0088\u008c\n\2\2\2\u0089\u008a\7^\2\2\u008a"+
-
"\u008c\13\2\2\2\u008b\u0088\3\2\2\2\u008b\u0089\3\2\2\2\u008c\u008f\3"+
-
"\2\2\2\u008d\u008b\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u0090\3\2\2\2\u008f"+
-
"\u008d\3\2\2\2\u0090\u009c\7)\2\2\u0091\u0097\7$\2\2\u0092\u0096\n\3\2"+
-
"\2\u0093\u0094\7^\2\2\u0094\u0096\13\2\2\2\u0095\u0092\3\2\2\2\u0095\u0093"+
-
"\3\2\2\2\u0096\u0099\3\2\2\2\u0097\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098"+
-
"\u009a\3\2\2\2\u0099\u0097\3\2\2\2\u009a\u009c\7$\2\2\u009b\u0087\3\2"+
-
"\2\2\u009b\u0091\3\2\2\2\u009c\60\3\2\2\2\u009d\u00a1\5;\36\2\u009e\u00a1"+
-
"\59\35\2\u009f\u00a1\7a\2\2\u00a0\u009d\3\2\2\2\u00a0\u009e\3\2\2\2\u00a0"+
-
"\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a2\u00a3\3\2"+
-
"\2\2\u00a3\62\3\2\2\2\u00a4\u00aa\7b\2\2\u00a5\u00a9\n\4\2\2\u00a6\u00a7"+
-
"\7b\2\2\u00a7\u00a9\7b\2\2\u00a8\u00a5\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a9"+
-
"\u00ac\3\2\2\2\u00aa\u00a8\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\u00ad\3\2"+
-
"\2\2\u00ac\u00aa\3\2\2\2\u00ad\u00ae\7b\2\2\u00ae\64\3\2\2\2\u00af\u00b1"+
-
"\59\35\2\u00b0\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b2"+
-
"\u00b3\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b4\u00b8\7\60\2\2\u00b5\u00b7\5"+
-
"9\35\2\u00b6\u00b5\3\2\2\2\u00b7\u00ba\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b8"+
-
"\u00b9\3\2\2\2\u00b9\u00c2\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u00bd\7\60"+
-
"\2\2\u00bc\u00be\59\35\2\u00bd\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf"+
-
"\u00bd\3\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c2\3\2\2\2\u00c1\u00b0\3\2"+
-
"\2\2\u00c1\u00bb\3\2\2\2\u00c2\66\3\2\2\2\u00c3\u00c5\7G\2\2\u00c4\u00c6"+
-
"\t\5\2\2\u00c5\u00c4\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c8\3\2\2\2\u00c7"+
-
"\u00c9\59\35\2\u00c8\u00c7\3\2\2\2\u00c9\u00ca\3\2\2\2\u00ca\u00c8\3\2"+
-
"\2\2\u00ca\u00cb\3\2\2\2\u00cb8\3\2\2\2\u00cc\u00cd\t\6\2\2\u00cd:\3\2"+
-
"\2\2\u00ce\u00cf\t\7\2\2\u00cf<\3\2\2\2\u00d0\u00d1\13\2\2\2\u00d1>\3"+
-
"\2\2\2\25\2Vhp\u008b\u008d\u0095\u0097\u009b\u00a0\u00a2\u00a8\u00aa\u00b2"+
- "\u00b8\u00bf\u00c1\u00c5\u00ca\2";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i),
i);
- }
- }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandListener.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandListener.java
deleted file mode 100644
index 50a88dff9..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandListener.java
+++ /dev/null
@@ -1,120 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.tree.ParseTreeListener;
-
-/**
- * This interface defines a complete listener for a parse tree produced by
- * {@link ArcticSqlCommandParser}.
- */
-public interface ArcticSqlCommandListener extends ParseTreeListener {
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#arcticCommand}.
- * @param ctx the parse tree
- */
- void enterArcticCommand(ArcticSqlCommandParser.ArcticCommandContext
ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#arcticCommand}.
- * @param ctx the parse tree
- */
- void exitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx);
- /**
- * Enter a parse tree produced by the {@code migrateStatement}
- * labeled alternative in {@link
ArcticSqlCommandParser#arcticStatement}.
- * @param ctx the parse tree
- */
- void
enterMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx);
- /**
- * Exit a parse tree produced by the {@code migrateStatement}
- * labeled alternative in {@link
ArcticSqlCommandParser#arcticStatement}.
- * @param ctx the parse tree
- */
- void
exitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#multipartIdentifier}.
- * @param ctx the parse tree
- */
- void
enterMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#multipartIdentifier}.
- * @param ctx the parse tree
- */
- void
exitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#errorCapturingIdentifier}.
- * @param ctx the parse tree
- */
- void
enterErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#errorCapturingIdentifier}.
- * @param ctx the parse tree
- */
- void
exitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx);
- /**
- * Enter a parse tree produced by the {@code errorIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void enterErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx);
- /**
- * Exit a parse tree produced by the {@code errorIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void exitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx);
- /**
- * Enter a parse tree produced by the {@code realIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void enterRealIdent(ArcticSqlCommandParser.RealIdentContext ctx);
- /**
- * Exit a parse tree produced by the {@code realIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- */
- void exitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#identifier}.
- * @param ctx the parse tree
- */
- void enterIdentifier(ArcticSqlCommandParser.IdentifierContext ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#identifier}.
- * @param ctx the parse tree
- */
- void exitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx);
- /**
- * Enter a parse tree produced by the {@code unquotedIdentifier}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
enterUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx);
- /**
- * Exit a parse tree produced by the {@code unquotedIdentifier}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
exitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx);
- /**
- * Enter a parse tree produced by the {@code
quotedIdentifierAlternative}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
enterQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx);
- /**
- * Exit a parse tree produced by the {@code quotedIdentifierAlternative}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- */
- void
exitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx);
- /**
- * Enter a parse tree produced by {@link
ArcticSqlCommandParser#quotedIdentifier}.
- * @param ctx the parse tree
- */
- void
enterQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx);
- /**
- * Exit a parse tree produced by {@link
ArcticSqlCommandParser#quotedIdentifier}.
- * @param ctx the parse tree
- */
- void
exitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext ctx);
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandParser.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandParser.java
deleted file mode 100644
index 6395a81c8..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandParser.java
+++ /dev/null
@@ -1,635 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.misc.*;
-import org.antlr.v4.runtime.tree.*;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class ArcticSqlCommandParser extends Parser {
- static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, MIGRATE=2, ARCTIC=3, TO=4, EQ=5, NSEQ=6, NEQ=7, NEQJ=8,
LT=9,
- LTE=10, GT=11, GTE=12, PLUS=13, MINUS=14, ASTERISK=15,
SLASH=16, PERCENT=17,
- TILDE=18, AMPERSAND=19, PIPE=20, CONCAT_PIPE=21, HAT=22,
STRING=23, IDENTIFIER=24,
- BACKQUOTED_IDENTIFIER=25, UNRECOGNIZED=26;
- public static final int
- RULE_arcticCommand = 0, RULE_arcticStatement = 1,
RULE_multipartIdentifier = 2,
- RULE_errorCapturingIdentifier = 3,
RULE_errorCapturingIdentifierExtra = 4,
- RULE_identifier = 5, RULE_strictIdentifier = 6,
RULE_quotedIdentifier = 7;
- private static String[] makeRuleNames() {
- return new String[] {
- "arcticCommand", "arcticStatement",
"multipartIdentifier", "errorCapturingIdentifier",
- "errorCapturingIdentifierExtra", "identifier",
"strictIdentifier", "quotedIdentifier"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'.'", "'MIGRATE'", "'ARCTIC'", "'TO'", null,
"'<=>'", "'<>'",
- "'!='", "'<'", null, "'>'", null, "'+'", "'-'", "'*'",
"'/'", "'%'",
- "'~'", "'&'", "'|'", "'||'", "'^'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, "MIGRATE", "ARCTIC", "TO", "EQ", "NSEQ",
"NEQ", "NEQJ", "LT",
- "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK",
"SLASH", "PERCENT",
- "TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE", "HAT",
"STRING", "IDENTIFIER",
- "BACKQUOTED_IDENTIFIER", "UNRECOGNIZED"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new
VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "<INVALID>";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
- @Override
- public String getGrammarFileName() { return "ArcticSqlCommand.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public ArcticSqlCommandParser(TokenStream input) {
- super(input);
- _interp = new
ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- public static class ArcticCommandContext extends ParserRuleContext {
- public ArcticStatementContext arcticStatement() {
- return getRuleContext(ArcticStatementContext.class,0);
- }
- public ArcticCommandContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_arcticCommand; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterArcticCommand(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitArcticCommand(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitArcticCommand(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ArcticCommandContext arcticCommand() throws
RecognitionException {
- ArcticCommandContext _localctx = new ArcticCommandContext(_ctx,
getState());
- enterRule(_localctx, 0, RULE_arcticCommand);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(16);
- arcticStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ArcticStatementContext extends ParserRuleContext {
- public ArcticStatementContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_arcticStatement; }
-
- public ArcticStatementContext() { }
- public void copyFrom(ArcticStatementContext ctx) {
- super.copyFrom(ctx);
- }
- }
- public static class MigrateStatementContext extends
ArcticStatementContext {
- public MultipartIdentifierContext source;
- public MultipartIdentifierContext target;
- public TerminalNode MIGRATE() { return
getToken(ArcticSqlCommandParser.MIGRATE, 0); }
- public TerminalNode TO() { return
getToken(ArcticSqlCommandParser.TO, 0); }
- public TerminalNode ARCTIC() { return
getToken(ArcticSqlCommandParser.ARCTIC, 0); }
- public List<MultipartIdentifierContext> multipartIdentifier() {
- return
getRuleContexts(MultipartIdentifierContext.class);
- }
- public MultipartIdentifierContext multipartIdentifier(int i) {
- return
getRuleContext(MultipartIdentifierContext.class,i);
- }
- public MigrateStatementContext(ArcticStatementContext ctx) {
copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterMigrateStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitMigrateStatement(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitMigrateStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ArcticStatementContext arcticStatement() throws
RecognitionException {
- ArcticStatementContext _localctx = new
ArcticStatementContext(_ctx, getState());
- enterRule(_localctx, 2, RULE_arcticStatement);
- try {
- _localctx = new MigrateStatementContext(_localctx);
- enterOuterAlt(_localctx, 1);
- {
- setState(18);
- match(MIGRATE);
- setState(19);
- ((MigrateStatementContext)_localctx).source =
multipartIdentifier();
- setState(20);
- match(TO);
- setState(21);
- match(ARCTIC);
- setState(22);
- ((MigrateStatementContext)_localctx).target =
multipartIdentifier();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class MultipartIdentifierContext extends
ParserRuleContext {
- public ErrorCapturingIdentifierContext errorCapturingIdentifier;
- public List<ErrorCapturingIdentifierContext> parts = new
ArrayList<ErrorCapturingIdentifierContext>();
- public List<ErrorCapturingIdentifierContext>
errorCapturingIdentifier() {
- return
getRuleContexts(ErrorCapturingIdentifierContext.class);
- }
- public ErrorCapturingIdentifierContext
errorCapturingIdentifier(int i) {
- return
getRuleContext(ErrorCapturingIdentifierContext.class,i);
- }
- public MultipartIdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_multipartIdentifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterMultipartIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitMultipartIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitMultipartIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MultipartIdentifierContext multipartIdentifier() throws
RecognitionException {
- MultipartIdentifierContext _localctx = new
MultipartIdentifierContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_multipartIdentifier);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(24);
-
((MultipartIdentifierContext)_localctx).errorCapturingIdentifier =
errorCapturingIdentifier();
-
((MultipartIdentifierContext)_localctx).parts.add(((MultipartIdentifierContext)_localctx).errorCapturingIdentifier);
- setState(29);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==T__0) {
- {
- {
- setState(25);
- match(T__0);
- setState(26);
-
((MultipartIdentifierContext)_localctx).errorCapturingIdentifier =
errorCapturingIdentifier();
-
((MultipartIdentifierContext)_localctx).parts.add(((MultipartIdentifierContext)_localctx).errorCapturingIdentifier);
- }
- }
- setState(31);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ErrorCapturingIdentifierContext extends
ParserRuleContext {
- public IdentifierContext identifier() {
- return getRuleContext(IdentifierContext.class,0);
- }
- public ErrorCapturingIdentifierExtraContext
errorCapturingIdentifierExtra() {
- return
getRuleContext(ErrorCapturingIdentifierExtraContext.class,0);
- }
- public ErrorCapturingIdentifierContext(ParserRuleContext
parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_errorCapturingIdentifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterErrorCapturingIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitErrorCapturingIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitErrorCapturingIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ErrorCapturingIdentifierContext errorCapturingIdentifier()
throws RecognitionException {
- ErrorCapturingIdentifierContext _localctx = new
ErrorCapturingIdentifierContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_errorCapturingIdentifier);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(32);
- identifier();
- setState(33);
- errorCapturingIdentifierExtra();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ErrorCapturingIdentifierExtraContext extends
ParserRuleContext {
- public ErrorCapturingIdentifierExtraContext(ParserRuleContext
parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_errorCapturingIdentifierExtra; }
-
- public ErrorCapturingIdentifierExtraContext() { }
- public void copyFrom(ErrorCapturingIdentifierExtraContext ctx) {
- super.copyFrom(ctx);
- }
- }
- public static class ErrorIdentContext extends
ErrorCapturingIdentifierExtraContext {
- public List<TerminalNode> MINUS() { return
getTokens(ArcticSqlCommandParser.MINUS); }
- public TerminalNode MINUS(int i) {
- return getToken(ArcticSqlCommandParser.MINUS, i);
- }
- public List<IdentifierContext> identifier() {
- return getRuleContexts(IdentifierContext.class);
- }
- public IdentifierContext identifier(int i) {
- return getRuleContext(IdentifierContext.class,i);
- }
- public ErrorIdentContext(ErrorCapturingIdentifierExtraContext
ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterErrorIdent(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitErrorIdent(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitErrorIdent(this);
- else return visitor.visitChildren(this);
- }
- }
- public static class RealIdentContext extends
ErrorCapturingIdentifierExtraContext {
- public RealIdentContext(ErrorCapturingIdentifierExtraContext
ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterRealIdent(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitRealIdent(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitRealIdent(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ErrorCapturingIdentifierExtraContext
errorCapturingIdentifierExtra() throws RecognitionException {
- ErrorCapturingIdentifierExtraContext _localctx = new
ErrorCapturingIdentifierExtraContext(_ctx, getState());
- enterRule(_localctx, 8, RULE_errorCapturingIdentifierExtra);
- int _la;
- try {
- setState(42);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case MINUS:
- _localctx = new ErrorIdentContext(_localctx);
- enterOuterAlt(_localctx, 1);
- {
- setState(37);
- _errHandler.sync(this);
- _la = _input.LA(1);
- do {
- {
- {
- setState(35);
- match(MINUS);
- setState(36);
- identifier();
- }
- }
- setState(39);
- _errHandler.sync(this);
- _la = _input.LA(1);
- } while ( _la==MINUS );
- }
- break;
- case EOF:
- case T__0:
- case TO:
- _localctx = new RealIdentContext(_localctx);
- enterOuterAlt(_localctx, 2);
- {
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class IdentifierContext extends ParserRuleContext {
- public StrictIdentifierContext strictIdentifier() {
- return getRuleContext(StrictIdentifierContext.class,0);
- }
- public IdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_identifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends T>)visitor).visitIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IdentifierContext identifier() throws RecognitionException
{
- IdentifierContext _localctx = new IdentifierContext(_ctx,
getState());
- enterRule(_localctx, 10, RULE_identifier);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(44);
- strictIdentifier();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class StrictIdentifierContext extends ParserRuleContext {
- public StrictIdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_strictIdentifier; }
-
- public StrictIdentifierContext() { }
- public void copyFrom(StrictIdentifierContext ctx) {
- super.copyFrom(ctx);
- }
- }
- public static class QuotedIdentifierAlternativeContext extends
StrictIdentifierContext {
- public QuotedIdentifierContext quotedIdentifier() {
- return getRuleContext(QuotedIdentifierContext.class,0);
- }
- public
QuotedIdentifierAlternativeContext(StrictIdentifierContext ctx) {
copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterQuotedIdentifierAlternative(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitQuotedIdentifierAlternative(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitQuotedIdentifierAlternative(this);
- else return visitor.visitChildren(this);
- }
- }
- public static class UnquotedIdentifierContext extends
StrictIdentifierContext {
- public TerminalNode IDENTIFIER() { return
getToken(ArcticSqlCommandParser.IDENTIFIER, 0); }
- public UnquotedIdentifierContext(StrictIdentifierContext ctx) {
copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterUnquotedIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitUnquotedIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitUnquotedIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final StrictIdentifierContext strictIdentifier() throws
RecognitionException {
- StrictIdentifierContext _localctx = new
StrictIdentifierContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_strictIdentifier);
- try {
- setState(48);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case IDENTIFIER:
- _localctx = new
UnquotedIdentifierContext(_localctx);
- enterOuterAlt(_localctx, 1);
- {
- setState(46);
- match(IDENTIFIER);
- }
- break;
- case BACKQUOTED_IDENTIFIER:
- _localctx = new
QuotedIdentifierAlternativeContext(_localctx);
- enterOuterAlt(_localctx, 2);
- {
- setState(47);
- quotedIdentifier();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class QuotedIdentifierContext extends ParserRuleContext {
- public TerminalNode BACKQUOTED_IDENTIFIER() { return
getToken(ArcticSqlCommandParser.BACKQUOTED_IDENTIFIER, 0); }
- public QuotedIdentifierContext(ParserRuleContext parent, int
invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return
RULE_quotedIdentifier; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).enterQuotedIdentifier(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof ArcticSqlCommandListener )
((ArcticSqlCommandListener)listener).exitQuotedIdentifier(this);
- }
- @Override
- public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
- if ( visitor instanceof ArcticSqlCommandVisitor )
return ((ArcticSqlCommandVisitor<? extends
T>)visitor).visitQuotedIdentifier(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final QuotedIdentifierContext quotedIdentifier() throws
RecognitionException {
- QuotedIdentifierContext _localctx = new
QuotedIdentifierContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_quotedIdentifier);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(50);
- match(BACKQUOTED_IDENTIFIER);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static final String _serializedATN =
-
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\34\67\4\2\t\2\4\3"+
-
"\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\3\2\3\2\3\3\3\3\3"+
-
"\3\3\3\3\3\3\3\3\4\3\4\3\4\7\4\36\n\4\f\4\16\4!\13\4\3\5\3\5\3\5\3\6\3"+
-
"\6\6\6(\n\6\r\6\16\6)\3\6\5\6-\n\6\3\7\3\7\3\b\3\b\5\b\63\n\b\3\t\3\t"+
-
"\3\t\2\2\n\2\4\6\b\n\f\16\20\2\2\2\62\2\22\3\2\2\2\4\24\3\2\2\2\6\32\3"+
-
"\2\2\2\b\"\3\2\2\2\n,\3\2\2\2\f.\3\2\2\2\16\62\3\2\2\2\20\64\3\2\2\2\22"+
-
"\23\5\4\3\2\23\3\3\2\2\2\24\25\7\4\2\2\25\26\5\6\4\2\26\27\7\6\2\2\27"+
-
"\30\7\5\2\2\30\31\5\6\4\2\31\5\3\2\2\2\32\37\5\b\5\2\33\34\7\3\2\2\34"+
- "\36\5\b\5\2\35\33\3\2\2\2\36!\3\2\2\2\37\35\3\2\2\2\37
\3\2\2\2 \7\3\2"+
-
"\2\2!\37\3\2\2\2\"#\5\f\7\2#$\5\n\6\2$\t\3\2\2\2%&\7\20\2\2&(\5\f\7\2"+
-
"\'%\3\2\2\2()\3\2\2\2)\'\3\2\2\2)*\3\2\2\2*-\3\2\2\2+-\3\2\2\2,\'\3\2"+
-
"\2\2,+\3\2\2\2-\13\3\2\2\2./\5\16\b\2/\r\3\2\2\2\60\63\7\32\2\2\61\63"+
-
"\5\20\t\2\62\60\3\2\2\2\62\61\3\2\2\2\63\17\3\2\2\2\64\65\7\33\2\2\65"+
- "\21\3\2\2\2\6\37),\62";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i),
i);
- }
- }
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandVisitor.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandVisitor.java
deleted file mode 100644
index 011f6a284..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/gen-antlr/org/apache/amoro/spark/sql/parser/ArcticSqlCommandVisitor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Generated from org\apache\amoro\spark\sql\parser\ArcticSqlCommand.g4 by
ANTLR 4.8
-package org.apache.amoro.spark.sql.parser;
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-
-/**
- * This interface defines a complete generic visitor for a parse tree produced
- * by {@link ArcticSqlCommandParser}.
- *
- * @param <T> The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-public interface ArcticSqlCommandVisitor<T> extends ParseTreeVisitor<T> {
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#arcticCommand}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx);
- /**
- * Visit a parse tree produced by the {@code migrateStatement}
- * labeled alternative in {@link
ArcticSqlCommandParser#arcticStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext
ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#multipartIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitMultipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#errorCapturingIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitErrorCapturingIdentifier(ArcticSqlCommandParser.ErrorCapturingIdentifierContext
ctx);
- /**
- * Visit a parse tree produced by the {@code errorIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitErrorIdent(ArcticSqlCommandParser.ErrorIdentContext ctx);
- /**
- * Visit a parse tree produced by the {@code realIdent}
- * labeled alternative in {@link
ArcticSqlCommandParser#errorCapturingIdentifierExtra}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitRealIdent(ArcticSqlCommandParser.RealIdentContext ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#identifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIdentifier(ArcticSqlCommandParser.IdentifierContext ctx);
- /**
- * Visit a parse tree produced by the {@code unquotedIdentifier}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitUnquotedIdentifier(ArcticSqlCommandParser.UnquotedIdentifierContext ctx);
- /**
- * Visit a parse tree produced by the {@code
quotedIdentifierAlternative}
- * labeled alternative in {@link
ArcticSqlCommandParser#strictIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T
visitQuotedIdentifierAlternative(ArcticSqlCommandParser.QuotedIdentifierAlternativeContext
ctx);
- /**
- * Visit a parse tree produced by {@link
ArcticSqlCommandParser#quotedIdentifier}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitQuotedIdentifier(ArcticSqlCommandParser.QuotedIdentifierContext
ctx);
-}
\ No newline at end of file
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/java/org/apache/amoro/spark/sql/catalyst/parser/ArcticCommandAstParser.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/java/org/apache/amoro/spark/sql/catalyst/parser/ArcticCommandAstParser.java
deleted file mode 100644
index 73decfaf1..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/java/org/apache/amoro/spark/sql/catalyst/parser/ArcticCommandAstParser.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.amoro.spark.sql.catalyst.parser;
-
-import org.antlr.v4.runtime.RuleContext;
-import org.apache.amoro.spark.sql.catalyst.plans.MigrateToArcticStatement;
-import org.apache.amoro.spark.sql.parser.ArcticSqlCommandBaseVisitor;
-import org.apache.amoro.spark.sql.parser.ArcticSqlCommandParser;
-import org.apache.spark.sql.catalyst.SQLConfHelper;
-import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan;
-import scala.collection.JavaConverters;
-import scala.collection.Seq;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class ArcticCommandAstParser extends ArcticSqlCommandBaseVisitor<Object>
- implements SQLConfHelper {
-
- @Override
- public LogicalPlan
visitArcticCommand(ArcticSqlCommandParser.ArcticCommandContext ctx) {
- return (LogicalPlan) ArcticParserUtils.withOrigin(ctx, () ->
visit(ctx.arcticStatement()));
- }
-
- @Override
- public LogicalPlan
visitMigrateStatement(ArcticSqlCommandParser.MigrateStatementContext ctx) {
- // return super.visitMigrateStatement(ctx);
- Seq<String> source = multipartIdentifier(ctx.source);
- Seq<String> target = multipartIdentifier(ctx.target);
- return new MigrateToArcticStatement(source, target);
- }
-
- private Seq<String>
multipartIdentifier(ArcticSqlCommandParser.MultipartIdentifierContext ctx) {
- List<String> identifier =
-
ctx.parts.stream().map(RuleContext::getText).map(String::trim).collect(Collectors.toList());
- return JavaConverters.asScalaBuffer(identifier);
- }
-}
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
index dfd1df45b..4425f546d 100644
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
+++
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/main/scala/org/apache/amoro/spark/sql/catalyst/parser/ArcticSqlExtensionsParser.scala
@@ -26,7 +26,6 @@ import scala.util.Try
import org.antlr.v4.runtime._
import org.antlr.v4.runtime.atn.PredictionMode
import org.antlr.v4.runtime.misc.{Interval, ParseCancellationException}
-import org.apache.amoro.spark.sql.catalyst.parser.ArcticCommandAstParser
import org.apache.amoro.spark.sql.catalyst.plans.UnresolvedMergeIntoArcticTable
import org.apache.amoro.spark.sql.parser._
import org.apache.amoro.spark.table.ArcticSparkTable
@@ -48,7 +47,6 @@ class ArcticSqlExtensionsParser(delegate: ParserInterface)
extends ParserInterfa
with SQLConfHelper {
private lazy val createTableAstBuilder = new ArcticSqlExtendAstBuilder()
- private lazy val arcticCommandAstVisitor = new ArcticCommandAstParser()
/**
* Parse a string to a DataType.
@@ -93,11 +91,6 @@ class ArcticSqlExtensionsParser(delegate: ParserInterface)
extends ParserInterfa
delegate.parseTableSchema(sqlText)
}
- def isArcticCommand(sqlText: String): Boolean = {
- val normalized =
sqlText.toLowerCase(Locale.ROOT).trim().replaceAll("\\s+", " ")
- (normalized.contains("migrate") && normalized.contains("to arctic"))
- }
-
private val arcticExtendSqlFilters: Seq[String => Boolean] = Seq(
s => s.contains("create table") && s.contains("primary key"),
s => s.contains("create temporary table") && s.contains("primary key"))
@@ -107,37 +100,30 @@ class ArcticSqlExtensionsParser(delegate:
ParserInterface) extends ParserInterfa
arcticExtendSqlFilters.exists(f => f(normalized))
}
- def buildLexer(sql: String): Option[Lexer] = {
+ private def buildLexer(sql: String): Option[Lexer] = {
lazy val charStream = new UpperCaseCharStream(CharStreams.fromString(sql))
if (isArcticExtendSql(sql)) {
Some(new ArcticSqlExtendLexer(charStream))
- } else if (isArcticCommand(sql)) {
- Some(new ArcticSqlCommandLexer(charStream))
} else {
Option.empty
}
}
- def buildAntlrParser(stream: TokenStream, lexer: Lexer): Parser = {
+ private def buildAntlrParser(stream: TokenStream, lexer: Lexer): Parser = {
lexer match {
case _: ArcticSqlExtendLexer =>
val parser = new ArcticSqlExtendParser(stream)
parser.legacy_exponent_literal_as_decimal_enabled =
conf.exponentLiteralAsDecimalEnabled
parser.SQL_standard_keyword_behavior = conf.ansiEnabled
parser
- case _: ArcticSqlCommandLexer =>
- val parser = new ArcticSqlCommandParser(stream)
- parser
case _ =>
throw new IllegalStateException("no suitable parser found")
}
}
- def toLogicalResult(parser: Parser): LogicalPlan = parser match {
+ private def toLogicalResult(parser: Parser): LogicalPlan = parser match {
case p: ArcticSqlExtendParser =>
createTableAstBuilder.visitExtendStatement(p.extendStatement())
- case p: ArcticSqlCommandParser =>
- arcticCommandAstVisitor.visitArcticCommand(p.arcticCommand())
}
/**
diff --git
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestArcticCommandSQL.java
b/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestArcticCommandSQL.java
deleted file mode 100644
index 9d9d6271f..000000000
---
a/amoro-mixed-format/amoro-mixed-format-spark/v3.3/amoro-mixed-format-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestArcticCommandSQL.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.amoro.spark.test.suites.sql;
-
-import org.apache.amoro.spark.test.MixedTableTestBase;
-import org.apache.amoro.spark.test.extensions.EnableCatalogSelect;
-import org.apache.amoro.spark.test.utils.TestTable;
-import org.apache.iceberg.types.Types;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import java.util.stream.Stream;
-
-@EnableCatalogSelect
[email protected](byTableFormat = true)
-public class TestArcticCommandSQL extends MixedTableTestBase {
-
- public static Stream<Arguments> testMigrate() {
- Types.NestedField[] fields = {
- Types.NestedField.required(1, "id", Types.IntegerType.get()),
- Types.NestedField.required(2, "data", Types.StringType.get()),
- Types.NestedField.required(3, "pt", Types.StringType.get())
- };
-
- return Stream.of(
- Arguments.arguments(fields, new String[0], SPARK_SESSION_CATALOG),
- Arguments.arguments(fields, new String[] {"pt"},
SPARK_SESSION_CATALOG),
- Arguments.arguments(fields, new String[0], MIXED_ICEBERG_CATALOG),
- Arguments.arguments(fields, new String[] {"pt"},
MIXED_ICEBERG_CATALOG));
- }
-
- @EnableCatalogSelect.SelectCatalog(use = SPARK_SESSION_CATALOG)
- @ParameterizedTest
- @MethodSource
- public void testMigrate(Types.NestedField[] fields, String[] pt, String
targetCatalog) {
-
- TestTable source = TestTable.format(MIXED_HIVE, fields).pt(pt).build();
- createHiveSource(source.hiveSchema, source.hivePartitions);
- sql(
- "insert overwrite "
- + source()
- + " values "
- + " ( 1, 'aaa', '0001' ), "
- + " ( 2, 'bbb', '0002' ) ");
-
- sql("CREATE DATABASE IF NOT EXISTS " + targetCatalog + "." +
target().database);
- sql("migrate " + source() + " to arctic " + targetCatalog + "." +
target());
- sql("DROP TABLE IF EXISTS " + targetCatalog + "." + target());
- }
-}