All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.hadoop.hive.ql.parse.HiveParser Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
// $ANTLR 3.5.2 org/apache/hadoop/hive/ql/parse/HiveParser.g 2019-08-13 11:57:39

package org.apache.hadoop.hive.ql.parse;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.conf.HiveConf;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

import org.antlr.runtime.tree.*;


/**
   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.
*/
@SuppressWarnings("all")
public class HiveParser extends Parser {
	public static final String[] tokenNames = new String[] {
		"", "", "", "", "AMPERSAND", "BITWISEOR", "BITWISEXOR", 
		"ByteLengthLiteral", "COLON", "COMMA", "CONCATENATE", "CharSetLiteral", 
		"CharSetName", "DIV", "DIVIDE", "DOLLAR", "DOT", "Digit", "EQUAL", "EQUAL_NS", 
		"Exponent", "GREATERTHAN", "GREATERTHANOREQUALTO", "HexDigit", "Identifier", 
		"IntegralLiteral", "KW_ABORT", "KW_ADD", "KW_ADMIN", "KW_AFTER", "KW_ALL", 
		"KW_ALTER", "KW_ANALYZE", "KW_AND", "KW_ARCHIVE", "KW_ARRAY", "KW_AS", 
		"KW_ASC", "KW_AUTHORIZATION", "KW_AUTOCOMMIT", "KW_BEFORE", "KW_BETWEEN", 
		"KW_BIGINT", "KW_BINARY", "KW_BOOLEAN", "KW_BOTH", "KW_BUCKET", "KW_BUCKETS", 
		"KW_BY", "KW_CACHE", "KW_CASCADE", "KW_CASE", "KW_CAST", "KW_CHANGE", 
		"KW_CHAR", "KW_CLUSTER", "KW_CLUSTERED", "KW_CLUSTERSTATUS", "KW_COLLECTION", 
		"KW_COLUMN", "KW_COLUMNS", "KW_COMMENT", "KW_COMMIT", "KW_COMPACT", "KW_COMPACTIONS", 
		"KW_COMPUTE", "KW_CONCATENATE", "KW_CONF", "KW_CONSTRAINT", "KW_CONTINUE", 
		"KW_CREATE", "KW_CROSS", "KW_CUBE", "KW_CURRENT", "KW_CURRENT_DATE", "KW_CURRENT_TIMESTAMP", 
		"KW_CURSOR", "KW_DATA", "KW_DATABASE", "KW_DATABASES", "KW_DATE", "KW_DATETIME", 
		"KW_DAY", "KW_DBPROPERTIES", "KW_DECIMAL", "KW_DEFERRED", "KW_DEFINED", 
		"KW_DELETE", "KW_DELIMITED", "KW_DEPENDENCY", "KW_DESC", "KW_DESCRIBE", 
		"KW_DETAIL", "KW_DIRECTORIES", "KW_DIRECTORY", "KW_DISABLE", "KW_DISTINCT", 
		"KW_DISTRIBUTE", "KW_DOUBLE", "KW_DOW", "KW_DROP", "KW_DUMP", "KW_ELEM_TYPE", 
		"KW_ELSE", "KW_ENABLE", "KW_END", "KW_ESCAPED", "KW_EXCEPT", "KW_EXCHANGE", 
		"KW_EXCLUSIVE", "KW_EXISTS", "KW_EXPLAIN", "KW_EXPORT", "KW_EXPRESSION", 
		"KW_EXTENDED", "KW_EXTERNAL", "KW_EXTRACT", "KW_FALSE", "KW_FETCH", "KW_FIELDS", 
		"KW_FILE", "KW_FILEFORMAT", "KW_FIRST", "KW_FLOAT", "KW_FLOOR", "KW_FOLLOWING", 
		"KW_FOR", "KW_FOREIGN", "KW_FORMAT", "KW_FORMATTED", "KW_FROM", "KW_FULL", 
		"KW_FUNCTION", "KW_FUNCTIONS", "KW_GRANT", "KW_GROUP", "KW_GROUPING", 
		"KW_HAVING", "KW_HOUR", "KW_IDXPROPERTIES", "KW_IF", "KW_IMPORT", "KW_IN", 
		"KW_INDEX", "KW_INDEXES", "KW_INNER", "KW_INPATH", "KW_INPUTDRIVER", "KW_INPUTFORMAT", 
		"KW_INSERT", "KW_INT", "KW_INTERSECT", "KW_INTERVAL", "KW_INTO", "KW_IS", 
		"KW_ISOLATION", "KW_ITEMS", "KW_JAR", "KW_JOIN", "KW_KEY", "KW_KEYS", 
		"KW_KEY_TYPE", "KW_LAST", "KW_LATERAL", "KW_LEFT", "KW_LESS", "KW_LEVEL", 
		"KW_LIKE", "KW_LIMIT", "KW_LINES", "KW_LOAD", "KW_LOCAL", "KW_LOCATION", 
		"KW_LOCK", "KW_LOCKS", "KW_LOGICAL", "KW_LONG", "KW_MACRO", "KW_MAP", 
		"KW_MAPJOIN", "KW_MATCHED", "KW_MATERIALIZED", "KW_MERGE", "KW_METADATA", 
		"KW_MINUS", "KW_MINUTE", "KW_MONTH", "KW_MORE", "KW_MSCK", "KW_NONE", 
		"KW_NORELY", "KW_NOSCAN", "KW_NOT", "KW_NOVALIDATE", "KW_NULL", "KW_NULLS", 
		"KW_OF", "KW_OFFSET", "KW_ON", "KW_ONLY", "KW_OPERATOR", "KW_OPTION", 
		"KW_OR", "KW_ORDER", "KW_OUT", "KW_OUTER", "KW_OUTPUTDRIVER", "KW_OUTPUTFORMAT", 
		"KW_OVER", "KW_OVERWRITE", "KW_OWNER", "KW_PARTIALSCAN", "KW_PARTITION", 
		"KW_PARTITIONED", "KW_PARTITIONS", "KW_PERCENT", "KW_PLUS", "KW_PRECEDING", 
		"KW_PRECISION", "KW_PRESERVE", "KW_PRETTY", "KW_PRIMARY", "KW_PRINCIPALS", 
		"KW_PROCEDURE", "KW_PURGE", "KW_QUARTER", "KW_RANGE", "KW_READ", "KW_READS", 
		"KW_REBUILD", "KW_RECORDREADER", "KW_RECORDWRITER", "KW_REDUCE", "KW_REFERENCES", 
		"KW_REGEXP", "KW_RELOAD", "KW_RELY", "KW_RENAME", "KW_REPAIR", "KW_REPL", 
		"KW_REPLACE", "KW_REPLICATION", "KW_RESTRICT", "KW_REVOKE", "KW_REWRITE", 
		"KW_RIGHT", "KW_RLIKE", "KW_ROLE", "KW_ROLES", "KW_ROLLBACK", "KW_ROLLUP", 
		"KW_ROW", "KW_ROWS", "KW_SCHEMA", "KW_SCHEMAS", "KW_SECOND", "KW_SELECT", 
		"KW_SEMI", "KW_SERDE", "KW_SERDEPROPERTIES", "KW_SERVER", "KW_SET", "KW_SETS", 
		"KW_SHARED", "KW_SHOW", "KW_SHOW_DATABASE", "KW_SKEWED", "KW_SMALLINT", 
		"KW_SNAPSHOT", "KW_SORT", "KW_SORTED", "KW_SSL", "KW_START", "KW_STATISTICS", 
		"KW_STATUS", "KW_STORED", "KW_STREAMTABLE", "KW_STRING", "KW_STRUCT", 
		"KW_SUMMARY", "KW_TABLE", "KW_TABLES", "KW_TABLESAMPLE", "KW_TBLPROPERTIES", 
		"KW_TEMPORARY", "KW_TERMINATED", "KW_THEN", "KW_TIMESTAMP", "KW_TINYINT", 
		"KW_TO", "KW_TOUCH", "KW_TRANSACTION", "KW_TRANSACTIONS", "KW_TRANSFORM", 
		"KW_TRIGGER", "KW_TRUE", "KW_TRUNCATE", "KW_UNARCHIVE", "KW_UNBOUNDED", 
		"KW_UNDO", "KW_UNION", "KW_UNIONTYPE", "KW_UNIQUEJOIN", "KW_UNLOCK", "KW_UNSET", 
		"KW_UNSIGNED", "KW_UPDATE", "KW_URI", "KW_USE", "KW_USER", "KW_USING", 
		"KW_UTC", "KW_UTCTIMESTAMP", "KW_VALIDATE", "KW_VALUES", "KW_VALUE_TYPE", 
		"KW_VARCHAR", "KW_VECTORIZATION", "KW_VIEW", "KW_VIEWS", "KW_WAIT", "KW_WEEK", 
		"KW_WHEN", "KW_WHERE", "KW_WHILE", "KW_WINDOW", "KW_WITH", "KW_WORK", 
		"KW_WRITE", "KW_YEAR", "LCURLY", "LESSTHAN", "LESSTHANOREQUALTO", "LINE_COMMENT", 
		"LPAREN", "LSQUARE", "Letter", "MINUS", "MOD", "NOTEQUAL", "Number", "NumberLiteral", 
		"PLUS", "QUERY_HINT", "QUESTION", "QuotedIdentifier", "RCURLY", "RPAREN", 
		"RSQUARE", "RegexComponent", "SEMICOLON", "STAR", "StringLiteral", "TILDE", 
		"WS", "KW_BATCH", "KW_DAYOFWEEK", "KW_HOLD_DDLTIME", "KW_IGNORE", "KW_NO_DROP", 
		"KW_OFFLINE", "KW_PROTECTION", "KW_READONLY", "TOK_ABORT_TRANSACTIONS", 
		"TOK_ADMIN_OPTION_FOR", "TOK_ALIASLIST", "TOK_ALLCOLREF", "TOK_ALTERDATABASE_OWNER", 
		"TOK_ALTERDATABASE_PROPERTIES", "TOK_ALTERINDEX_PROPERTIES", "TOK_ALTERINDEX_REBUILD", 
		"TOK_ALTERTABLE", "TOK_ALTERTABLE_ADDCOLS", "TOK_ALTERTABLE_ADDCONSTRAINT", 
		"TOK_ALTERTABLE_ADDPARTS", "TOK_ALTERTABLE_ARCHIVE", "TOK_ALTERTABLE_BUCKETS", 
		"TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION", "TOK_ALTERTABLE_CLUSTER_SORT", 
		"TOK_ALTERTABLE_COMPACT", "TOK_ALTERTABLE_DROPCONSTRAINT", "TOK_ALTERTABLE_DROPPARTS", 
		"TOK_ALTERTABLE_DROPPROPERTIES", "TOK_ALTERTABLE_EXCHANGEPARTITION", "TOK_ALTERTABLE_FILEFORMAT", 
		"TOK_ALTERTABLE_LOCATION", "TOK_ALTERTABLE_MERGEFILES", "TOK_ALTERTABLE_PARTCOLTYPE", 
		"TOK_ALTERTABLE_PROPERTIES", "TOK_ALTERTABLE_RENAME", "TOK_ALTERTABLE_RENAMECOL", 
		"TOK_ALTERTABLE_RENAMEPART", "TOK_ALTERTABLE_REPLACECOLS", "TOK_ALTERTABLE_SERDEPROPERTIES", 
		"TOK_ALTERTABLE_SERIALIZER", "TOK_ALTERTABLE_SKEWED", "TOK_ALTERTABLE_SKEWED_LOCATION", 
		"TOK_ALTERTABLE_TOUCH", "TOK_ALTERTABLE_UNARCHIVE", "TOK_ALTERTABLE_UPDATECOLSTATS", 
		"TOK_ALTERTABLE_UPDATESTATS", "TOK_ALTERVIEW", "TOK_ALTERVIEW_ADDPARTS", 
		"TOK_ALTERVIEW_DROPPARTS", "TOK_ALTERVIEW_DROPPROPERTIES", "TOK_ALTERVIEW_PROPERTIES", 
		"TOK_ALTERVIEW_RENAME", "TOK_ANALYZE", "TOK_ANONYMOUS", "TOK_ARCHIVE", 
		"TOK_BIGINT", "TOK_BINARY", "TOK_BLOCKING", "TOK_BOOLEAN", "TOK_CACHE_METADATA", 
		"TOK_CASCADE", "TOK_CHAR", "TOK_CHARSETLITERAL", "TOK_CLUSTERBY", "TOK_COLTYPELIST", 
		"TOK_COL_NAME", "TOK_COMMIT", "TOK_CREATEDATABASE", "TOK_CREATEFUNCTION", 
		"TOK_CREATEINDEX", "TOK_CREATEINDEX_INDEXTBLNAME", "TOK_CREATEMACRO", 
		"TOK_CREATEROLE", "TOK_CREATETABLE", "TOK_CREATEVIEW", "TOK_CREATE_MATERIALIZED_VIEW", 
		"TOK_CROSSJOIN", "TOK_CTE", "TOK_CUBE_GROUPBY", "TOK_DATABASECOMMENT", 
		"TOK_DATABASELOCATION", "TOK_DATABASEPROPERTIES", "TOK_DATE", "TOK_DATELITERAL", 
		"TOK_DATETIME", "TOK_DBPROPLIST", "TOK_DB_TYPE", "TOK_DECIMAL", "TOK_DEFERRED_REBUILDINDEX", 
		"TOK_DELETE", "TOK_DELETE_FROM", "TOK_DESCDATABASE", "TOK_DESCFUNCTION", 
		"TOK_DESCTABLE", "TOK_DESTINATION", "TOK_DETAIL", "TOK_DIR", "TOK_DISABLE", 
		"TOK_DISTRIBUTEBY", "TOK_DOUBLE", "TOK_DROPDATABASE", "TOK_DROPFUNCTION", 
		"TOK_DROPINDEX", "TOK_DROPMACRO", "TOK_DROPROLE", "TOK_DROPTABLE", "TOK_DROPVIEW", 
		"TOK_DROP_MATERIALIZED_VIEW", "TOK_ENABLE", "TOK_EXCEPTALL", "TOK_EXCEPTDISTINCT", 
		"TOK_EXPLAIN", "TOK_EXPLAIN_SQ_REWRITE", "TOK_EXPLIST", "TOK_EXPORT", 
		"TOK_EXPRESSION", "TOK_FALSE", "TOK_FILE", "TOK_FILEFORMAT_GENERIC", "TOK_FLOAT", 
		"TOK_FOREIGN_KEY", "TOK_FROM", "TOK_FULLOUTERJOIN", "TOK_FUNCTION", "TOK_FUNCTIONDI", 
		"TOK_FUNCTIONSTAR", "TOK_GRANT", "TOK_GRANT_OPTION_FOR", "TOK_GRANT_ROLE", 
		"TOK_GRANT_WITH_ADMIN_OPTION", "TOK_GRANT_WITH_OPTION", "TOK_GROUP", "TOK_GROUPBY", 
		"TOK_GROUPING_SETS", "TOK_GROUPING_SETS_EXPRESSION", "TOK_HAVING", "TOK_IFEXISTS", 
		"TOK_IFNOTEXISTS", "TOK_IMPORT", "TOK_INDEXCOMMENT", "TOK_INDEXPROPERTIES", 
		"TOK_INDEXPROPLIST", "TOK_INSERT", "TOK_INSERT_INTO", "TOK_INT", "TOK_INTERSECTALL", 
		"TOK_INTERSECTDISTINCT", "TOK_INTERVAL_DAY_LITERAL", "TOK_INTERVAL_DAY_TIME", 
		"TOK_INTERVAL_DAY_TIME_LITERAL", "TOK_INTERVAL_HOUR_LITERAL", "TOK_INTERVAL_MINUTE_LITERAL", 
		"TOK_INTERVAL_MONTH_LITERAL", "TOK_INTERVAL_SECOND_LITERAL", "TOK_INTERVAL_YEAR_LITERAL", 
		"TOK_INTERVAL_YEAR_MONTH", "TOK_INTERVAL_YEAR_MONTH_LITERAL", "TOK_ISNOTNULL", 
		"TOK_ISNULL", "TOK_ISOLATION_LEVEL", "TOK_ISOLATION_SNAPSHOT", "TOK_JAR", 
		"TOK_JOIN", "TOK_LATERAL_VIEW", "TOK_LATERAL_VIEW_OUTER", "TOK_LEFTOUTERJOIN", 
		"TOK_LEFTSEMIJOIN", "TOK_LENGTH", "TOK_LIKETABLE", "TOK_LIMIT", "TOK_LIST", 
		"TOK_LOAD", "TOK_LOCKDB", "TOK_LOCKTABLE", "TOK_MAP", "TOK_MATCHED", "TOK_MERGE", 
		"TOK_METADATA", "TOK_MSCK", "TOK_NORELY", "TOK_NOT_CLUSTERED", "TOK_NOT_MATCHED", 
		"TOK_NOT_SORTED", "TOK_NOVALIDATE", "TOK_NO_DROP", "TOK_NULL", "TOK_NULLS_FIRST", 
		"TOK_NULLS_LAST", "TOK_OFFLINE", "TOK_OFFSET", "TOK_ONLY", "TOK_OPERATOR", 
		"TOK_OP_ADD", "TOK_OP_AND", "TOK_OP_BITAND", "TOK_OP_BITNOT", "TOK_OP_BITOR", 
		"TOK_OP_BITXOR", "TOK_OP_DIV", "TOK_OP_EQ", "TOK_OP_GE", "TOK_OP_GT", 
		"TOK_OP_LE", "TOK_OP_LIKE", "TOK_OP_LT", "TOK_OP_MOD", "TOK_OP_MUL", "TOK_OP_NE", 
		"TOK_OP_NOT", "TOK_OP_OR", "TOK_OP_SUB", "TOK_ORDERBY", "TOK_ORREPLACE", 
		"TOK_PARTITIONINGSPEC", "TOK_PARTITIONLOCATION", "TOK_PARTSPEC", "TOK_PARTVAL", 
		"TOK_PERCENT", "TOK_PRIMARY_KEY", "TOK_PRINCIPAL_NAME", "TOK_PRIVILEGE", 
		"TOK_PRIVILEGE_LIST", "TOK_PRIV_ALL", "TOK_PRIV_ALTER_DATA", "TOK_PRIV_ALTER_METADATA", 
		"TOK_PRIV_CREATE", "TOK_PRIV_DELETE", "TOK_PRIV_DROP", "TOK_PRIV_INDEX", 
		"TOK_PRIV_INSERT", "TOK_PRIV_LOCK", "TOK_PRIV_OBJECT", "TOK_PRIV_OBJECT_COL", 
		"TOK_PRIV_SELECT", "TOK_PRIV_SHOW_DATABASE", "TOK_PTBLFUNCTION", "TOK_QUERY", 
		"TOK_READONLY", "TOK_RECORDREADER", "TOK_RECORDWRITER", "TOK_RELOADFUNCTION", 
		"TOK_RELY", "TOK_REPLICATION", "TOK_REPL_DUMP", "TOK_REPL_LOAD", "TOK_REPL_STATUS", 
		"TOK_RESOURCE_ALL", "TOK_RESOURCE_LIST", "TOK_RESOURCE_URI", "TOK_RESTRICT", 
		"TOK_REVOKE", "TOK_REVOKE_ROLE", "TOK_REWRITE_DISABLED", "TOK_REWRITE_ENABLED", 
		"TOK_RIGHTOUTERJOIN", "TOK_ROLE", "TOK_ROLLBACK", "TOK_ROLLUP_GROUPBY", 
		"TOK_ROWCOUNT", "TOK_SELECT", "TOK_SELECTDI", "TOK_SELEXPR", "TOK_SERDE", 
		"TOK_SERDENAME", "TOK_SERDEPROPS", "TOK_SERVER_TYPE", "TOK_SETCOLREF", 
		"TOK_SET_AUTOCOMMIT", "TOK_SET_COLUMNS_CLAUSE", "TOK_SHOWCOLUMNS", "TOK_SHOWCONF", 
		"TOK_SHOWDATABASES", "TOK_SHOWDBLOCKS", "TOK_SHOWFUNCTIONS", "TOK_SHOWINDEXES", 
		"TOK_SHOWLOCKS", "TOK_SHOWPARTITIONS", "TOK_SHOWTABLES", "TOK_SHOWVIEWS", 
		"TOK_SHOW_COMPACTIONS", "TOK_SHOW_CREATEDATABASE", "TOK_SHOW_CREATETABLE", 
		"TOK_SHOW_GRANT", "TOK_SHOW_ROLES", "TOK_SHOW_ROLE_GRANT", "TOK_SHOW_ROLE_PRINCIPALS", 
		"TOK_SHOW_SET_ROLE", "TOK_SHOW_TABLESTATUS", "TOK_SHOW_TBLPROPERTIES", 
		"TOK_SHOW_TRANSACTIONS", "TOK_SKEWED_LOCATIONS", "TOK_SKEWED_LOCATION_LIST", 
		"TOK_SKEWED_LOCATION_MAP", "TOK_SMALLINT", "TOK_SORTBY", "TOK_START_TRANSACTION", 
		"TOK_STORAGEHANDLER", "TOK_STOREDASDIRS", "TOK_STRING", "TOK_STRINGLITERALSEQUENCE", 
		"TOK_STRUCT", "TOK_SUBQUERY", "TOK_SUBQUERY_EXPR", "TOK_SUBQUERY_OP", 
		"TOK_SUBQUERY_OP_NOTEXISTS", "TOK_SUBQUERY_OP_NOTIN", "TOK_SUMMARY", "TOK_SWITCHDATABASE", 
		"TOK_TAB", "TOK_TABALIAS", "TOK_TABCOL", "TOK_TABCOLLIST", "TOK_TABCOLNAME", 
		"TOK_TABCOLVALUE", "TOK_TABCOLVALUES", "TOK_TABCOLVALUE_PAIR", "TOK_TABLEBUCKETSAMPLE", 
		"TOK_TABLECOMMENT", "TOK_TABLEFILEFORMAT", "TOK_TABLELOCATION", "TOK_TABLEPARTCOLS", 
		"TOK_TABLEPROPERTIES", "TOK_TABLEPROPERTY", "TOK_TABLEPROPLIST", "TOK_TABLEROWFORMAT", 
		"TOK_TABLEROWFORMATCOLLITEMS", "TOK_TABLEROWFORMATFIELD", "TOK_TABLEROWFORMATLINES", 
		"TOK_TABLEROWFORMATMAPKEYS", "TOK_TABLEROWFORMATNULL", "TOK_TABLESERIALIZER", 
		"TOK_TABLESKEWED", "TOK_TABLESPLITSAMPLE", "TOK_TABLE_OR_COL", "TOK_TABLE_PARTITION", 
		"TOK_TABLE_TYPE", "TOK_TABNAME", "TOK_TABREF", "TOK_TABSORTCOLNAMEASC", 
		"TOK_TABSORTCOLNAMEDESC", "TOK_TABSRC", "TOK_TABTYPE", "TOK_TEMPORARY", 
		"TOK_TIMESTAMP", "TOK_TIMESTAMPLITERAL", "TOK_TINYINT", "TOK_TMP_FILE", 
		"TOK_TO", "TOK_TRANSFORM", "TOK_TRUE", "TOK_TRUNCATETABLE", "TOK_TXN_ACCESS_MODE", 
		"TOK_TXN_READ_ONLY", "TOK_TXN_READ_WRITE", "TOK_UNIONALL", "TOK_UNIONDISTINCT", 
		"TOK_UNIONTYPE", "TOK_UNIQUEJOIN", "TOK_UNLOCKDB", "TOK_UNLOCKTABLE", 
		"TOK_UPDATE", "TOK_UPDATE_TABLE", "TOK_URI_TYPE", "TOK_USER", "TOK_USERSCRIPTCOLNAMES", 
		"TOK_USERSCRIPTCOLSCHEMA", "TOK_VALIDATE", "TOK_VALUES_TABLE", "TOK_VALUE_ROW", 
		"TOK_VARCHAR", "TOK_VIEWPARTCOLS", "TOK_VIRTUAL_TABLE", "TOK_VIRTUAL_TABREF", 
		"TOK_WHERE", "TOK_WINDOWDEF", "TOK_WINDOWRANGE", "TOK_WINDOWSPEC", "TOK_WINDOWVALUES"
	};
	public static final int EOF=-1;
	public static final int AMPERSAND=4;
	public static final int BITWISEOR=5;
	public static final int BITWISEXOR=6;
	public static final int ByteLengthLiteral=7;
	public static final int COLON=8;
	public static final int COMMA=9;
	public static final int CONCATENATE=10;
	public static final int CharSetLiteral=11;
	public static final int CharSetName=12;
	public static final int DIV=13;
	public static final int DIVIDE=14;
	public static final int DOLLAR=15;
	public static final int DOT=16;
	public static final int Digit=17;
	public static final int EQUAL=18;
	public static final int EQUAL_NS=19;
	public static final int Exponent=20;
	public static final int GREATERTHAN=21;
	public static final int GREATERTHANOREQUALTO=22;
	public static final int HexDigit=23;
	public static final int Identifier=24;
	public static final int IntegralLiteral=25;
	public static final int KW_ABORT=26;
	public static final int KW_ADD=27;
	public static final int KW_ADMIN=28;
	public static final int KW_AFTER=29;
	public static final int KW_ALL=30;
	public static final int KW_ALTER=31;
	public static final int KW_ANALYZE=32;
	public static final int KW_AND=33;
	public static final int KW_ARCHIVE=34;
	public static final int KW_ARRAY=35;
	public static final int KW_AS=36;
	public static final int KW_ASC=37;
	public static final int KW_AUTHORIZATION=38;
	public static final int KW_AUTOCOMMIT=39;
	public static final int KW_BEFORE=40;
	public static final int KW_BETWEEN=41;
	public static final int KW_BIGINT=42;
	public static final int KW_BINARY=43;
	public static final int KW_BOOLEAN=44;
	public static final int KW_BOTH=45;
	public static final int KW_BUCKET=46;
	public static final int KW_BUCKETS=47;
	public static final int KW_BY=48;
	public static final int KW_CACHE=49;
	public static final int KW_CASCADE=50;
	public static final int KW_CASE=51;
	public static final int KW_CAST=52;
	public static final int KW_CHANGE=53;
	public static final int KW_CHAR=54;
	public static final int KW_CLUSTER=55;
	public static final int KW_CLUSTERED=56;
	public static final int KW_CLUSTERSTATUS=57;
	public static final int KW_COLLECTION=58;
	public static final int KW_COLUMN=59;
	public static final int KW_COLUMNS=60;
	public static final int KW_COMMENT=61;
	public static final int KW_COMMIT=62;
	public static final int KW_COMPACT=63;
	public static final int KW_COMPACTIONS=64;
	public static final int KW_COMPUTE=65;
	public static final int KW_CONCATENATE=66;
	public static final int KW_CONF=67;
	public static final int KW_CONSTRAINT=68;
	public static final int KW_CONTINUE=69;
	public static final int KW_CREATE=70;
	public static final int KW_CROSS=71;
	public static final int KW_CUBE=72;
	public static final int KW_CURRENT=73;
	public static final int KW_CURRENT_DATE=74;
	public static final int KW_CURRENT_TIMESTAMP=75;
	public static final int KW_CURSOR=76;
	public static final int KW_DATA=77;
	public static final int KW_DATABASE=78;
	public static final int KW_DATABASES=79;
	public static final int KW_DATE=80;
	public static final int KW_DATETIME=81;
	public static final int KW_DAY=82;
	public static final int KW_DBPROPERTIES=83;
	public static final int KW_DECIMAL=84;
	public static final int KW_DEFERRED=85;
	public static final int KW_DEFINED=86;
	public static final int KW_DELETE=87;
	public static final int KW_DELIMITED=88;
	public static final int KW_DEPENDENCY=89;
	public static final int KW_DESC=90;
	public static final int KW_DESCRIBE=91;
	public static final int KW_DETAIL=92;
	public static final int KW_DIRECTORIES=93;
	public static final int KW_DIRECTORY=94;
	public static final int KW_DISABLE=95;
	public static final int KW_DISTINCT=96;
	public static final int KW_DISTRIBUTE=97;
	public static final int KW_DOUBLE=98;
	public static final int KW_DOW=99;
	public static final int KW_DROP=100;
	public static final int KW_DUMP=101;
	public static final int KW_ELEM_TYPE=102;
	public static final int KW_ELSE=103;
	public static final int KW_ENABLE=104;
	public static final int KW_END=105;
	public static final int KW_ESCAPED=106;
	public static final int KW_EXCEPT=107;
	public static final int KW_EXCHANGE=108;
	public static final int KW_EXCLUSIVE=109;
	public static final int KW_EXISTS=110;
	public static final int KW_EXPLAIN=111;
	public static final int KW_EXPORT=112;
	public static final int KW_EXPRESSION=113;
	public static final int KW_EXTENDED=114;
	public static final int KW_EXTERNAL=115;
	public static final int KW_EXTRACT=116;
	public static final int KW_FALSE=117;
	public static final int KW_FETCH=118;
	public static final int KW_FIELDS=119;
	public static final int KW_FILE=120;
	public static final int KW_FILEFORMAT=121;
	public static final int KW_FIRST=122;
	public static final int KW_FLOAT=123;
	public static final int KW_FLOOR=124;
	public static final int KW_FOLLOWING=125;
	public static final int KW_FOR=126;
	public static final int KW_FOREIGN=127;
	public static final int KW_FORMAT=128;
	public static final int KW_FORMATTED=129;
	public static final int KW_FROM=130;
	public static final int KW_FULL=131;
	public static final int KW_FUNCTION=132;
	public static final int KW_FUNCTIONS=133;
	public static final int KW_GRANT=134;
	public static final int KW_GROUP=135;
	public static final int KW_GROUPING=136;
	public static final int KW_HAVING=137;
	public static final int KW_HOUR=138;
	public static final int KW_IDXPROPERTIES=139;
	public static final int KW_IF=140;
	public static final int KW_IMPORT=141;
	public static final int KW_IN=142;
	public static final int KW_INDEX=143;
	public static final int KW_INDEXES=144;
	public static final int KW_INNER=145;
	public static final int KW_INPATH=146;
	public static final int KW_INPUTDRIVER=147;
	public static final int KW_INPUTFORMAT=148;
	public static final int KW_INSERT=149;
	public static final int KW_INT=150;
	public static final int KW_INTERSECT=151;
	public static final int KW_INTERVAL=152;
	public static final int KW_INTO=153;
	public static final int KW_IS=154;
	public static final int KW_ISOLATION=155;
	public static final int KW_ITEMS=156;
	public static final int KW_JAR=157;
	public static final int KW_JOIN=158;
	public static final int KW_KEY=159;
	public static final int KW_KEYS=160;
	public static final int KW_KEY_TYPE=161;
	public static final int KW_LAST=162;
	public static final int KW_LATERAL=163;
	public static final int KW_LEFT=164;
	public static final int KW_LESS=165;
	public static final int KW_LEVEL=166;
	public static final int KW_LIKE=167;
	public static final int KW_LIMIT=168;
	public static final int KW_LINES=169;
	public static final int KW_LOAD=170;
	public static final int KW_LOCAL=171;
	public static final int KW_LOCATION=172;
	public static final int KW_LOCK=173;
	public static final int KW_LOCKS=174;
	public static final int KW_LOGICAL=175;
	public static final int KW_LONG=176;
	public static final int KW_MACRO=177;
	public static final int KW_MAP=178;
	public static final int KW_MAPJOIN=179;
	public static final int KW_MATCHED=180;
	public static final int KW_MATERIALIZED=181;
	public static final int KW_MERGE=182;
	public static final int KW_METADATA=183;
	public static final int KW_MINUS=184;
	public static final int KW_MINUTE=185;
	public static final int KW_MONTH=186;
	public static final int KW_MORE=187;
	public static final int KW_MSCK=188;
	public static final int KW_NONE=189;
	public static final int KW_NORELY=190;
	public static final int KW_NOSCAN=191;
	public static final int KW_NOT=192;
	public static final int KW_NOVALIDATE=193;
	public static final int KW_NULL=194;
	public static final int KW_NULLS=195;
	public static final int KW_OF=196;
	public static final int KW_OFFSET=197;
	public static final int KW_ON=198;
	public static final int KW_ONLY=199;
	public static final int KW_OPERATOR=200;
	public static final int KW_OPTION=201;
	public static final int KW_OR=202;
	public static final int KW_ORDER=203;
	public static final int KW_OUT=204;
	public static final int KW_OUTER=205;
	public static final int KW_OUTPUTDRIVER=206;
	public static final int KW_OUTPUTFORMAT=207;
	public static final int KW_OVER=208;
	public static final int KW_OVERWRITE=209;
	public static final int KW_OWNER=210;
	public static final int KW_PARTIALSCAN=211;
	public static final int KW_PARTITION=212;
	public static final int KW_PARTITIONED=213;
	public static final int KW_PARTITIONS=214;
	public static final int KW_PERCENT=215;
	public static final int KW_PLUS=216;
	public static final int KW_PRECEDING=217;
	public static final int KW_PRECISION=218;
	public static final int KW_PRESERVE=219;
	public static final int KW_PRETTY=220;
	public static final int KW_PRIMARY=221;
	public static final int KW_PRINCIPALS=222;
	public static final int KW_PROCEDURE=223;
	public static final int KW_PURGE=224;
	public static final int KW_QUARTER=225;
	public static final int KW_RANGE=226;
	public static final int KW_READ=227;
	public static final int KW_READS=228;
	public static final int KW_REBUILD=229;
	public static final int KW_RECORDREADER=230;
	public static final int KW_RECORDWRITER=231;
	public static final int KW_REDUCE=232;
	public static final int KW_REFERENCES=233;
	public static final int KW_REGEXP=234;
	public static final int KW_RELOAD=235;
	public static final int KW_RELY=236;
	public static final int KW_RENAME=237;
	public static final int KW_REPAIR=238;
	public static final int KW_REPL=239;
	public static final int KW_REPLACE=240;
	public static final int KW_REPLICATION=241;
	public static final int KW_RESTRICT=242;
	public static final int KW_REVOKE=243;
	public static final int KW_REWRITE=244;
	public static final int KW_RIGHT=245;
	public static final int KW_RLIKE=246;
	public static final int KW_ROLE=247;
	public static final int KW_ROLES=248;
	public static final int KW_ROLLBACK=249;
	public static final int KW_ROLLUP=250;
	public static final int KW_ROW=251;
	public static final int KW_ROWS=252;
	public static final int KW_SCHEMA=253;
	public static final int KW_SCHEMAS=254;
	public static final int KW_SECOND=255;
	public static final int KW_SELECT=256;
	public static final int KW_SEMI=257;
	public static final int KW_SERDE=258;
	public static final int KW_SERDEPROPERTIES=259;
	public static final int KW_SERVER=260;
	public static final int KW_SET=261;
	public static final int KW_SETS=262;
	public static final int KW_SHARED=263;
	public static final int KW_SHOW=264;
	public static final int KW_SHOW_DATABASE=265;
	public static final int KW_SKEWED=266;
	public static final int KW_SMALLINT=267;
	public static final int KW_SNAPSHOT=268;
	public static final int KW_SORT=269;
	public static final int KW_SORTED=270;
	public static final int KW_SSL=271;
	public static final int KW_START=272;
	public static final int KW_STATISTICS=273;
	public static final int KW_STATUS=274;
	public static final int KW_STORED=275;
	public static final int KW_STREAMTABLE=276;
	public static final int KW_STRING=277;
	public static final int KW_STRUCT=278;
	public static final int KW_SUMMARY=279;
	public static final int KW_TABLE=280;
	public static final int KW_TABLES=281;
	public static final int KW_TABLESAMPLE=282;
	public static final int KW_TBLPROPERTIES=283;
	public static final int KW_TEMPORARY=284;
	public static final int KW_TERMINATED=285;
	public static final int KW_THEN=286;
	public static final int KW_TIMESTAMP=287;
	public static final int KW_TINYINT=288;
	public static final int KW_TO=289;
	public static final int KW_TOUCH=290;
	public static final int KW_TRANSACTION=291;
	public static final int KW_TRANSACTIONS=292;
	public static final int KW_TRANSFORM=293;
	public static final int KW_TRIGGER=294;
	public static final int KW_TRUE=295;
	public static final int KW_TRUNCATE=296;
	public static final int KW_UNARCHIVE=297;
	public static final int KW_UNBOUNDED=298;
	public static final int KW_UNDO=299;
	public static final int KW_UNION=300;
	public static final int KW_UNIONTYPE=301;
	public static final int KW_UNIQUEJOIN=302;
	public static final int KW_UNLOCK=303;
	public static final int KW_UNSET=304;
	public static final int KW_UNSIGNED=305;
	public static final int KW_UPDATE=306;
	public static final int KW_URI=307;
	public static final int KW_USE=308;
	public static final int KW_USER=309;
	public static final int KW_USING=310;
	public static final int KW_UTC=311;
	public static final int KW_UTCTIMESTAMP=312;
	public static final int KW_VALIDATE=313;
	public static final int KW_VALUES=314;
	public static final int KW_VALUE_TYPE=315;
	public static final int KW_VARCHAR=316;
	public static final int KW_VECTORIZATION=317;
	public static final int KW_VIEW=318;
	public static final int KW_VIEWS=319;
	public static final int KW_WAIT=320;
	public static final int KW_WEEK=321;
	public static final int KW_WHEN=322;
	public static final int KW_WHERE=323;
	public static final int KW_WHILE=324;
	public static final int KW_WINDOW=325;
	public static final int KW_WITH=326;
	public static final int KW_WORK=327;
	public static final int KW_WRITE=328;
	public static final int KW_YEAR=329;
	public static final int LCURLY=330;
	public static final int LESSTHAN=331;
	public static final int LESSTHANOREQUALTO=332;
	public static final int LINE_COMMENT=333;
	public static final int LPAREN=334;
	public static final int LSQUARE=335;
	public static final int Letter=336;
	public static final int MINUS=337;
	public static final int MOD=338;
	public static final int NOTEQUAL=339;
	public static final int Number=340;
	public static final int NumberLiteral=341;
	public static final int PLUS=342;
	public static final int QUERY_HINT=343;
	public static final int QUESTION=344;
	public static final int QuotedIdentifier=345;
	public static final int RCURLY=346;
	public static final int RPAREN=347;
	public static final int RSQUARE=348;
	public static final int RegexComponent=349;
	public static final int SEMICOLON=350;
	public static final int STAR=351;
	public static final int StringLiteral=352;
	public static final int TILDE=353;
	public static final int WS=354;
	public static final int KW_BATCH=384;
	public static final int KW_DAYOFWEEK=419;
	public static final int KW_HOLD_DDLTIME=462;
	public static final int KW_IGNORE=466;
	public static final int KW_NO_DROP=509;
	public static final int KW_OFFLINE=513;
	public static final int KW_PROTECTION=536;
	public static final int KW_READONLY=541;
	public static final int TOK_ABORT_TRANSACTIONS=648;
	public static final int TOK_ADMIN_OPTION_FOR=649;
	public static final int TOK_ALIASLIST=650;
	public static final int TOK_ALLCOLREF=651;
	public static final int TOK_ALTERDATABASE_OWNER=652;
	public static final int TOK_ALTERDATABASE_PROPERTIES=653;
	public static final int TOK_ALTERINDEX_PROPERTIES=654;
	public static final int TOK_ALTERINDEX_REBUILD=655;
	public static final int TOK_ALTERTABLE=656;
	public static final int TOK_ALTERTABLE_ADDCOLS=657;
	public static final int TOK_ALTERTABLE_ADDCONSTRAINT=658;
	public static final int TOK_ALTERTABLE_ADDPARTS=659;
	public static final int TOK_ALTERTABLE_ARCHIVE=660;
	public static final int TOK_ALTERTABLE_BUCKETS=661;
	public static final int TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION=662;
	public static final int TOK_ALTERTABLE_CLUSTER_SORT=663;
	public static final int TOK_ALTERTABLE_COMPACT=664;
	public static final int TOK_ALTERTABLE_DROPCONSTRAINT=665;
	public static final int TOK_ALTERTABLE_DROPPARTS=666;
	public static final int TOK_ALTERTABLE_DROPPROPERTIES=667;
	public static final int TOK_ALTERTABLE_EXCHANGEPARTITION=668;
	public static final int TOK_ALTERTABLE_FILEFORMAT=669;
	public static final int TOK_ALTERTABLE_LOCATION=670;
	public static final int TOK_ALTERTABLE_MERGEFILES=671;
	public static final int TOK_ALTERTABLE_PARTCOLTYPE=672;
	public static final int TOK_ALTERTABLE_PROPERTIES=673;
	public static final int TOK_ALTERTABLE_RENAME=674;
	public static final int TOK_ALTERTABLE_RENAMECOL=675;
	public static final int TOK_ALTERTABLE_RENAMEPART=676;
	public static final int TOK_ALTERTABLE_REPLACECOLS=677;
	public static final int TOK_ALTERTABLE_SERDEPROPERTIES=678;
	public static final int TOK_ALTERTABLE_SERIALIZER=679;
	public static final int TOK_ALTERTABLE_SKEWED=680;
	public static final int TOK_ALTERTABLE_SKEWED_LOCATION=681;
	public static final int TOK_ALTERTABLE_TOUCH=682;
	public static final int TOK_ALTERTABLE_UNARCHIVE=683;
	public static final int TOK_ALTERTABLE_UPDATECOLSTATS=684;
	public static final int TOK_ALTERTABLE_UPDATESTATS=685;
	public static final int TOK_ALTERVIEW=686;
	public static final int TOK_ALTERVIEW_ADDPARTS=687;
	public static final int TOK_ALTERVIEW_DROPPARTS=688;
	public static final int TOK_ALTERVIEW_DROPPROPERTIES=689;
	public static final int TOK_ALTERVIEW_PROPERTIES=690;
	public static final int TOK_ALTERVIEW_RENAME=691;
	public static final int TOK_ANALYZE=692;
	public static final int TOK_ANONYMOUS=693;
	public static final int TOK_ARCHIVE=694;
	public static final int TOK_BIGINT=695;
	public static final int TOK_BINARY=696;
	public static final int TOK_BLOCKING=697;
	public static final int TOK_BOOLEAN=698;
	public static final int TOK_CACHE_METADATA=699;
	public static final int TOK_CASCADE=700;
	public static final int TOK_CHAR=701;
	public static final int TOK_CHARSETLITERAL=702;
	public static final int TOK_CLUSTERBY=703;
	public static final int TOK_COLTYPELIST=704;
	public static final int TOK_COL_NAME=705;
	public static final int TOK_COMMIT=706;
	public static final int TOK_CREATEDATABASE=707;
	public static final int TOK_CREATEFUNCTION=708;
	public static final int TOK_CREATEINDEX=709;
	public static final int TOK_CREATEINDEX_INDEXTBLNAME=710;
	public static final int TOK_CREATEMACRO=711;
	public static final int TOK_CREATEROLE=712;
	public static final int TOK_CREATETABLE=713;
	public static final int TOK_CREATEVIEW=714;
	public static final int TOK_CREATE_MATERIALIZED_VIEW=715;
	public static final int TOK_CROSSJOIN=716;
	public static final int TOK_CTE=717;
	public static final int TOK_CUBE_GROUPBY=718;
	public static final int TOK_DATABASECOMMENT=719;
	public static final int TOK_DATABASELOCATION=720;
	public static final int TOK_DATABASEPROPERTIES=721;
	public static final int TOK_DATE=722;
	public static final int TOK_DATELITERAL=723;
	public static final int TOK_DATETIME=724;
	public static final int TOK_DBPROPLIST=725;
	public static final int TOK_DB_TYPE=726;
	public static final int TOK_DECIMAL=727;
	public static final int TOK_DEFERRED_REBUILDINDEX=728;
	public static final int TOK_DELETE=729;
	public static final int TOK_DELETE_FROM=730;
	public static final int TOK_DESCDATABASE=731;
	public static final int TOK_DESCFUNCTION=732;
	public static final int TOK_DESCTABLE=733;
	public static final int TOK_DESTINATION=734;
	public static final int TOK_DETAIL=735;
	public static final int TOK_DIR=736;
	public static final int TOK_DISABLE=737;
	public static final int TOK_DISTRIBUTEBY=738;
	public static final int TOK_DOUBLE=739;
	public static final int TOK_DROPDATABASE=740;
	public static final int TOK_DROPFUNCTION=741;
	public static final int TOK_DROPINDEX=742;
	public static final int TOK_DROPMACRO=743;
	public static final int TOK_DROPROLE=744;
	public static final int TOK_DROPTABLE=745;
	public static final int TOK_DROPVIEW=746;
	public static final int TOK_DROP_MATERIALIZED_VIEW=747;
	public static final int TOK_ENABLE=748;
	public static final int TOK_EXCEPTALL=749;
	public static final int TOK_EXCEPTDISTINCT=750;
	public static final int TOK_EXPLAIN=751;
	public static final int TOK_EXPLAIN_SQ_REWRITE=752;
	public static final int TOK_EXPLIST=753;
	public static final int TOK_EXPORT=754;
	public static final int TOK_EXPRESSION=755;
	public static final int TOK_FALSE=756;
	public static final int TOK_FILE=757;
	public static final int TOK_FILEFORMAT_GENERIC=758;
	public static final int TOK_FLOAT=759;
	public static final int TOK_FOREIGN_KEY=760;
	public static final int TOK_FROM=761;
	public static final int TOK_FULLOUTERJOIN=762;
	public static final int TOK_FUNCTION=763;
	public static final int TOK_FUNCTIONDI=764;
	public static final int TOK_FUNCTIONSTAR=765;
	public static final int TOK_GRANT=766;
	public static final int TOK_GRANT_OPTION_FOR=767;
	public static final int TOK_GRANT_ROLE=768;
	public static final int TOK_GRANT_WITH_ADMIN_OPTION=769;
	public static final int TOK_GRANT_WITH_OPTION=770;
	public static final int TOK_GROUP=771;
	public static final int TOK_GROUPBY=772;
	public static final int TOK_GROUPING_SETS=773;
	public static final int TOK_GROUPING_SETS_EXPRESSION=774;
	public static final int TOK_HAVING=775;
	public static final int TOK_IFEXISTS=776;
	public static final int TOK_IFNOTEXISTS=777;
	public static final int TOK_IMPORT=778;
	public static final int TOK_INDEXCOMMENT=779;
	public static final int TOK_INDEXPROPERTIES=780;
	public static final int TOK_INDEXPROPLIST=781;
	public static final int TOK_INSERT=782;
	public static final int TOK_INSERT_INTO=783;
	public static final int TOK_INT=784;
	public static final int TOK_INTERSECTALL=785;
	public static final int TOK_INTERSECTDISTINCT=786;
	public static final int TOK_INTERVAL_DAY_LITERAL=787;
	public static final int TOK_INTERVAL_DAY_TIME=788;
	public static final int TOK_INTERVAL_DAY_TIME_LITERAL=789;
	public static final int TOK_INTERVAL_HOUR_LITERAL=790;
	public static final int TOK_INTERVAL_MINUTE_LITERAL=791;
	public static final int TOK_INTERVAL_MONTH_LITERAL=792;
	public static final int TOK_INTERVAL_SECOND_LITERAL=793;
	public static final int TOK_INTERVAL_YEAR_LITERAL=794;
	public static final int TOK_INTERVAL_YEAR_MONTH=795;
	public static final int TOK_INTERVAL_YEAR_MONTH_LITERAL=796;
	public static final int TOK_ISNOTNULL=797;
	public static final int TOK_ISNULL=798;
	public static final int TOK_ISOLATION_LEVEL=799;
	public static final int TOK_ISOLATION_SNAPSHOT=800;
	public static final int TOK_JAR=801;
	public static final int TOK_JOIN=802;
	public static final int TOK_LATERAL_VIEW=803;
	public static final int TOK_LATERAL_VIEW_OUTER=804;
	public static final int TOK_LEFTOUTERJOIN=805;
	public static final int TOK_LEFTSEMIJOIN=806;
	public static final int TOK_LENGTH=807;
	public static final int TOK_LIKETABLE=808;
	public static final int TOK_LIMIT=809;
	public static final int TOK_LIST=810;
	public static final int TOK_LOAD=811;
	public static final int TOK_LOCKDB=812;
	public static final int TOK_LOCKTABLE=813;
	public static final int TOK_MAP=814;
	public static final int TOK_MATCHED=815;
	public static final int TOK_MERGE=816;
	public static final int TOK_METADATA=817;
	public static final int TOK_MSCK=818;
	public static final int TOK_NORELY=819;
	public static final int TOK_NOT_CLUSTERED=820;
	public static final int TOK_NOT_MATCHED=821;
	public static final int TOK_NOT_SORTED=822;
	public static final int TOK_NOVALIDATE=823;
	public static final int TOK_NO_DROP=824;
	public static final int TOK_NULL=825;
	public static final int TOK_NULLS_FIRST=826;
	public static final int TOK_NULLS_LAST=827;
	public static final int TOK_OFFLINE=828;
	public static final int TOK_OFFSET=829;
	public static final int TOK_ONLY=830;
	public static final int TOK_OPERATOR=831;
	public static final int TOK_OP_ADD=832;
	public static final int TOK_OP_AND=833;
	public static final int TOK_OP_BITAND=834;
	public static final int TOK_OP_BITNOT=835;
	public static final int TOK_OP_BITOR=836;
	public static final int TOK_OP_BITXOR=837;
	public static final int TOK_OP_DIV=838;
	public static final int TOK_OP_EQ=839;
	public static final int TOK_OP_GE=840;
	public static final int TOK_OP_GT=841;
	public static final int TOK_OP_LE=842;
	public static final int TOK_OP_LIKE=843;
	public static final int TOK_OP_LT=844;
	public static final int TOK_OP_MOD=845;
	public static final int TOK_OP_MUL=846;
	public static final int TOK_OP_NE=847;
	public static final int TOK_OP_NOT=848;
	public static final int TOK_OP_OR=849;
	public static final int TOK_OP_SUB=850;
	public static final int TOK_ORDERBY=851;
	public static final int TOK_ORREPLACE=852;
	public static final int TOK_PARTITIONINGSPEC=853;
	public static final int TOK_PARTITIONLOCATION=854;
	public static final int TOK_PARTSPEC=855;
	public static final int TOK_PARTVAL=856;
	public static final int TOK_PERCENT=857;
	public static final int TOK_PRIMARY_KEY=858;
	public static final int TOK_PRINCIPAL_NAME=859;
	public static final int TOK_PRIVILEGE=860;
	public static final int TOK_PRIVILEGE_LIST=861;
	public static final int TOK_PRIV_ALL=862;
	public static final int TOK_PRIV_ALTER_DATA=863;
	public static final int TOK_PRIV_ALTER_METADATA=864;
	public static final int TOK_PRIV_CREATE=865;
	public static final int TOK_PRIV_DELETE=866;
	public static final int TOK_PRIV_DROP=867;
	public static final int TOK_PRIV_INDEX=868;
	public static final int TOK_PRIV_INSERT=869;
	public static final int TOK_PRIV_LOCK=870;
	public static final int TOK_PRIV_OBJECT=871;
	public static final int TOK_PRIV_OBJECT_COL=872;
	public static final int TOK_PRIV_SELECT=873;
	public static final int TOK_PRIV_SHOW_DATABASE=874;
	public static final int TOK_PTBLFUNCTION=875;
	public static final int TOK_QUERY=876;
	public static final int TOK_READONLY=877;
	public static final int TOK_RECORDREADER=878;
	public static final int TOK_RECORDWRITER=879;
	public static final int TOK_RELOADFUNCTION=880;
	public static final int TOK_RELY=881;
	public static final int TOK_REPLICATION=882;
	public static final int TOK_REPL_DUMP=883;
	public static final int TOK_REPL_LOAD=884;
	public static final int TOK_REPL_STATUS=885;
	public static final int TOK_RESOURCE_ALL=886;
	public static final int TOK_RESOURCE_LIST=887;
	public static final int TOK_RESOURCE_URI=888;
	public static final int TOK_RESTRICT=889;
	public static final int TOK_REVOKE=890;
	public static final int TOK_REVOKE_ROLE=891;
	public static final int TOK_REWRITE_DISABLED=892;
	public static final int TOK_REWRITE_ENABLED=893;
	public static final int TOK_RIGHTOUTERJOIN=894;
	public static final int TOK_ROLE=895;
	public static final int TOK_ROLLBACK=896;
	public static final int TOK_ROLLUP_GROUPBY=897;
	public static final int TOK_ROWCOUNT=898;
	public static final int TOK_SELECT=899;
	public static final int TOK_SELECTDI=900;
	public static final int TOK_SELEXPR=901;
	public static final int TOK_SERDE=902;
	public static final int TOK_SERDENAME=903;
	public static final int TOK_SERDEPROPS=904;
	public static final int TOK_SERVER_TYPE=905;
	public static final int TOK_SETCOLREF=906;
	public static final int TOK_SET_AUTOCOMMIT=907;
	public static final int TOK_SET_COLUMNS_CLAUSE=908;
	public static final int TOK_SHOWCOLUMNS=909;
	public static final int TOK_SHOWCONF=910;
	public static final int TOK_SHOWDATABASES=911;
	public static final int TOK_SHOWDBLOCKS=912;
	public static final int TOK_SHOWFUNCTIONS=913;
	public static final int TOK_SHOWINDEXES=914;
	public static final int TOK_SHOWLOCKS=915;
	public static final int TOK_SHOWPARTITIONS=916;
	public static final int TOK_SHOWTABLES=917;
	public static final int TOK_SHOWVIEWS=918;
	public static final int TOK_SHOW_COMPACTIONS=919;
	public static final int TOK_SHOW_CREATEDATABASE=920;
	public static final int TOK_SHOW_CREATETABLE=921;
	public static final int TOK_SHOW_GRANT=922;
	public static final int TOK_SHOW_ROLES=923;
	public static final int TOK_SHOW_ROLE_GRANT=924;
	public static final int TOK_SHOW_ROLE_PRINCIPALS=925;
	public static final int TOK_SHOW_SET_ROLE=926;
	public static final int TOK_SHOW_TABLESTATUS=927;
	public static final int TOK_SHOW_TBLPROPERTIES=928;
	public static final int TOK_SHOW_TRANSACTIONS=929;
	public static final int TOK_SKEWED_LOCATIONS=930;
	public static final int TOK_SKEWED_LOCATION_LIST=931;
	public static final int TOK_SKEWED_LOCATION_MAP=932;
	public static final int TOK_SMALLINT=933;
	public static final int TOK_SORTBY=934;
	public static final int TOK_START_TRANSACTION=935;
	public static final int TOK_STORAGEHANDLER=936;
	public static final int TOK_STOREDASDIRS=937;
	public static final int TOK_STRING=938;
	public static final int TOK_STRINGLITERALSEQUENCE=939;
	public static final int TOK_STRUCT=940;
	public static final int TOK_SUBQUERY=941;
	public static final int TOK_SUBQUERY_EXPR=942;
	public static final int TOK_SUBQUERY_OP=943;
	public static final int TOK_SUBQUERY_OP_NOTEXISTS=944;
	public static final int TOK_SUBQUERY_OP_NOTIN=945;
	public static final int TOK_SUMMARY=946;
	public static final int TOK_SWITCHDATABASE=947;
	public static final int TOK_TAB=948;
	public static final int TOK_TABALIAS=949;
	public static final int TOK_TABCOL=950;
	public static final int TOK_TABCOLLIST=951;
	public static final int TOK_TABCOLNAME=952;
	public static final int TOK_TABCOLVALUE=953;
	public static final int TOK_TABCOLVALUES=954;
	public static final int TOK_TABCOLVALUE_PAIR=955;
	public static final int TOK_TABLEBUCKETSAMPLE=956;
	public static final int TOK_TABLECOMMENT=957;
	public static final int TOK_TABLEFILEFORMAT=958;
	public static final int TOK_TABLELOCATION=959;
	public static final int TOK_TABLEPARTCOLS=960;
	public static final int TOK_TABLEPROPERTIES=961;
	public static final int TOK_TABLEPROPERTY=962;
	public static final int TOK_TABLEPROPLIST=963;
	public static final int TOK_TABLEROWFORMAT=964;
	public static final int TOK_TABLEROWFORMATCOLLITEMS=965;
	public static final int TOK_TABLEROWFORMATFIELD=966;
	public static final int TOK_TABLEROWFORMATLINES=967;
	public static final int TOK_TABLEROWFORMATMAPKEYS=968;
	public static final int TOK_TABLEROWFORMATNULL=969;
	public static final int TOK_TABLESERIALIZER=970;
	public static final int TOK_TABLESKEWED=971;
	public static final int TOK_TABLESPLITSAMPLE=972;
	public static final int TOK_TABLE_OR_COL=973;
	public static final int TOK_TABLE_PARTITION=974;
	public static final int TOK_TABLE_TYPE=975;
	public static final int TOK_TABNAME=976;
	public static final int TOK_TABREF=977;
	public static final int TOK_TABSORTCOLNAMEASC=978;
	public static final int TOK_TABSORTCOLNAMEDESC=979;
	public static final int TOK_TABSRC=980;
	public static final int TOK_TABTYPE=981;
	public static final int TOK_TEMPORARY=982;
	public static final int TOK_TIMESTAMP=983;
	public static final int TOK_TIMESTAMPLITERAL=984;
	public static final int TOK_TINYINT=985;
	public static final int TOK_TMP_FILE=986;
	public static final int TOK_TO=987;
	public static final int TOK_TRANSFORM=988;
	public static final int TOK_TRUE=989;
	public static final int TOK_TRUNCATETABLE=990;
	public static final int TOK_TXN_ACCESS_MODE=991;
	public static final int TOK_TXN_READ_ONLY=992;
	public static final int TOK_TXN_READ_WRITE=993;
	public static final int TOK_UNIONALL=994;
	public static final int TOK_UNIONDISTINCT=995;
	public static final int TOK_UNIONTYPE=996;
	public static final int TOK_UNIQUEJOIN=997;
	public static final int TOK_UNLOCKDB=998;
	public static final int TOK_UNLOCKTABLE=999;
	public static final int TOK_UPDATE=1000;
	public static final int TOK_UPDATE_TABLE=1001;
	public static final int TOK_URI_TYPE=1002;
	public static final int TOK_USER=1003;
	public static final int TOK_USERSCRIPTCOLNAMES=1004;
	public static final int TOK_USERSCRIPTCOLSCHEMA=1005;
	public static final int TOK_VALIDATE=1006;
	public static final int TOK_VALUES_TABLE=1007;
	public static final int TOK_VALUE_ROW=1008;
	public static final int TOK_VARCHAR=1009;
	public static final int TOK_VIEWPARTCOLS=1010;
	public static final int TOK_VIRTUAL_TABLE=1011;
	public static final int TOK_VIRTUAL_TABREF=1012;
	public static final int TOK_WHERE=1013;
	public static final int TOK_WINDOWDEF=1014;
	public static final int TOK_WINDOWRANGE=1015;
	public static final int TOK_WINDOWSPEC=1016;
	public static final int TOK_WINDOWVALUES=1017;

	// delegates
	public HiveParser_SelectClauseParser gSelectClauseParser;
	public HiveParser_FromClauseParser gFromClauseParser;
	public HiveParser_IdentifiersParser gIdentifiersParser;
	public Parser[] getDelegates() {
		return new Parser[] {gSelectClauseParser, gFromClauseParser, gIdentifiersParser};
	}

	// delegators


	public HiveParser(TokenStream input) {
		this(input, new RecognizerSharedState());
	}
	public HiveParser(TokenStream input, RecognizerSharedState state) {
		super(input, state);
		gSelectClauseParser = new HiveParser_SelectClauseParser(input, state, this);
		gFromClauseParser = new HiveParser_FromClauseParser(input, state, this);
		gIdentifiersParser = new HiveParser_IdentifiersParser(input, state, this);
	}

	protected TreeAdaptor adaptor = new CommonTreeAdaptor();

	public void setTreeAdaptor(TreeAdaptor adaptor) {
		this.adaptor = adaptor;
		gSelectClauseParser.setTreeAdaptor(this.adaptor);gFromClauseParser.setTreeAdaptor(this.adaptor);gIdentifiersParser.setTreeAdaptor(this.adaptor);
	}
	public TreeAdaptor getTreeAdaptor() {
		return adaptor;
	}
	@Override public String[] getTokenNames() { return HiveParser.tokenNames; }
	@Override public String getGrammarFileName() { return "org/apache/hadoop/hive/ql/parse/HiveParser.g"; }


	  ArrayList errors = new ArrayList();
	  Stack msgs = new Stack();

	  private static HashMap xlateMap;
	  static {
	    //this is used to support auto completion in CLI
	    xlateMap = new HashMap();

	    // Keywords
	    xlateMap.put("KW_TRUE", "TRUE");
	    xlateMap.put("KW_FALSE", "FALSE");
	    xlateMap.put("KW_ALL", "ALL");
	    xlateMap.put("KW_NONE", "NONE");
	    xlateMap.put("KW_AND", "AND");
	    xlateMap.put("KW_OR", "OR");
	    xlateMap.put("KW_NOT", "NOT");
	    xlateMap.put("KW_LIKE", "LIKE");

	    xlateMap.put("KW_ASC", "ASC");
	    xlateMap.put("KW_DESC", "DESC");
	    xlateMap.put("KW_NULLS", "NULLS");
	    xlateMap.put("KW_LAST", "LAST");
	    xlateMap.put("KW_ORDER", "ORDER");
	    xlateMap.put("KW_BY", "BY");
	    xlateMap.put("KW_GROUP", "GROUP");
	    xlateMap.put("KW_WHERE", "WHERE");
	    xlateMap.put("KW_FROM", "FROM");
	    xlateMap.put("KW_AS", "AS");
	    xlateMap.put("KW_SELECT", "SELECT");
	    xlateMap.put("KW_DISTINCT", "DISTINCT");
	    xlateMap.put("KW_INSERT", "INSERT");
	    xlateMap.put("KW_OVERWRITE", "OVERWRITE");
	    xlateMap.put("KW_OUTER", "OUTER");
	    xlateMap.put("KW_JOIN", "JOIN");
	    xlateMap.put("KW_LEFT", "LEFT");
	    xlateMap.put("KW_RIGHT", "RIGHT");
	    xlateMap.put("KW_FULL", "FULL");
	    xlateMap.put("KW_ON", "ON");
	    xlateMap.put("KW_PARTITION", "PARTITION");
	    xlateMap.put("KW_PARTITIONS", "PARTITIONS");
	    xlateMap.put("KW_TABLE", "TABLE");
	    xlateMap.put("KW_TABLES", "TABLES");
	    xlateMap.put("KW_TBLPROPERTIES", "TBLPROPERTIES");
	    xlateMap.put("KW_SHOW", "SHOW");
	    xlateMap.put("KW_MSCK", "MSCK");
	    xlateMap.put("KW_DIRECTORY", "DIRECTORY");
	    xlateMap.put("KW_LOCAL", "LOCAL");
	    xlateMap.put("KW_TRANSFORM", "TRANSFORM");
	    xlateMap.put("KW_USING", "USING");
	    xlateMap.put("KW_CLUSTER", "CLUSTER");
	    xlateMap.put("KW_DISTRIBUTE", "DISTRIBUTE");
	    xlateMap.put("KW_SORT", "SORT");
	    xlateMap.put("KW_UNION", "UNION");
	    xlateMap.put("KW_INTERSECT", "INTERSECT");
	    xlateMap.put("KW_EXCEPT", "EXCEPT");
	    xlateMap.put("KW_LOAD", "LOAD");
	    xlateMap.put("KW_DATA", "DATA");
	    xlateMap.put("KW_INPATH", "INPATH");
	    xlateMap.put("KW_IS", "IS");
	    xlateMap.put("KW_NULL", "NULL");
	    xlateMap.put("KW_CREATE", "CREATE");
	    xlateMap.put("KW_EXTERNAL", "EXTERNAL");
	    xlateMap.put("KW_ALTER", "ALTER");
	    xlateMap.put("KW_DESCRIBE", "DESCRIBE");
	    xlateMap.put("KW_DROP", "DROP");
	    xlateMap.put("KW_RENAME", "RENAME");
	    xlateMap.put("KW_TO", "TO");
	    xlateMap.put("KW_COMMENT", "COMMENT");
	    xlateMap.put("KW_BOOLEAN", "BOOLEAN");
	    xlateMap.put("KW_TINYINT", "TINYINT");
	    xlateMap.put("KW_SMALLINT", "SMALLINT");
	    xlateMap.put("KW_INT", "INT");
	    xlateMap.put("KW_BIGINT", "BIGINT");
	    xlateMap.put("KW_FLOAT", "FLOAT");
	    xlateMap.put("KW_DOUBLE", "DOUBLE");
	    xlateMap.put("KW_PRECISION", "PRECISION");
	    xlateMap.put("KW_DATE", "DATE");
	    xlateMap.put("KW_DATETIME", "DATETIME");
	    xlateMap.put("KW_TIMESTAMP", "TIMESTAMP");
	    xlateMap.put("KW_STRING", "STRING");
	    xlateMap.put("KW_BINARY", "BINARY");
	    xlateMap.put("KW_ARRAY", "ARRAY");
	    xlateMap.put("KW_MAP", "MAP");
	    xlateMap.put("KW_REDUCE", "REDUCE");
	    xlateMap.put("KW_PARTITIONED", "PARTITIONED");
	    xlateMap.put("KW_CLUSTERED", "CLUSTERED");
	    xlateMap.put("KW_SORTED", "SORTED");
	    xlateMap.put("KW_INTO", "INTO");
	    xlateMap.put("KW_BUCKETS", "BUCKETS");
	    xlateMap.put("KW_ROW", "ROW");
	    xlateMap.put("KW_FORMAT", "FORMAT");
	    xlateMap.put("KW_DELIMITED", "DELIMITED");
	    xlateMap.put("KW_FIELDS", "FIELDS");
	    xlateMap.put("KW_TERMINATED", "TERMINATED");
	    xlateMap.put("KW_COLLECTION", "COLLECTION");
	    xlateMap.put("KW_ITEMS", "ITEMS");
	    xlateMap.put("KW_KEYS", "KEYS");
	    xlateMap.put("KW_KEY_TYPE", "$KEY$");
	    xlateMap.put("KW_LINES", "LINES");
	    xlateMap.put("KW_STORED", "STORED");
	    xlateMap.put("KW_SEQUENCEFILE", "SEQUENCEFILE");
	    xlateMap.put("KW_TEXTFILE", "TEXTFILE");
	    xlateMap.put("KW_INPUTFORMAT", "INPUTFORMAT");
	    xlateMap.put("KW_OUTPUTFORMAT", "OUTPUTFORMAT");
	    xlateMap.put("KW_LOCATION", "LOCATION");
	    xlateMap.put("KW_TABLESAMPLE", "TABLESAMPLE");
	    xlateMap.put("KW_BUCKET", "BUCKET");
	    xlateMap.put("KW_OUT", "OUT");
	    xlateMap.put("KW_OF", "OF");
	    xlateMap.put("KW_CAST", "CAST");
	    xlateMap.put("KW_ADD", "ADD");
	    xlateMap.put("KW_REPLACE", "REPLACE");
	    xlateMap.put("KW_COLUMNS", "COLUMNS");
	    xlateMap.put("KW_RLIKE", "RLIKE");
	    xlateMap.put("KW_REGEXP", "REGEXP");
	    xlateMap.put("KW_TEMPORARY", "TEMPORARY");
	    xlateMap.put("KW_FUNCTION", "FUNCTION");
	    xlateMap.put("KW_EXPLAIN", "EXPLAIN");
	    xlateMap.put("KW_EXTENDED", "EXTENDED");
	    xlateMap.put("KW_SERDE", "SERDE");
	    xlateMap.put("KW_WITH", "WITH");
	    xlateMap.put("KW_SERDEPROPERTIES", "SERDEPROPERTIES");
	    xlateMap.put("KW_LIMIT", "LIMIT");
	    xlateMap.put("KW_OFFSET", "OFFSET");
	    xlateMap.put("KW_SET", "SET");
	    xlateMap.put("KW_PROPERTIES", "TBLPROPERTIES");
	    xlateMap.put("KW_VALUE_TYPE", "$VALUE$");
	    xlateMap.put("KW_ELEM_TYPE", "$ELEM$");
	    xlateMap.put("KW_DEFINED", "DEFINED");
	    xlateMap.put("KW_SUBQUERY", "SUBQUERY");
	    xlateMap.put("KW_REWRITE", "REWRITE");
	    xlateMap.put("KW_UPDATE", "UPDATE");
	    xlateMap.put("KW_VALUES", "VALUES");
	    xlateMap.put("KW_PURGE", "PURGE");
	    xlateMap.put("KW_PRIMARY", "PRIMARY");
	    xlateMap.put("KW_FOREIGN", "FOREIGN");
	    xlateMap.put("KW_KEY", "KEY");
	    xlateMap.put("KW_REFERENCES", "REFERENCES");
	    xlateMap.put("KW_CONSTRAINT", "CONSTRAINT");
	    xlateMap.put("KW_ENABLE", "ENABLE");
	    xlateMap.put("KW_DISABLE", "DISABLE");
	    xlateMap.put("KW_VALIDATE", "VALIDATE");
	    xlateMap.put("KW_NOVALIDATE", "NOVALIDATE");
	    xlateMap.put("KW_RELY", "RELY");
	    xlateMap.put("KW_NORELY", "NORELY");
	    xlateMap.put("KW_ABORT", "ABORT");
	    xlateMap.put("KW_TRANSACTIONS", "TRANSACTIONS");
	    xlateMap.put("KW_COMPACTIONS", "COMPACTIONS");
	    xlateMap.put("KW_COMPACT", "COMPACT");
	    xlateMap.put("KW_WAIT", "WAIT");

	    // Operators
	    xlateMap.put("DOT", ".");
	    xlateMap.put("COLON", ":");
	    xlateMap.put("COMMA", ",");
	    xlateMap.put("SEMICOLON", ");");

	    xlateMap.put("LPAREN", "(");
	    xlateMap.put("RPAREN", ")");
	    xlateMap.put("LSQUARE", "[");
	    xlateMap.put("RSQUARE", "]");

	    xlateMap.put("EQUAL", "=");
	    xlateMap.put("NOTEQUAL", "<>");
	    xlateMap.put("EQUAL_NS", "<=>");
	    xlateMap.put("LESSTHANOREQUALTO", "<=");
	    xlateMap.put("LESSTHAN", "<");
	    xlateMap.put("GREATERTHANOREQUALTO", ">=");
	    xlateMap.put("GREATERTHAN", ">");

	    xlateMap.put("DIVIDE", "/");
	    xlateMap.put("PLUS", "+");
	    xlateMap.put("MINUS", "-");
	    xlateMap.put("STAR", "*");
	    xlateMap.put("MOD", "%");

	    xlateMap.put("AMPERSAND", "&");
	    xlateMap.put("TILDE", "~");
	    xlateMap.put("BITWISEOR", "|");
	    xlateMap.put("BITWISEXOR", "^");
	    xlateMap.put("CharSetLiteral", "\\'");
	  }

	  public static Collection getKeywords() {
	    return xlateMap.values();
	  }

	  private static String xlate(String name) {

	    String ret = xlateMap.get(name);
	    if (ret == null) {
	      ret = name;
	    }

	    return ret;
	  }

	  @Override
	  public Object recoverFromMismatchedSet(IntStream input,
	      RecognitionException re, BitSet follow) throws RecognitionException {
	    throw re;
	  }

	  @Override
	  public void displayRecognitionError(String[] tokenNames,
	      RecognitionException e) {
	    errors.add(new ParseError(this, e, tokenNames));
	  }

	  @Override
	  public String getErrorHeader(RecognitionException e) {
	    String header = null;
	    if (e.charPositionInLine < 0 && input.LT(-1) != null) {
	      Token t = input.LT(-1);
	      header = "line " + t.getLine() + ":" + t.getCharPositionInLine();
	    } else {
	      header = super.getErrorHeader(e);
	    }

	    return header;
	  }
	  
	  @Override
	  public String getErrorMessage(RecognitionException e, String[] tokenNames) {
	    String msg = null;

	    // Translate the token names to something that the user can understand
	    String[] xlateNames = new String[tokenNames.length];
	    for (int i = 0; i < tokenNames.length; ++i) {
	      xlateNames[i] = HiveParser.xlate(tokenNames[i]);
	    }

	    if (e instanceof NoViableAltException) {
	      @SuppressWarnings("unused")
	      NoViableAltException nvae = (NoViableAltException) e;
	      // for development, can add
	      // "decision=<<"+nvae.grammarDecisionDescription+">>"
	      // and "(decision="+nvae.decisionNumber+") and
	      // "state "+nvae.stateNumber
	      msg = "cannot recognize input near"
	              + (input.LT(1) != null ? " " + getTokenErrorDisplay(input.LT(1)) : "")
	              + (input.LT(2) != null ? " " + getTokenErrorDisplay(input.LT(2)) : "")
	              + (input.LT(3) != null ? " " + getTokenErrorDisplay(input.LT(3)) : "");
	    } else if (e instanceof MismatchedTokenException) {
	      MismatchedTokenException mte = (MismatchedTokenException) e;
	      msg = super.getErrorMessage(e, xlateNames) + (input.LT(-1) == null ? "":" near '" + input.LT(-1).getText()) + "'";
	    } else if (e instanceof FailedPredicateException) {
	      FailedPredicateException fpe = (FailedPredicateException) e;
	      msg = "Failed to recognize predicate '" + fpe.token.getText() + "'. Failed rule: '" + fpe.ruleName + "'";
	    } else {
	      msg = super.getErrorMessage(e, xlateNames);
	    }

	    if (msgs.size() > 0) {
	      msg = msg + " in " + msgs.peek();
	    }
	    return msg;
	  }
	  
	  public void pushMsg(String msg, RecognizerSharedState state) {
	    // ANTLR generated code does not wrap the @init code wit this backtracking check,
	    //  even if the matching @after has it. If we have parser rules with that are doing
	    // some lookahead with syntactic predicates this can cause the push() and pop() calls
	    // to become unbalanced, so make sure both push/pop check the backtracking state.
	    if (state.backtracking == 0) {
	      msgs.push(msg);
	    }
	  }

	  public void popMsg(RecognizerSharedState state) {
	    if (state.backtracking == 0) {
	      Object o = msgs.pop();
	    }
	  }

	  // counter to generate unique union aliases
	  private int aliasCounter;
	  private String generateUnionAlias() {
	    return "_u" + (++aliasCounter);
	  }
	  private char [] excludedCharForColumnName = {'.', ':'};
	  private boolean containExcludedCharForCreateTableColumnName(String input) {
	    for(char c : excludedCharForColumnName) {
	      if(input.indexOf(c)>-1) {
	        return true;
	      }
	    }
	    return false;
	  }
	  private CommonTree throwSetOpException() throws RecognitionException {
	    throw new FailedPredicateException(input, "orderByClause clusterByClause distributeByClause sortByClause limitClause can only be applied to the whole union.", "");
	  }
	  private CommonTree throwColumnNameException() throws RecognitionException {
	    throw new FailedPredicateException(input, Arrays.toString(excludedCharForColumnName) + " can not be used in column name in create table statement.", "");
	  }
	  private Configuration hiveConf;
	  public void setHiveConf(Configuration hiveConf) {
	    this.hiveConf = hiveConf;
	  }


	public static class statement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "statement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:725:1: statement : ( explainStatement EOF | execStatement EOF );
	public final HiveParser.statement_return statement() throws RecognitionException {
		HiveParser.statement_return retval = new HiveParser.statement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token EOF2=null;
		Token EOF4=null;
		ParserRuleReturnScope explainStatement1 =null;
		ParserRuleReturnScope execStatement3 =null;

		ASTNode EOF2_tree=null;
		ASTNode EOF4_tree=null;

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:726:2: ( explainStatement EOF | execStatement EOF )
			int alt1=2;
			int LA1_0 = input.LA(1);
			if ( (LA1_0==KW_EXPLAIN) ) {
				alt1=1;
			}
			else if ( (LA1_0==KW_ABORT||(LA1_0 >= KW_ALTER && LA1_0 <= KW_ANALYZE)||LA1_0==KW_COMMIT||LA1_0==KW_CREATE||LA1_0==KW_DELETE||(LA1_0 >= KW_DESC && LA1_0 <= KW_DESCRIBE)||LA1_0==KW_DROP||LA1_0==KW_EXPORT||LA1_0==KW_FROM||LA1_0==KW_GRANT||LA1_0==KW_IMPORT||LA1_0==KW_INSERT||LA1_0==KW_LOAD||LA1_0==KW_LOCK||LA1_0==KW_MAP||LA1_0==KW_MERGE||LA1_0==KW_MSCK||LA1_0==KW_REDUCE||LA1_0==KW_RELOAD||LA1_0==KW_REPL||LA1_0==KW_REVOKE||LA1_0==KW_ROLLBACK||LA1_0==KW_SELECT||LA1_0==KW_SET||LA1_0==KW_SHOW||LA1_0==KW_START||LA1_0==KW_TRUNCATE||LA1_0==KW_UNLOCK||LA1_0==KW_UPDATE||LA1_0==KW_USE||LA1_0==KW_WITH||LA1_0==LPAREN) ) {
				alt1=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 1, 0, input);
				throw nvae;
			}

			switch (alt1) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:726:4: explainStatement EOF
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_explainStatement_in_statement1193);
					explainStatement1=explainStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, explainStatement1.getTree());

					EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_statement1195); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					EOF2_tree = (ASTNode)adaptor.create(EOF2);
					adaptor.addChild(root_0, EOF2_tree);
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:727:4: execStatement EOF
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_execStatement_in_statement1200);
					execStatement3=execStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, execStatement3.getTree());

					EOF4=(Token)match(input,EOF,FOLLOW_EOF_in_statement1202); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					EOF4_tree = (ASTNode)adaptor.create(EOF4);
					adaptor.addChild(root_0, EOF4_tree);
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "statement"


	public static class explainStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "explainStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:730:1: explainStatement : KW_EXPLAIN ( ( explainOption )* execStatement -> ^( TOK_EXPLAIN execStatement ( explainOption )* ) | KW_REWRITE queryStatementExpression -> ^( TOK_EXPLAIN_SQ_REWRITE queryStatementExpression ) ) ;
	public final HiveParser.explainStatement_return explainStatement() throws RecognitionException {
		HiveParser.explainStatement_return retval = new HiveParser.explainStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_EXPLAIN5=null;
		Token KW_REWRITE8=null;
		ParserRuleReturnScope explainOption6 =null;
		ParserRuleReturnScope execStatement7 =null;
		ParserRuleReturnScope queryStatementExpression9 =null;

		ASTNode KW_EXPLAIN5_tree=null;
		ASTNode KW_REWRITE8_tree=null;
		RewriteRuleTokenStream stream_KW_REWRITE=new RewriteRuleTokenStream(adaptor,"token KW_REWRITE");
		RewriteRuleTokenStream stream_KW_EXPLAIN=new RewriteRuleTokenStream(adaptor,"token KW_EXPLAIN");
		RewriteRuleSubtreeStream stream_queryStatementExpression=new RewriteRuleSubtreeStream(adaptor,"rule queryStatementExpression");
		RewriteRuleSubtreeStream stream_explainOption=new RewriteRuleSubtreeStream(adaptor,"rule explainOption");
		RewriteRuleSubtreeStream stream_execStatement=new RewriteRuleSubtreeStream(adaptor,"rule execStatement");

		 pushMsg("explain statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:733:2: ( KW_EXPLAIN ( ( explainOption )* execStatement -> ^( TOK_EXPLAIN execStatement ( explainOption )* ) | KW_REWRITE queryStatementExpression -> ^( TOK_EXPLAIN_SQ_REWRITE queryStatementExpression ) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:733:4: KW_EXPLAIN ( ( explainOption )* execStatement -> ^( TOK_EXPLAIN execStatement ( explainOption )* ) | KW_REWRITE queryStatementExpression -> ^( TOK_EXPLAIN_SQ_REWRITE queryStatementExpression ) )
			{
			KW_EXPLAIN5=(Token)match(input,KW_EXPLAIN,FOLLOW_KW_EXPLAIN_in_explainStatement1223); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_EXPLAIN.add(KW_EXPLAIN5);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:733:15: ( ( explainOption )* execStatement -> ^( TOK_EXPLAIN execStatement ( explainOption )* ) | KW_REWRITE queryStatementExpression -> ^( TOK_EXPLAIN_SQ_REWRITE queryStatementExpression ) )
			int alt3=2;
			int LA3_0 = input.LA(1);
			if ( (LA3_0==KW_ABORT||(LA3_0 >= KW_ALTER && LA3_0 <= KW_ANALYZE)||LA3_0==KW_AUTHORIZATION||LA3_0==KW_COMMIT||LA3_0==KW_CREATE||LA3_0==KW_DELETE||(LA3_0 >= KW_DEPENDENCY && LA3_0 <= KW_DESCRIBE)||LA3_0==KW_DROP||LA3_0==KW_EXPORT||LA3_0==KW_EXTENDED||(LA3_0 >= KW_FORMATTED && LA3_0 <= KW_FROM)||LA3_0==KW_GRANT||LA3_0==KW_IMPORT||LA3_0==KW_INSERT||LA3_0==KW_LOAD||LA3_0==KW_LOCK||LA3_0==KW_LOGICAL||LA3_0==KW_MAP||LA3_0==KW_MERGE||LA3_0==KW_MSCK||LA3_0==KW_REDUCE||LA3_0==KW_RELOAD||LA3_0==KW_REPL||LA3_0==KW_REVOKE||LA3_0==KW_ROLLBACK||LA3_0==KW_SELECT||LA3_0==KW_SET||LA3_0==KW_SHOW||LA3_0==KW_START||LA3_0==KW_TRUNCATE||LA3_0==KW_UNLOCK||LA3_0==KW_UPDATE||LA3_0==KW_USE||LA3_0==KW_VECTORIZATION||LA3_0==KW_WITH||LA3_0==LPAREN) ) {
				alt3=1;
			}
			else if ( (LA3_0==KW_REWRITE) ) {
				alt3=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 3, 0, input);
				throw nvae;
			}

			switch (alt3) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:734:6: ( explainOption )* execStatement
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:734:6: ( explainOption )*
					loop2:
					while (true) {
						int alt2=2;
						alt2 = dfa2.predict(input);
						switch (alt2) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:734:6: explainOption
							{
							pushFollow(FOLLOW_explainOption_in_explainStatement1232);
							explainOption6=explainOption();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_explainOption.add(explainOption6.getTree());
							}
							break;

						default :
							break loop2;
						}
					}

					pushFollow(FOLLOW_execStatement_in_explainStatement1235);
					execStatement7=execStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_execStatement.add(execStatement7.getTree());
					// AST REWRITE
					// elements: explainOption, execStatement
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 734:35: -> ^( TOK_EXPLAIN execStatement ( explainOption )* )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:734:38: ^( TOK_EXPLAIN execStatement ( explainOption )* )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXPLAIN, "TOK_EXPLAIN"), root_1);
						adaptor.addChild(root_1, stream_execStatement.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:734:66: ( explainOption )*
						while ( stream_explainOption.hasNext() ) {
							adaptor.addChild(root_1, stream_explainOption.nextTree());
						}
						stream_explainOption.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:736:9: KW_REWRITE queryStatementExpression
					{
					KW_REWRITE8=(Token)match(input,KW_REWRITE,FOLLOW_KW_REWRITE_in_explainStatement1266); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_REWRITE.add(KW_REWRITE8);

					pushFollow(FOLLOW_queryStatementExpression_in_explainStatement1268);
					queryStatementExpression9=queryStatementExpression();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_queryStatementExpression.add(queryStatementExpression9.getTree());
					// AST REWRITE
					// elements: queryStatementExpression
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 736:45: -> ^( TOK_EXPLAIN_SQ_REWRITE queryStatementExpression )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:736:48: ^( TOK_EXPLAIN_SQ_REWRITE queryStatementExpression )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXPLAIN_SQ_REWRITE, "TOK_EXPLAIN_SQ_REWRITE"), root_1);
						adaptor.addChild(root_1, stream_queryStatementExpression.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "explainStatement"


	public static class explainOption_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "explainOption"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:739:1: explainOption : ( KW_EXTENDED | KW_FORMATTED | KW_DEPENDENCY | KW_LOGICAL | KW_AUTHORIZATION | KW_ANALYZE | ( KW_VECTORIZATION ( vectorizationOnly )? ( vectorizatonDetail )? ) );
	public final HiveParser.explainOption_return explainOption() throws RecognitionException {
		HiveParser.explainOption_return retval = new HiveParser.explainOption_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_EXTENDED10=null;
		Token KW_FORMATTED11=null;
		Token KW_DEPENDENCY12=null;
		Token KW_LOGICAL13=null;
		Token KW_AUTHORIZATION14=null;
		Token KW_ANALYZE15=null;
		Token KW_VECTORIZATION16=null;
		ParserRuleReturnScope vectorizationOnly17 =null;
		ParserRuleReturnScope vectorizatonDetail18 =null;

		ASTNode KW_EXTENDED10_tree=null;
		ASTNode KW_FORMATTED11_tree=null;
		ASTNode KW_DEPENDENCY12_tree=null;
		ASTNode KW_LOGICAL13_tree=null;
		ASTNode KW_AUTHORIZATION14_tree=null;
		ASTNode KW_ANALYZE15_tree=null;
		ASTNode KW_VECTORIZATION16_tree=null;

		 msgs.push("explain option"); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:5: ( KW_EXTENDED | KW_FORMATTED | KW_DEPENDENCY | KW_LOGICAL | KW_AUTHORIZATION | KW_ANALYZE | ( KW_VECTORIZATION ( vectorizationOnly )? ( vectorizatonDetail )? ) )
			int alt6=7;
			switch ( input.LA(1) ) {
			case KW_EXTENDED:
				{
				alt6=1;
				}
				break;
			case KW_FORMATTED:
				{
				alt6=2;
				}
				break;
			case KW_DEPENDENCY:
				{
				alt6=3;
				}
				break;
			case KW_LOGICAL:
				{
				alt6=4;
				}
				break;
			case KW_AUTHORIZATION:
				{
				alt6=5;
				}
				break;
			case KW_ANALYZE:
				{
				alt6=6;
				}
				break;
			case KW_VECTORIZATION:
				{
				alt6=7;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 6, 0, input);
				throw nvae;
			}
			switch (alt6) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:7: KW_EXTENDED
					{
					root_0 = (ASTNode)adaptor.nil();


					KW_EXTENDED10=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_explainOption1301); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_EXTENDED10_tree = (ASTNode)adaptor.create(KW_EXTENDED10);
					adaptor.addChild(root_0, KW_EXTENDED10_tree);
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:19: KW_FORMATTED
					{
					root_0 = (ASTNode)adaptor.nil();


					KW_FORMATTED11=(Token)match(input,KW_FORMATTED,FOLLOW_KW_FORMATTED_in_explainOption1303); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_FORMATTED11_tree = (ASTNode)adaptor.create(KW_FORMATTED11);
					adaptor.addChild(root_0, KW_FORMATTED11_tree);
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:32: KW_DEPENDENCY
					{
					root_0 = (ASTNode)adaptor.nil();


					KW_DEPENDENCY12=(Token)match(input,KW_DEPENDENCY,FOLLOW_KW_DEPENDENCY_in_explainOption1305); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_DEPENDENCY12_tree = (ASTNode)adaptor.create(KW_DEPENDENCY12);
					adaptor.addChild(root_0, KW_DEPENDENCY12_tree);
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:46: KW_LOGICAL
					{
					root_0 = (ASTNode)adaptor.nil();


					KW_LOGICAL13=(Token)match(input,KW_LOGICAL,FOLLOW_KW_LOGICAL_in_explainOption1307); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_LOGICAL13_tree = (ASTNode)adaptor.create(KW_LOGICAL13);
					adaptor.addChild(root_0, KW_LOGICAL13_tree);
					}

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:57: KW_AUTHORIZATION
					{
					root_0 = (ASTNode)adaptor.nil();


					KW_AUTHORIZATION14=(Token)match(input,KW_AUTHORIZATION,FOLLOW_KW_AUTHORIZATION_in_explainOption1309); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_AUTHORIZATION14_tree = (ASTNode)adaptor.create(KW_AUTHORIZATION14);
					adaptor.addChild(root_0, KW_AUTHORIZATION14_tree);
					}

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:742:74: KW_ANALYZE
					{
					root_0 = (ASTNode)adaptor.nil();


					KW_ANALYZE15=(Token)match(input,KW_ANALYZE,FOLLOW_KW_ANALYZE_in_explainOption1311); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_ANALYZE15_tree = (ASTNode)adaptor.create(KW_ANALYZE15);
					adaptor.addChild(root_0, KW_ANALYZE15_tree);
					}

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:7: ( KW_VECTORIZATION ( vectorizationOnly )? ( vectorizatonDetail )? )
					{
					root_0 = (ASTNode)adaptor.nil();


					// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:7: ( KW_VECTORIZATION ( vectorizationOnly )? ( vectorizatonDetail )? )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:8: KW_VECTORIZATION ( vectorizationOnly )? ( vectorizatonDetail )?
					{
					KW_VECTORIZATION16=(Token)match(input,KW_VECTORIZATION,FOLLOW_KW_VECTORIZATION_in_explainOption1321); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					KW_VECTORIZATION16_tree = (ASTNode)adaptor.create(KW_VECTORIZATION16);
					adaptor.addChild(root_0, KW_VECTORIZATION16_tree);
					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:25: ( vectorizationOnly )?
					int alt4=2;
					int LA4_0 = input.LA(1);
					if ( (LA4_0==KW_ONLY) ) {
						alt4=1;
					}
					switch (alt4) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:25: vectorizationOnly
							{
							pushFollow(FOLLOW_vectorizationOnly_in_explainOption1323);
							vectorizationOnly17=vectorizationOnly();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) adaptor.addChild(root_0, vectorizationOnly17.getTree());

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:44: ( vectorizatonDetail )?
					int alt5=2;
					int LA5_0 = input.LA(1);
					if ( (LA5_0==KW_DETAIL||LA5_0==KW_EXPRESSION||LA5_0==KW_OPERATOR||LA5_0==KW_SUMMARY) ) {
						alt5=1;
					}
					switch (alt5) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:743:44: vectorizatonDetail
							{
							pushFollow(FOLLOW_vectorizatonDetail_in_explainOption1326);
							vectorizatonDetail18=vectorizatonDetail();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) adaptor.addChild(root_0, vectorizatonDetail18.getTree());

							}
							break;

					}

					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { msgs.pop(); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "explainOption"


	public static class vectorizationOnly_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "vectorizationOnly"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:746:1: vectorizationOnly : KW_ONLY -> ^( TOK_ONLY ) ;
	public final HiveParser.vectorizationOnly_return vectorizationOnly() throws RecognitionException {
		HiveParser.vectorizationOnly_return retval = new HiveParser.vectorizationOnly_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ONLY19=null;

		ASTNode KW_ONLY19_tree=null;
		RewriteRuleTokenStream stream_KW_ONLY=new RewriteRuleTokenStream(adaptor,"token KW_ONLY");

		 pushMsg("vectorization's only clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:749:5: ( KW_ONLY -> ^( TOK_ONLY ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:749:7: KW_ONLY
			{
			KW_ONLY19=(Token)match(input,KW_ONLY,FOLLOW_KW_ONLY_in_vectorizationOnly1355); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ONLY.add(KW_ONLY19);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 750:5: -> ^( TOK_ONLY )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:750:8: ^( TOK_ONLY )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ONLY, "TOK_ONLY"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "vectorizationOnly"


	public static class vectorizatonDetail_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "vectorizatonDetail"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:753:1: vectorizatonDetail : ( KW_SUMMARY -> ^( TOK_SUMMARY ) | KW_OPERATOR -> ^( TOK_OPERATOR ) | KW_EXPRESSION -> ^( TOK_EXPRESSION ) | KW_DETAIL -> ^( TOK_DETAIL ) );
	public final HiveParser.vectorizatonDetail_return vectorizatonDetail() throws RecognitionException {
		HiveParser.vectorizatonDetail_return retval = new HiveParser.vectorizatonDetail_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SUMMARY20=null;
		Token KW_OPERATOR21=null;
		Token KW_EXPRESSION22=null;
		Token KW_DETAIL23=null;

		ASTNode KW_SUMMARY20_tree=null;
		ASTNode KW_OPERATOR21_tree=null;
		ASTNode KW_EXPRESSION22_tree=null;
		ASTNode KW_DETAIL23_tree=null;
		RewriteRuleTokenStream stream_KW_SUMMARY=new RewriteRuleTokenStream(adaptor,"token KW_SUMMARY");
		RewriteRuleTokenStream stream_KW_DETAIL=new RewriteRuleTokenStream(adaptor,"token KW_DETAIL");
		RewriteRuleTokenStream stream_KW_OPERATOR=new RewriteRuleTokenStream(adaptor,"token KW_OPERATOR");
		RewriteRuleTokenStream stream_KW_EXPRESSION=new RewriteRuleTokenStream(adaptor,"token KW_EXPRESSION");

		 pushMsg("vectorization's detail level clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:756:5: ( KW_SUMMARY -> ^( TOK_SUMMARY ) | KW_OPERATOR -> ^( TOK_OPERATOR ) | KW_EXPRESSION -> ^( TOK_EXPRESSION ) | KW_DETAIL -> ^( TOK_DETAIL ) )
			int alt7=4;
			switch ( input.LA(1) ) {
			case KW_SUMMARY:
				{
				alt7=1;
				}
				break;
			case KW_OPERATOR:
				{
				alt7=2;
				}
				break;
			case KW_EXPRESSION:
				{
				alt7=3;
				}
				break;
			case KW_DETAIL:
				{
				alt7=4;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 7, 0, input);
				throw nvae;
			}
			switch (alt7) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:756:7: KW_SUMMARY
					{
					KW_SUMMARY20=(Token)match(input,KW_SUMMARY,FOLLOW_KW_SUMMARY_in_vectorizatonDetail1392); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SUMMARY.add(KW_SUMMARY20);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 757:5: -> ^( TOK_SUMMARY )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:757:8: ^( TOK_SUMMARY )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUMMARY, "TOK_SUMMARY"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:758:7: KW_OPERATOR
					{
					KW_OPERATOR21=(Token)match(input,KW_OPERATOR,FOLLOW_KW_OPERATOR_in_vectorizatonDetail1410); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OPERATOR.add(KW_OPERATOR21);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 759:5: -> ^( TOK_OPERATOR )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:759:8: ^( TOK_OPERATOR )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_OPERATOR, "TOK_OPERATOR"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:760:7: KW_EXPRESSION
					{
					KW_EXPRESSION22=(Token)match(input,KW_EXPRESSION,FOLLOW_KW_EXPRESSION_in_vectorizatonDetail1428); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_EXPRESSION.add(KW_EXPRESSION22);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 761:5: -> ^( TOK_EXPRESSION )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:761:8: ^( TOK_EXPRESSION )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXPRESSION, "TOK_EXPRESSION"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:762:7: KW_DETAIL
					{
					KW_DETAIL23=(Token)match(input,KW_DETAIL,FOLLOW_KW_DETAIL_in_vectorizatonDetail1446); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DETAIL.add(KW_DETAIL23);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 763:5: -> ^( TOK_DETAIL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:763:8: ^( TOK_DETAIL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DETAIL, "TOK_DETAIL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "vectorizatonDetail"


	public static class execStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "execStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:766:1: execStatement : ( queryStatementExpression | loadStatement | exportStatement | importStatement | replDumpStatement | replLoadStatement | replStatusStatement | ddlStatement | deleteStatement | updateStatement | sqlTransactionStatement | mergeStatement );
	public final HiveParser.execStatement_return execStatement() throws RecognitionException {
		HiveParser.execStatement_return retval = new HiveParser.execStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope queryStatementExpression24 =null;
		ParserRuleReturnScope loadStatement25 =null;
		ParserRuleReturnScope exportStatement26 =null;
		ParserRuleReturnScope importStatement27 =null;
		ParserRuleReturnScope replDumpStatement28 =null;
		ParserRuleReturnScope replLoadStatement29 =null;
		ParserRuleReturnScope replStatusStatement30 =null;
		ParserRuleReturnScope ddlStatement31 =null;
		ParserRuleReturnScope deleteStatement32 =null;
		ParserRuleReturnScope updateStatement33 =null;
		ParserRuleReturnScope sqlTransactionStatement34 =null;
		ParserRuleReturnScope mergeStatement35 =null;


		 pushMsg("statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:769:5: ( queryStatementExpression | loadStatement | exportStatement | importStatement | replDumpStatement | replLoadStatement | replStatusStatement | ddlStatement | deleteStatement | updateStatement | sqlTransactionStatement | mergeStatement )
			int alt8=12;
			switch ( input.LA(1) ) {
			case KW_FROM:
			case KW_INSERT:
			case KW_MAP:
			case KW_REDUCE:
			case KW_SELECT:
			case KW_WITH:
			case LPAREN:
				{
				alt8=1;
				}
				break;
			case KW_LOAD:
				{
				alt8=2;
				}
				break;
			case KW_EXPORT:
				{
				alt8=3;
				}
				break;
			case KW_IMPORT:
				{
				alt8=4;
				}
				break;
			case KW_REPL:
				{
				switch ( input.LA(2) ) {
				case KW_DUMP:
					{
					alt8=5;
					}
					break;
				case KW_LOAD:
					{
					alt8=6;
					}
					break;
				case KW_STATUS:
					{
					alt8=7;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 8, 11, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
				}
				break;
			case KW_ABORT:
			case KW_ALTER:
			case KW_ANALYZE:
			case KW_CREATE:
			case KW_DESC:
			case KW_DESCRIBE:
			case KW_DROP:
			case KW_GRANT:
			case KW_LOCK:
			case KW_MSCK:
			case KW_RELOAD:
			case KW_REVOKE:
			case KW_SHOW:
			case KW_TRUNCATE:
			case KW_UNLOCK:
			case KW_USE:
				{
				alt8=8;
				}
				break;
			case KW_SET:
				{
				int LA8_27 = input.LA(2);
				if ( (LA8_27==KW_ROLE) ) {
					alt8=8;
				}
				else if ( (LA8_27==KW_AUTOCOMMIT) ) {
					alt8=11;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 8, 27, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_DELETE:
				{
				alt8=9;
				}
				break;
			case KW_UPDATE:
				{
				alt8=10;
				}
				break;
			case KW_COMMIT:
			case KW_ROLLBACK:
			case KW_START:
				{
				alt8=11;
				}
				break;
			case KW_MERGE:
				{
				alt8=12;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 8, 0, input);
				throw nvae;
			}
			switch (alt8) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:769:7: queryStatementExpression
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_queryStatementExpression_in_execStatement1483);
					queryStatementExpression24=queryStatementExpression();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, queryStatementExpression24.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:770:7: loadStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_loadStatement_in_execStatement1491);
					loadStatement25=loadStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, loadStatement25.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:771:7: exportStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_exportStatement_in_execStatement1499);
					exportStatement26=exportStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, exportStatement26.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:772:7: importStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_importStatement_in_execStatement1507);
					importStatement27=importStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, importStatement27.getTree());

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:773:7: replDumpStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_replDumpStatement_in_execStatement1515);
					replDumpStatement28=replDumpStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, replDumpStatement28.getTree());

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:774:7: replLoadStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_replLoadStatement_in_execStatement1523);
					replLoadStatement29=replLoadStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, replLoadStatement29.getTree());

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:775:7: replStatusStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_replStatusStatement_in_execStatement1531);
					replStatusStatement30=replStatusStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, replStatusStatement30.getTree());

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:776:7: ddlStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_ddlStatement_in_execStatement1539);
					ddlStatement31=ddlStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, ddlStatement31.getTree());

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:777:7: deleteStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_deleteStatement_in_execStatement1547);
					deleteStatement32=deleteStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, deleteStatement32.getTree());

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:778:7: updateStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_updateStatement_in_execStatement1555);
					updateStatement33=updateStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, updateStatement33.getTree());

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:779:7: sqlTransactionStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_sqlTransactionStatement_in_execStatement1563);
					sqlTransactionStatement34=sqlTransactionStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, sqlTransactionStatement34.getTree());

					}
					break;
				case 12 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:780:7: mergeStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_mergeStatement_in_execStatement1571);
					mergeStatement35=mergeStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, mergeStatement35.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "execStatement"


	public static class loadStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "loadStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:783:1: loadStatement : KW_LOAD KW_DATA (islocal= KW_LOCAL )? KW_INPATH (path= StringLiteral ) (isoverwrite= KW_OVERWRITE )? KW_INTO KW_TABLE (tab= tableOrPartition ) -> ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? ) ;
	public final HiveParser.loadStatement_return loadStatement() throws RecognitionException {
		HiveParser.loadStatement_return retval = new HiveParser.loadStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token islocal=null;
		Token path=null;
		Token isoverwrite=null;
		Token KW_LOAD36=null;
		Token KW_DATA37=null;
		Token KW_INPATH38=null;
		Token KW_INTO39=null;
		Token KW_TABLE40=null;
		ParserRuleReturnScope tab =null;

		ASTNode islocal_tree=null;
		ASTNode path_tree=null;
		ASTNode isoverwrite_tree=null;
		ASTNode KW_LOAD36_tree=null;
		ASTNode KW_DATA37_tree=null;
		ASTNode KW_INPATH38_tree=null;
		ASTNode KW_INTO39_tree=null;
		ASTNode KW_TABLE40_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_INTO=new RewriteRuleTokenStream(adaptor,"token KW_INTO");
		RewriteRuleTokenStream stream_KW_INPATH=new RewriteRuleTokenStream(adaptor,"token KW_INPATH");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_OVERWRITE=new RewriteRuleTokenStream(adaptor,"token KW_OVERWRITE");
		RewriteRuleTokenStream stream_KW_LOAD=new RewriteRuleTokenStream(adaptor,"token KW_LOAD");
		RewriteRuleTokenStream stream_KW_DATA=new RewriteRuleTokenStream(adaptor,"token KW_DATA");
		RewriteRuleTokenStream stream_KW_LOCAL=new RewriteRuleTokenStream(adaptor,"token KW_LOCAL");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");

		 pushMsg("load statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:5: ( KW_LOAD KW_DATA (islocal= KW_LOCAL )? KW_INPATH (path= StringLiteral ) (isoverwrite= KW_OVERWRITE )? KW_INTO KW_TABLE (tab= tableOrPartition ) -> ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:7: KW_LOAD KW_DATA (islocal= KW_LOCAL )? KW_INPATH (path= StringLiteral ) (isoverwrite= KW_OVERWRITE )? KW_INTO KW_TABLE (tab= tableOrPartition )
			{
			KW_LOAD36=(Token)match(input,KW_LOAD,FOLLOW_KW_LOAD_in_loadStatement1598); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOAD.add(KW_LOAD36);

			KW_DATA37=(Token)match(input,KW_DATA,FOLLOW_KW_DATA_in_loadStatement1600); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DATA.add(KW_DATA37);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:23: (islocal= KW_LOCAL )?
			int alt9=2;
			int LA9_0 = input.LA(1);
			if ( (LA9_0==KW_LOCAL) ) {
				alt9=1;
			}
			switch (alt9) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:24: islocal= KW_LOCAL
					{
					islocal=(Token)match(input,KW_LOCAL,FOLLOW_KW_LOCAL_in_loadStatement1605); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LOCAL.add(islocal);

					}
					break;

			}

			KW_INPATH38=(Token)match(input,KW_INPATH,FOLLOW_KW_INPATH_in_loadStatement1609); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INPATH.add(KW_INPATH38);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:53: (path= StringLiteral )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:54: path= StringLiteral
			{
			path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_loadStatement1614); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(path);

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:74: (isoverwrite= KW_OVERWRITE )?
			int alt10=2;
			int LA10_0 = input.LA(1);
			if ( (LA10_0==KW_OVERWRITE) ) {
				alt10=1;
			}
			switch (alt10) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:75: isoverwrite= KW_OVERWRITE
					{
					isoverwrite=(Token)match(input,KW_OVERWRITE,FOLLOW_KW_OVERWRITE_in_loadStatement1620); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OVERWRITE.add(isoverwrite);

					}
					break;

			}

			KW_INTO39=(Token)match(input,KW_INTO,FOLLOW_KW_INTO_in_loadStatement1624); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INTO.add(KW_INTO39);

			KW_TABLE40=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_loadStatement1626); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE40);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:119: (tab= tableOrPartition )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:786:120: tab= tableOrPartition
			{
			pushFollow(FOLLOW_tableOrPartition_in_loadStatement1631);
			tab=tableOrPartition();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableOrPartition.add(tab.getTree());
			}

			// AST REWRITE
			// elements: islocal, isoverwrite, tab, path
			// token labels: islocal, path, isoverwrite
			// rule labels: tab, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_islocal=new RewriteRuleTokenStream(adaptor,"token islocal",islocal);
			RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
			RewriteRuleTokenStream stream_isoverwrite=new RewriteRuleTokenStream(adaptor,"token isoverwrite",isoverwrite);
			RewriteRuleSubtreeStream stream_tab=new RewriteRuleSubtreeStream(adaptor,"rule tab",tab!=null?tab.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 787:5: -> ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:787:8: ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LOAD, "TOK_LOAD"), root_1);
				adaptor.addChild(root_1, stream_path.nextNode());
				adaptor.addChild(root_1, stream_tab.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:787:31: ( $islocal)?
				if ( stream_islocal.hasNext() ) {
					adaptor.addChild(root_1, stream_islocal.nextNode());
				}
				stream_islocal.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:787:41: ( $isoverwrite)?
				if ( stream_isoverwrite.hasNext() ) {
					adaptor.addChild(root_1, stream_isoverwrite.nextNode());
				}
				stream_isoverwrite.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "loadStatement"


	public static class replicationClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "replicationClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:790:1: replicationClause : KW_FOR (isMetadataOnly= KW_METADATA )? KW_REPLICATION LPAREN (replId= StringLiteral ) RPAREN -> ^( TOK_REPLICATION $replId ( $isMetadataOnly)? ) ;
	public final HiveParser.replicationClause_return replicationClause() throws RecognitionException {
		HiveParser.replicationClause_return retval = new HiveParser.replicationClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token isMetadataOnly=null;
		Token replId=null;
		Token KW_FOR41=null;
		Token KW_REPLICATION42=null;
		Token LPAREN43=null;
		Token RPAREN44=null;

		ASTNode isMetadataOnly_tree=null;
		ASTNode replId_tree=null;
		ASTNode KW_FOR41_tree=null;
		ASTNode KW_REPLICATION42_tree=null;
		ASTNode LPAREN43_tree=null;
		ASTNode RPAREN44_tree=null;
		RewriteRuleTokenStream stream_KW_REPLICATION=new RewriteRuleTokenStream(adaptor,"token KW_REPLICATION");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,"token KW_FOR");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_METADATA=new RewriteRuleTokenStream(adaptor,"token KW_METADATA");

		 pushMsg("replication clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:793:5: ( KW_FOR (isMetadataOnly= KW_METADATA )? KW_REPLICATION LPAREN (replId= StringLiteral ) RPAREN -> ^( TOK_REPLICATION $replId ( $isMetadataOnly)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:793:7: KW_FOR (isMetadataOnly= KW_METADATA )? KW_REPLICATION LPAREN (replId= StringLiteral ) RPAREN
			{
			KW_FOR41=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_replicationClause1683); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOR.add(KW_FOR41);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:793:14: (isMetadataOnly= KW_METADATA )?
			int alt11=2;
			int LA11_0 = input.LA(1);
			if ( (LA11_0==KW_METADATA) ) {
				alt11=1;
			}
			switch (alt11) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:793:15: isMetadataOnly= KW_METADATA
					{
					isMetadataOnly=(Token)match(input,KW_METADATA,FOLLOW_KW_METADATA_in_replicationClause1688); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_METADATA.add(isMetadataOnly);

					}
					break;

			}

			KW_REPLICATION42=(Token)match(input,KW_REPLICATION,FOLLOW_KW_REPLICATION_in_replicationClause1692); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REPLICATION.add(KW_REPLICATION42);

			LPAREN43=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_replicationClause1694); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN43);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:793:66: (replId= StringLiteral )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:793:67: replId= StringLiteral
			{
			replId=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_replicationClause1699); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(replId);

			}

			RPAREN44=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_replicationClause1702); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN44);

			// AST REWRITE
			// elements: replId, isMetadataOnly
			// token labels: replId, isMetadataOnly
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_replId=new RewriteRuleTokenStream(adaptor,"token replId",replId);
			RewriteRuleTokenStream stream_isMetadataOnly=new RewriteRuleTokenStream(adaptor,"token isMetadataOnly",isMetadataOnly);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 794:5: -> ^( TOK_REPLICATION $replId ( $isMetadataOnly)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:794:8: ^( TOK_REPLICATION $replId ( $isMetadataOnly)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REPLICATION, "TOK_REPLICATION"), root_1);
				adaptor.addChild(root_1, stream_replId.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:794:35: ( $isMetadataOnly)?
				if ( stream_isMetadataOnly.hasNext() ) {
					adaptor.addChild(root_1, stream_isMetadataOnly.nextNode());
				}
				stream_isMetadataOnly.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "replicationClause"


	public static class exportStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "exportStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:797:1: exportStatement : KW_EXPORT KW_TABLE (tab= tableOrPartition ) KW_TO (path= StringLiteral ) ( replicationClause )? -> ^( TOK_EXPORT $tab $path ( replicationClause )? ) ;
	public final HiveParser.exportStatement_return exportStatement() throws RecognitionException {
		HiveParser.exportStatement_return retval = new HiveParser.exportStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token path=null;
		Token KW_EXPORT45=null;
		Token KW_TABLE46=null;
		Token KW_TO47=null;
		ParserRuleReturnScope tab =null;
		ParserRuleReturnScope replicationClause48 =null;

		ASTNode path_tree=null;
		ASTNode KW_EXPORT45_tree=null;
		ASTNode KW_TABLE46_tree=null;
		ASTNode KW_TO47_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_TO=new RewriteRuleTokenStream(adaptor,"token KW_TO");
		RewriteRuleTokenStream stream_KW_EXPORT=new RewriteRuleTokenStream(adaptor,"token KW_EXPORT");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");
		RewriteRuleSubtreeStream stream_replicationClause=new RewriteRuleSubtreeStream(adaptor,"rule replicationClause");

		 pushMsg("export statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:800:5: ( KW_EXPORT KW_TABLE (tab= tableOrPartition ) KW_TO (path= StringLiteral ) ( replicationClause )? -> ^( TOK_EXPORT $tab $path ( replicationClause )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:800:7: KW_EXPORT KW_TABLE (tab= tableOrPartition ) KW_TO (path= StringLiteral ) ( replicationClause )?
			{
			KW_EXPORT45=(Token)match(input,KW_EXPORT,FOLLOW_KW_EXPORT_in_exportStatement1746); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_EXPORT.add(KW_EXPORT45);

			KW_TABLE46=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_exportStatement1754); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE46);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:801:16: (tab= tableOrPartition )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:801:17: tab= tableOrPartition
			{
			pushFollow(FOLLOW_tableOrPartition_in_exportStatement1759);
			tab=tableOrPartition();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableOrPartition.add(tab.getTree());
			}

			KW_TO47=(Token)match(input,KW_TO,FOLLOW_KW_TO_in_exportStatement1768); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TO.add(KW_TO47);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:802:13: (path= StringLiteral )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:802:14: path= StringLiteral
			{
			path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_exportStatement1773); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(path);

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:803:7: ( replicationClause )?
			int alt12=2;
			int LA12_0 = input.LA(1);
			if ( (LA12_0==KW_FOR) ) {
				alt12=1;
			}
			switch (alt12) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:803:7: replicationClause
					{
					pushFollow(FOLLOW_replicationClause_in_exportStatement1782);
					replicationClause48=replicationClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_replicationClause.add(replicationClause48.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tab, replicationClause, path
			// token labels: path
			// rule labels: tab, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
			RewriteRuleSubtreeStream stream_tab=new RewriteRuleSubtreeStream(adaptor,"rule tab",tab!=null?tab.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 804:5: -> ^( TOK_EXPORT $tab $path ( replicationClause )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:804:8: ^( TOK_EXPORT $tab $path ( replicationClause )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXPORT, "TOK_EXPORT"), root_1);
				adaptor.addChild(root_1, stream_tab.nextTree());
				adaptor.addChild(root_1, stream_path.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:804:32: ( replicationClause )?
				if ( stream_replicationClause.hasNext() ) {
					adaptor.addChild(root_1, stream_replicationClause.nextTree());
				}
				stream_replicationClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "exportStatement"


	public static class importStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "importStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:807:1: importStatement : KW_IMPORT ( (ext= KW_EXTERNAL )? KW_TABLE (tab= tableOrPartition ) )? KW_FROM (path= StringLiteral ) ( tableLocation )? -> ^( TOK_IMPORT $path ( $tab)? ( $ext)? ( tableLocation )? ) ;
	public final HiveParser.importStatement_return importStatement() throws RecognitionException {
		HiveParser.importStatement_return retval = new HiveParser.importStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token ext=null;
		Token path=null;
		Token KW_IMPORT49=null;
		Token KW_TABLE50=null;
		Token KW_FROM51=null;
		ParserRuleReturnScope tab =null;
		ParserRuleReturnScope tableLocation52 =null;

		ASTNode ext_tree=null;
		ASTNode path_tree=null;
		ASTNode KW_IMPORT49_tree=null;
		ASTNode KW_TABLE50_tree=null;
		ASTNode KW_FROM51_tree=null;
		RewriteRuleTokenStream stream_KW_EXTERNAL=new RewriteRuleTokenStream(adaptor,"token KW_EXTERNAL");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_IMPORT=new RewriteRuleTokenStream(adaptor,"token KW_IMPORT");
		RewriteRuleSubtreeStream stream_tableLocation=new RewriteRuleSubtreeStream(adaptor,"rule tableLocation");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");

		 pushMsg("import statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:810:8: ( KW_IMPORT ( (ext= KW_EXTERNAL )? KW_TABLE (tab= tableOrPartition ) )? KW_FROM (path= StringLiteral ) ( tableLocation )? -> ^( TOK_IMPORT $path ( $tab)? ( $ext)? ( tableLocation )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:810:10: KW_IMPORT ( (ext= KW_EXTERNAL )? KW_TABLE (tab= tableOrPartition ) )? KW_FROM (path= StringLiteral ) ( tableLocation )?
			{
			KW_IMPORT49=(Token)match(input,KW_IMPORT,FOLLOW_KW_IMPORT_in_importStatement1832); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_IMPORT.add(KW_IMPORT49);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:811:10: ( (ext= KW_EXTERNAL )? KW_TABLE (tab= tableOrPartition ) )?
			int alt14=2;
			int LA14_0 = input.LA(1);
			if ( (LA14_0==KW_EXTERNAL||LA14_0==KW_TABLE) ) {
				alt14=1;
			}
			switch (alt14) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:811:11: (ext= KW_EXTERNAL )? KW_TABLE (tab= tableOrPartition )
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:811:11: (ext= KW_EXTERNAL )?
					int alt13=2;
					int LA13_0 = input.LA(1);
					if ( (LA13_0==KW_EXTERNAL) ) {
						alt13=1;
					}
					switch (alt13) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:811:12: ext= KW_EXTERNAL
							{
							ext=(Token)match(input,KW_EXTERNAL,FOLLOW_KW_EXTERNAL_in_importStatement1847); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_EXTERNAL.add(ext);

							}
							break;

					}

					KW_TABLE50=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_importStatement1851); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE50);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:811:39: (tab= tableOrPartition )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:811:40: tab= tableOrPartition
					{
					pushFollow(FOLLOW_tableOrPartition_in_importStatement1856);
					tab=tableOrPartition();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableOrPartition.add(tab.getTree());
					}

					}
					break;

			}

			KW_FROM51=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_importStatement1870); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM51);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:812:18: (path= StringLiteral )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:812:19: path= StringLiteral
			{
			path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_importStatement1875); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(path);

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:813:10: ( tableLocation )?
			int alt15=2;
			int LA15_0 = input.LA(1);
			if ( (LA15_0==KW_LOCATION) ) {
				alt15=1;
			}
			switch (alt15) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:813:10: tableLocation
					{
					pushFollow(FOLLOW_tableLocation_in_importStatement1887);
					tableLocation52=tableLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableLocation.add(tableLocation52.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: path, ext, tableLocation, tab
			// token labels: ext, path
			// rule labels: tab, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_ext=new RewriteRuleTokenStream(adaptor,"token ext",ext);
			RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
			RewriteRuleSubtreeStream stream_tab=new RewriteRuleSubtreeStream(adaptor,"rule tab",tab!=null?tab.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 814:5: -> ^( TOK_IMPORT $path ( $tab)? ( $ext)? ( tableLocation )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:814:8: ^( TOK_IMPORT $path ( $tab)? ( $ext)? ( tableLocation )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_IMPORT, "TOK_IMPORT"), root_1);
				adaptor.addChild(root_1, stream_path.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:814:28: ( $tab)?
				if ( stream_tab.hasNext() ) {
					adaptor.addChild(root_1, stream_tab.nextTree());
				}
				stream_tab.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:814:34: ( $ext)?
				if ( stream_ext.hasNext() ) {
					adaptor.addChild(root_1, stream_ext.nextNode());
				}
				stream_ext.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:814:39: ( tableLocation )?
				if ( stream_tableLocation.hasNext() ) {
					adaptor.addChild(root_1, stream_tableLocation.nextTree());
				}
				stream_tableLocation.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "importStatement"


	public static class replDumpStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "replDumpStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:817:1: replDumpStatement : KW_REPL KW_DUMP (dbName= identifier ) ( DOT tblName= identifier )? ( KW_FROM (eventId= Number ) ( KW_TO (rangeEnd= Number ) )? ( KW_LIMIT (batchSize= Number ) )? )? -> ^( TOK_REPL_DUMP $dbName ( $tblName)? ( ^( TOK_FROM $eventId ( TOK_TO $rangeEnd)? ( TOK_LIMIT $batchSize)? ) )? ) ;
	public final HiveParser.replDumpStatement_return replDumpStatement() throws RecognitionException {
		HiveParser.replDumpStatement_return retval = new HiveParser.replDumpStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token eventId=null;
		Token rangeEnd=null;
		Token batchSize=null;
		Token KW_REPL53=null;
		Token KW_DUMP54=null;
		Token DOT55=null;
		Token KW_FROM56=null;
		Token KW_TO57=null;
		Token KW_LIMIT58=null;
		ParserRuleReturnScope dbName =null;
		ParserRuleReturnScope tblName =null;

		ASTNode eventId_tree=null;
		ASTNode rangeEnd_tree=null;
		ASTNode batchSize_tree=null;
		ASTNode KW_REPL53_tree=null;
		ASTNode KW_DUMP54_tree=null;
		ASTNode DOT55_tree=null;
		ASTNode KW_FROM56_tree=null;
		ASTNode KW_TO57_tree=null;
		ASTNode KW_LIMIT58_tree=null;
		RewriteRuleTokenStream stream_KW_DUMP=new RewriteRuleTokenStream(adaptor,"token KW_DUMP");
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_TO=new RewriteRuleTokenStream(adaptor,"token KW_TO");
		RewriteRuleTokenStream stream_KW_REPL=new RewriteRuleTokenStream(adaptor,"token KW_REPL");
		RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleTokenStream stream_KW_LIMIT=new RewriteRuleTokenStream(adaptor,"token KW_LIMIT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("replication dump statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:820:7: ( KW_REPL KW_DUMP (dbName= identifier ) ( DOT tblName= identifier )? ( KW_FROM (eventId= Number ) ( KW_TO (rangeEnd= Number ) )? ( KW_LIMIT (batchSize= Number ) )? )? -> ^( TOK_REPL_DUMP $dbName ( $tblName)? ( ^( TOK_FROM $eventId ( TOK_TO $rangeEnd)? ( TOK_LIMIT $batchSize)? ) )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:820:9: KW_REPL KW_DUMP (dbName= identifier ) ( DOT tblName= identifier )? ( KW_FROM (eventId= Number ) ( KW_TO (rangeEnd= Number ) )? ( KW_LIMIT (batchSize= Number ) )? )?
			{
			KW_REPL53=(Token)match(input,KW_REPL,FOLLOW_KW_REPL_in_replDumpStatement1941); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REPL.add(KW_REPL53);

			KW_DUMP54=(Token)match(input,KW_DUMP,FOLLOW_KW_DUMP_in_replDumpStatement1943); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DUMP.add(KW_DUMP54);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:821:9: (dbName= identifier )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:821:10: dbName= identifier
			{
			pushFollow(FOLLOW_identifier_in_replDumpStatement1956);
			dbName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(dbName.getTree());
			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:821:29: ( DOT tblName= identifier )?
			int alt16=2;
			int LA16_0 = input.LA(1);
			if ( (LA16_0==DOT) ) {
				alt16=1;
			}
			switch (alt16) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:821:30: DOT tblName= identifier
					{
					DOT55=(Token)match(input,DOT,FOLLOW_DOT_in_replDumpStatement1960); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_DOT.add(DOT55);

					pushFollow(FOLLOW_identifier_in_replDumpStatement1964);
					tblName=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(tblName.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:822:9: ( KW_FROM (eventId= Number ) ( KW_TO (rangeEnd= Number ) )? ( KW_LIMIT (batchSize= Number ) )? )?
			int alt19=2;
			int LA19_0 = input.LA(1);
			if ( (LA19_0==KW_FROM) ) {
				alt19=1;
			}
			switch (alt19) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:822:10: KW_FROM (eventId= Number ) ( KW_TO (rangeEnd= Number ) )? ( KW_LIMIT (batchSize= Number ) )?
					{
					KW_FROM56=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_replDumpStatement1977); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM56);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:822:18: (eventId= Number )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:822:19: eventId= Number
					{
					eventId=(Token)match(input,Number,FOLLOW_Number_in_replDumpStatement1982); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(eventId);

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:823:11: ( KW_TO (rangeEnd= Number ) )?
					int alt17=2;
					int LA17_0 = input.LA(1);
					if ( (LA17_0==KW_TO) ) {
						alt17=1;
					}
					switch (alt17) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:823:12: KW_TO (rangeEnd= Number )
							{
							KW_TO57=(Token)match(input,KW_TO,FOLLOW_KW_TO_in_replDumpStatement1996); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_TO.add(KW_TO57);

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:823:18: (rangeEnd= Number )
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:823:19: rangeEnd= Number
							{
							rangeEnd=(Token)match(input,Number,FOLLOW_Number_in_replDumpStatement2001); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_Number.add(rangeEnd);

							}

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:824:11: ( KW_LIMIT (batchSize= Number ) )?
					int alt18=2;
					int LA18_0 = input.LA(1);
					if ( (LA18_0==KW_LIMIT) ) {
						alt18=1;
					}
					switch (alt18) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:824:12: KW_LIMIT (batchSize= Number )
							{
							KW_LIMIT58=(Token)match(input,KW_LIMIT,FOLLOW_KW_LIMIT_in_replDumpStatement2017); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_LIMIT.add(KW_LIMIT58);

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:824:21: (batchSize= Number )
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:824:22: batchSize= Number
							{
							batchSize=(Token)match(input,Number,FOLLOW_Number_in_replDumpStatement2022); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_Number.add(batchSize);

							}

							}
							break;

					}

					}
					break;

			}

			// AST REWRITE
			// elements: rangeEnd, eventId, tblName, batchSize, dbName
			// token labels: eventId, batchSize, rangeEnd
			// rule labels: dbName, tblName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_eventId=new RewriteRuleTokenStream(adaptor,"token eventId",eventId);
			RewriteRuleTokenStream stream_batchSize=new RewriteRuleTokenStream(adaptor,"token batchSize",batchSize);
			RewriteRuleTokenStream stream_rangeEnd=new RewriteRuleTokenStream(adaptor,"token rangeEnd",rangeEnd);
			RewriteRuleSubtreeStream stream_dbName=new RewriteRuleSubtreeStream(adaptor,"rule dbName",dbName!=null?dbName.getTree():null);
			RewriteRuleSubtreeStream stream_tblName=new RewriteRuleSubtreeStream(adaptor,"rule tblName",tblName!=null?tblName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 826:5: -> ^( TOK_REPL_DUMP $dbName ( $tblName)? ( ^( TOK_FROM $eventId ( TOK_TO $rangeEnd)? ( TOK_LIMIT $batchSize)? ) )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:826:8: ^( TOK_REPL_DUMP $dbName ( $tblName)? ( ^( TOK_FROM $eventId ( TOK_TO $rangeEnd)? ( TOK_LIMIT $batchSize)? ) )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REPL_DUMP, "TOK_REPL_DUMP"), root_1);
				adaptor.addChild(root_1, stream_dbName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:826:33: ( $tblName)?
				if ( stream_tblName.hasNext() ) {
					adaptor.addChild(root_1, stream_tblName.nextTree());
				}
				stream_tblName.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:826:42: ( ^( TOK_FROM $eventId ( TOK_TO $rangeEnd)? ( TOK_LIMIT $batchSize)? ) )?
				if ( stream_rangeEnd.hasNext()||stream_eventId.hasNext()||stream_batchSize.hasNext() ) {
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:826:42: ^( TOK_FROM $eventId ( TOK_TO $rangeEnd)? ( TOK_LIMIT $batchSize)? )
					{
					ASTNode root_2 = (ASTNode)adaptor.nil();
					root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
					adaptor.addChild(root_2, stream_eventId.nextNode());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:826:62: ( TOK_TO $rangeEnd)?
					if ( stream_rangeEnd.hasNext() ) {
						adaptor.addChild(root_2, (ASTNode)adaptor.create(TOK_TO, "TOK_TO"));
						adaptor.addChild(root_2, stream_rangeEnd.nextNode());
					}
					stream_rangeEnd.reset();

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:826:82: ( TOK_LIMIT $batchSize)?
					if ( stream_batchSize.hasNext() ) {
						adaptor.addChild(root_2, (ASTNode)adaptor.create(TOK_LIMIT, "TOK_LIMIT"));
						adaptor.addChild(root_2, stream_batchSize.nextNode());
					}
					stream_batchSize.reset();

					adaptor.addChild(root_1, root_2);
					}

				}
				stream_rangeEnd.reset();
				stream_eventId.reset();
				stream_batchSize.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "replDumpStatement"


	public static class replLoadStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "replLoadStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:829:1: replLoadStatement : KW_REPL KW_LOAD ( (dbName= identifier ) ( DOT tblName= identifier )? )? KW_FROM (path= StringLiteral ) -> ^( TOK_REPL_LOAD $path ( $dbName)? ( $tblName)? ) ;
	public final HiveParser.replLoadStatement_return replLoadStatement() throws RecognitionException {
		HiveParser.replLoadStatement_return retval = new HiveParser.replLoadStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token path=null;
		Token KW_REPL59=null;
		Token KW_LOAD60=null;
		Token DOT61=null;
		Token KW_FROM62=null;
		ParserRuleReturnScope dbName =null;
		ParserRuleReturnScope tblName =null;

		ASTNode path_tree=null;
		ASTNode KW_REPL59_tree=null;
		ASTNode KW_LOAD60_tree=null;
		ASTNode DOT61_tree=null;
		ASTNode KW_FROM62_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_REPL=new RewriteRuleTokenStream(adaptor,"token KW_REPL");
		RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleTokenStream stream_KW_LOAD=new RewriteRuleTokenStream(adaptor,"token KW_LOAD");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("replication load statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:832:7: ( KW_REPL KW_LOAD ( (dbName= identifier ) ( DOT tblName= identifier )? )? KW_FROM (path= StringLiteral ) -> ^( TOK_REPL_LOAD $path ( $dbName)? ( $tblName)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:832:9: KW_REPL KW_LOAD ( (dbName= identifier ) ( DOT tblName= identifier )? )? KW_FROM (path= StringLiteral )
			{
			KW_REPL59=(Token)match(input,KW_REPL,FOLLOW_KW_REPL_in_replLoadStatement2107); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REPL.add(KW_REPL59);

			KW_LOAD60=(Token)match(input,KW_LOAD,FOLLOW_KW_LOAD_in_replLoadStatement2109); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOAD.add(KW_LOAD60);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:833:9: ( (dbName= identifier ) ( DOT tblName= identifier )? )?
			int alt21=2;
			int LA21_0 = input.LA(1);
			if ( (LA21_0==Identifier||(LA21_0 >= KW_ABORT && LA21_0 <= KW_AFTER)||LA21_0==KW_ANALYZE||LA21_0==KW_ARCHIVE||LA21_0==KW_ASC||(LA21_0 >= KW_AUTOCOMMIT && LA21_0 <= KW_BEFORE)||(LA21_0 >= KW_BUCKET && LA21_0 <= KW_BUCKETS)||(LA21_0 >= KW_CACHE && LA21_0 <= KW_CASCADE)||LA21_0==KW_CHANGE||(LA21_0 >= KW_CLUSTER && LA21_0 <= KW_COLLECTION)||(LA21_0 >= KW_COLUMNS && LA21_0 <= KW_COMMENT)||(LA21_0 >= KW_COMPACT && LA21_0 <= KW_CONCATENATE)||LA21_0==KW_CONTINUE||LA21_0==KW_DATA||LA21_0==KW_DATABASES||(LA21_0 >= KW_DATETIME && LA21_0 <= KW_DBPROPERTIES)||(LA21_0 >= KW_DEFERRED && LA21_0 <= KW_DEFINED)||(LA21_0 >= KW_DELIMITED && LA21_0 <= KW_DESC)||(LA21_0 >= KW_DETAIL && LA21_0 <= KW_DISABLE)||LA21_0==KW_DISTRIBUTE||LA21_0==KW_DOW||(LA21_0 >= KW_DUMP && LA21_0 <= KW_ELEM_TYPE)||LA21_0==KW_ENABLE||LA21_0==KW_ESCAPED||LA21_0==KW_EXCLUSIVE||(LA21_0 >= KW_EXPLAIN && LA21_0 <= KW_EXPRESSION)||(LA21_0 >= KW_FIELDS && LA21_0 <= KW_FIRST)||(LA21_0 >= KW_FORMAT && LA21_0 <= KW_FORMATTED)||LA21_0==KW_FUNCTIONS||(LA21_0 >= KW_HOUR && LA21_0 <= KW_IDXPROPERTIES)||(LA21_0 >= KW_INDEX && LA21_0 <= KW_INDEXES)||(LA21_0 >= KW_INPATH && LA21_0 <= KW_INPUTFORMAT)||(LA21_0 >= KW_ISOLATION && LA21_0 <= KW_JAR)||(LA21_0 >= KW_KEY && LA21_0 <= KW_LAST)||LA21_0==KW_LEVEL||(LA21_0 >= KW_LIMIT && LA21_0 <= KW_LOAD)||(LA21_0 >= KW_LOCATION && LA21_0 <= KW_LONG)||(LA21_0 >= KW_MAPJOIN && LA21_0 <= KW_MATERIALIZED)||LA21_0==KW_METADATA||(LA21_0 >= KW_MINUTE && LA21_0 <= KW_MONTH)||LA21_0==KW_MSCK||(LA21_0 >= KW_NORELY && LA21_0 <= KW_NOSCAN)||LA21_0==KW_NOVALIDATE||LA21_0==KW_NULLS||LA21_0==KW_OFFSET||(LA21_0 >= KW_OPERATOR && LA21_0 <= KW_OPTION)||(LA21_0 >= KW_OUTPUTDRIVER && LA21_0 <= KW_OUTPUTFORMAT)||(LA21_0 >= KW_OVERWRITE && LA21_0 <= KW_OWNER)||(LA21_0 >= KW_PARTITIONED && LA21_0 <= KW_PARTITIONS)||LA21_0==KW_PLUS||LA21_0==KW_PRETTY||LA21_0==KW_PRINCIPALS||(LA21_0 >= KW_PURGE && LA21_0 <= KW_QUARTER)||LA21_0==KW_READ||(LA21_0 >= KW_REBUILD && LA21_0 <= KW_RECORDWRITER)||(LA21_0 >= KW_RELOAD && LA21_0 <= KW_RESTRICT)||LA21_0==KW_REWRITE||(LA21_0 >= KW_ROLE && LA21_0 <= KW_ROLES)||(LA21_0 >= KW_SCHEMA && LA21_0 <= KW_SECOND)||(LA21_0 >= KW_SEMI && LA21_0 <= KW_SERVER)||(LA21_0 >= KW_SETS && LA21_0 <= KW_SKEWED)||(LA21_0 >= KW_SNAPSHOT && LA21_0 <= KW_SSL)||(LA21_0 >= KW_STATISTICS && LA21_0 <= KW_SUMMARY)||LA21_0==KW_TABLES||(LA21_0 >= KW_TBLPROPERTIES && LA21_0 <= KW_TERMINATED)||LA21_0==KW_TINYINT||(LA21_0 >= KW_TOUCH && LA21_0 <= KW_TRANSACTIONS)||LA21_0==KW_UNARCHIVE||LA21_0==KW_UNDO||LA21_0==KW_UNIONTYPE||(LA21_0 >= KW_UNLOCK && LA21_0 <= KW_UNSIGNED)||(LA21_0 >= KW_URI && LA21_0 <= KW_USE)||(LA21_0 >= KW_UTC && LA21_0 <= KW_VALIDATE)||LA21_0==KW_VALUE_TYPE||(LA21_0 >= KW_VECTORIZATION && LA21_0 <= KW_WEEK)||LA21_0==KW_WHILE||(LA21_0 >= KW_WORK && LA21_0 <= KW_YEAR)||LA21_0==KW_BATCH||LA21_0==KW_DAYOFWEEK||LA21_0==KW_HOLD_DDLTIME||LA21_0==KW_IGNORE||LA21_0==KW_NO_DROP||LA21_0==KW_OFFLINE||LA21_0==KW_PROTECTION||LA21_0==KW_READONLY) ) {
				alt21=1;
			}
			switch (alt21) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:833:10: (dbName= identifier ) ( DOT tblName= identifier )?
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:833:10: (dbName= identifier )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:833:11: dbName= identifier
					{
					pushFollow(FOLLOW_identifier_in_replLoadStatement2123);
					dbName=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(dbName.getTree());
					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:833:30: ( DOT tblName= identifier )?
					int alt20=2;
					int LA20_0 = input.LA(1);
					if ( (LA20_0==DOT) ) {
						alt20=1;
					}
					switch (alt20) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:833:31: DOT tblName= identifier
							{
							DOT61=(Token)match(input,DOT,FOLLOW_DOT_in_replLoadStatement2127); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_DOT.add(DOT61);

							pushFollow(FOLLOW_identifier_in_replLoadStatement2131);
							tblName=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(tblName.getTree());
							}
							break;

					}

					}
					break;

			}

			KW_FROM62=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_replLoadStatement2145); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM62);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:834:17: (path= StringLiteral )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:834:18: path= StringLiteral
			{
			path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_replLoadStatement2150); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(path);

			}

			// AST REWRITE
			// elements: dbName, path, tblName
			// token labels: path
			// rule labels: dbName, tblName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
			RewriteRuleSubtreeStream stream_dbName=new RewriteRuleSubtreeStream(adaptor,"rule dbName",dbName!=null?dbName.getTree():null);
			RewriteRuleSubtreeStream stream_tblName=new RewriteRuleSubtreeStream(adaptor,"rule tblName",tblName!=null?tblName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 835:7: -> ^( TOK_REPL_LOAD $path ( $dbName)? ( $tblName)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:835:10: ^( TOK_REPL_LOAD $path ( $dbName)? ( $tblName)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REPL_LOAD, "TOK_REPL_LOAD"), root_1);
				adaptor.addChild(root_1, stream_path.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:835:33: ( $dbName)?
				if ( stream_dbName.hasNext() ) {
					adaptor.addChild(root_1, stream_dbName.nextTree());
				}
				stream_dbName.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:835:42: ( $tblName)?
				if ( stream_tblName.hasNext() ) {
					adaptor.addChild(root_1, stream_tblName.nextTree());
				}
				stream_tblName.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "replLoadStatement"


	public static class replStatusStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "replStatusStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:838:1: replStatusStatement : KW_REPL KW_STATUS (dbName= identifier ) ( DOT tblName= identifier )? -> ^( TOK_REPL_STATUS $dbName ( $tblName)? ) ;
	public final HiveParser.replStatusStatement_return replStatusStatement() throws RecognitionException {
		HiveParser.replStatusStatement_return retval = new HiveParser.replStatusStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_REPL63=null;
		Token KW_STATUS64=null;
		Token DOT65=null;
		ParserRuleReturnScope dbName =null;
		ParserRuleReturnScope tblName =null;

		ASTNode KW_REPL63_tree=null;
		ASTNode KW_STATUS64_tree=null;
		ASTNode DOT65_tree=null;
		RewriteRuleTokenStream stream_KW_STATUS=new RewriteRuleTokenStream(adaptor,"token KW_STATUS");
		RewriteRuleTokenStream stream_KW_REPL=new RewriteRuleTokenStream(adaptor,"token KW_REPL");
		RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("replication load statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:841:7: ( KW_REPL KW_STATUS (dbName= identifier ) ( DOT tblName= identifier )? -> ^( TOK_REPL_STATUS $dbName ( $tblName)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:841:9: KW_REPL KW_STATUS (dbName= identifier ) ( DOT tblName= identifier )?
			{
			KW_REPL63=(Token)match(input,KW_REPL,FOLLOW_KW_REPL_in_replStatusStatement2205); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REPL.add(KW_REPL63);

			KW_STATUS64=(Token)match(input,KW_STATUS,FOLLOW_KW_STATUS_in_replStatusStatement2207); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_STATUS.add(KW_STATUS64);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:842:9: (dbName= identifier )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:842:10: dbName= identifier
			{
			pushFollow(FOLLOW_identifier_in_replStatusStatement2220);
			dbName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(dbName.getTree());
			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:842:29: ( DOT tblName= identifier )?
			int alt22=2;
			int LA22_0 = input.LA(1);
			if ( (LA22_0==DOT) ) {
				alt22=1;
			}
			switch (alt22) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:842:30: DOT tblName= identifier
					{
					DOT65=(Token)match(input,DOT,FOLLOW_DOT_in_replStatusStatement2224); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_DOT.add(DOT65);

					pushFollow(FOLLOW_identifier_in_replStatusStatement2228);
					tblName=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(tblName.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: dbName, tblName
			// token labels: 
			// rule labels: dbName, tblName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_dbName=new RewriteRuleSubtreeStream(adaptor,"rule dbName",dbName!=null?dbName.getTree():null);
			RewriteRuleSubtreeStream stream_tblName=new RewriteRuleSubtreeStream(adaptor,"rule tblName",tblName!=null?tblName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 843:7: -> ^( TOK_REPL_STATUS $dbName ( $tblName)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:843:10: ^( TOK_REPL_STATUS $dbName ( $tblName)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REPL_STATUS, "TOK_REPL_STATUS"), root_1);
				adaptor.addChild(root_1, stream_dbName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:843:37: ( $tblName)?
				if ( stream_tblName.hasNext() ) {
					adaptor.addChild(root_1, stream_tblName.nextTree());
				}
				stream_tblName.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "replStatusStatement"


	public static class ddlStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "ddlStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:846:1: ddlStatement : ( createDatabaseStatement | switchDatabaseStatement | dropDatabaseStatement | createTableStatement | dropTableStatement | truncateTableStatement | alterStatement | descStatement | showStatement | metastoreCheck | createViewStatement | createMaterializedViewStatement | dropViewStatement | dropMaterializedViewStatement | createFunctionStatement | createMacroStatement | createIndexStatement | dropIndexStatement | dropFunctionStatement | reloadFunctionStatement | dropMacroStatement | analyzeStatement | lockStatement | unlockStatement | lockDatabase | unlockDatabase | createRoleStatement | dropRoleStatement | ( grantPrivileges )=> grantPrivileges | ( revokePrivileges )=> revokePrivileges | showGrants | showRoleGrants | showRolePrincipals | showRoles | grantRole | revokeRole | setRole | showCurrentRole | abortTransactionStatement );
	public final HiveParser.ddlStatement_return ddlStatement() throws RecognitionException {
		HiveParser.ddlStatement_return retval = new HiveParser.ddlStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope createDatabaseStatement66 =null;
		ParserRuleReturnScope switchDatabaseStatement67 =null;
		ParserRuleReturnScope dropDatabaseStatement68 =null;
		ParserRuleReturnScope createTableStatement69 =null;
		ParserRuleReturnScope dropTableStatement70 =null;
		ParserRuleReturnScope truncateTableStatement71 =null;
		ParserRuleReturnScope alterStatement72 =null;
		ParserRuleReturnScope descStatement73 =null;
		ParserRuleReturnScope showStatement74 =null;
		ParserRuleReturnScope metastoreCheck75 =null;
		ParserRuleReturnScope createViewStatement76 =null;
		ParserRuleReturnScope createMaterializedViewStatement77 =null;
		ParserRuleReturnScope dropViewStatement78 =null;
		ParserRuleReturnScope dropMaterializedViewStatement79 =null;
		ParserRuleReturnScope createFunctionStatement80 =null;
		ParserRuleReturnScope createMacroStatement81 =null;
		ParserRuleReturnScope createIndexStatement82 =null;
		ParserRuleReturnScope dropIndexStatement83 =null;
		ParserRuleReturnScope dropFunctionStatement84 =null;
		ParserRuleReturnScope reloadFunctionStatement85 =null;
		ParserRuleReturnScope dropMacroStatement86 =null;
		ParserRuleReturnScope analyzeStatement87 =null;
		ParserRuleReturnScope lockStatement88 =null;
		ParserRuleReturnScope unlockStatement89 =null;
		ParserRuleReturnScope lockDatabase90 =null;
		ParserRuleReturnScope unlockDatabase91 =null;
		ParserRuleReturnScope createRoleStatement92 =null;
		ParserRuleReturnScope dropRoleStatement93 =null;
		ParserRuleReturnScope grantPrivileges94 =null;
		ParserRuleReturnScope revokePrivileges95 =null;
		ParserRuleReturnScope showGrants96 =null;
		ParserRuleReturnScope showRoleGrants97 =null;
		ParserRuleReturnScope showRolePrincipals98 =null;
		ParserRuleReturnScope showRoles99 =null;
		ParserRuleReturnScope grantRole100 =null;
		ParserRuleReturnScope revokeRole101 =null;
		ParserRuleReturnScope setRole102 =null;
		ParserRuleReturnScope showCurrentRole103 =null;
		ParserRuleReturnScope abortTransactionStatement104 =null;


		 pushMsg("ddl statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:849:5: ( createDatabaseStatement | switchDatabaseStatement | dropDatabaseStatement | createTableStatement | dropTableStatement | truncateTableStatement | alterStatement | descStatement | showStatement | metastoreCheck | createViewStatement | createMaterializedViewStatement | dropViewStatement | dropMaterializedViewStatement | createFunctionStatement | createMacroStatement | createIndexStatement | dropIndexStatement | dropFunctionStatement | reloadFunctionStatement | dropMacroStatement | analyzeStatement | lockStatement | unlockStatement | lockDatabase | unlockDatabase | createRoleStatement | dropRoleStatement | ( grantPrivileges )=> grantPrivileges | ( revokePrivileges )=> revokePrivileges | showGrants | showRoleGrants | showRolePrincipals | showRoles | grantRole | revokeRole | setRole | showCurrentRole | abortTransactionStatement )
			int alt23=39;
			alt23 = dfa23.predict(input);
			switch (alt23) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:849:7: createDatabaseStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createDatabaseStatement_in_ddlStatement2278);
					createDatabaseStatement66=createDatabaseStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createDatabaseStatement66.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:850:7: switchDatabaseStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_switchDatabaseStatement_in_ddlStatement2286);
					switchDatabaseStatement67=switchDatabaseStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, switchDatabaseStatement67.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:851:7: dropDatabaseStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropDatabaseStatement_in_ddlStatement2294);
					dropDatabaseStatement68=dropDatabaseStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropDatabaseStatement68.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:852:7: createTableStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createTableStatement_in_ddlStatement2302);
					createTableStatement69=createTableStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createTableStatement69.getTree());

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:853:7: dropTableStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropTableStatement_in_ddlStatement2310);
					dropTableStatement70=dropTableStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropTableStatement70.getTree());

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:854:7: truncateTableStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_truncateTableStatement_in_ddlStatement2318);
					truncateTableStatement71=truncateTableStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, truncateTableStatement71.getTree());

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:855:7: alterStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatement_in_ddlStatement2326);
					alterStatement72=alterStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatement72.getTree());

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:856:7: descStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_descStatement_in_ddlStatement2334);
					descStatement73=descStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, descStatement73.getTree());

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:857:7: showStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_showStatement_in_ddlStatement2342);
					showStatement74=showStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, showStatement74.getTree());

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:858:7: metastoreCheck
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_metastoreCheck_in_ddlStatement2350);
					metastoreCheck75=metastoreCheck();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, metastoreCheck75.getTree());

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:859:7: createViewStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createViewStatement_in_ddlStatement2358);
					createViewStatement76=createViewStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createViewStatement76.getTree());

					}
					break;
				case 12 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:860:7: createMaterializedViewStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createMaterializedViewStatement_in_ddlStatement2366);
					createMaterializedViewStatement77=createMaterializedViewStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createMaterializedViewStatement77.getTree());

					}
					break;
				case 13 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:861:7: dropViewStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropViewStatement_in_ddlStatement2374);
					dropViewStatement78=dropViewStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropViewStatement78.getTree());

					}
					break;
				case 14 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:862:7: dropMaterializedViewStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropMaterializedViewStatement_in_ddlStatement2382);
					dropMaterializedViewStatement79=dropMaterializedViewStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropMaterializedViewStatement79.getTree());

					}
					break;
				case 15 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:863:7: createFunctionStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createFunctionStatement_in_ddlStatement2390);
					createFunctionStatement80=createFunctionStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createFunctionStatement80.getTree());

					}
					break;
				case 16 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:864:7: createMacroStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createMacroStatement_in_ddlStatement2398);
					createMacroStatement81=createMacroStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createMacroStatement81.getTree());

					}
					break;
				case 17 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:865:7: createIndexStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createIndexStatement_in_ddlStatement2406);
					createIndexStatement82=createIndexStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createIndexStatement82.getTree());

					}
					break;
				case 18 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:866:7: dropIndexStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropIndexStatement_in_ddlStatement2414);
					dropIndexStatement83=dropIndexStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropIndexStatement83.getTree());

					}
					break;
				case 19 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:867:7: dropFunctionStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropFunctionStatement_in_ddlStatement2422);
					dropFunctionStatement84=dropFunctionStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropFunctionStatement84.getTree());

					}
					break;
				case 20 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:868:7: reloadFunctionStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_reloadFunctionStatement_in_ddlStatement2430);
					reloadFunctionStatement85=reloadFunctionStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, reloadFunctionStatement85.getTree());

					}
					break;
				case 21 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:869:7: dropMacroStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropMacroStatement_in_ddlStatement2438);
					dropMacroStatement86=dropMacroStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropMacroStatement86.getTree());

					}
					break;
				case 22 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:870:7: analyzeStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_analyzeStatement_in_ddlStatement2446);
					analyzeStatement87=analyzeStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, analyzeStatement87.getTree());

					}
					break;
				case 23 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:871:7: lockStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_lockStatement_in_ddlStatement2454);
					lockStatement88=lockStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, lockStatement88.getTree());

					}
					break;
				case 24 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:872:7: unlockStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_unlockStatement_in_ddlStatement2462);
					unlockStatement89=unlockStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, unlockStatement89.getTree());

					}
					break;
				case 25 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:873:7: lockDatabase
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_lockDatabase_in_ddlStatement2470);
					lockDatabase90=lockDatabase();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, lockDatabase90.getTree());

					}
					break;
				case 26 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:874:7: unlockDatabase
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_unlockDatabase_in_ddlStatement2478);
					unlockDatabase91=unlockDatabase();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, unlockDatabase91.getTree());

					}
					break;
				case 27 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:875:7: createRoleStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_createRoleStatement_in_ddlStatement2486);
					createRoleStatement92=createRoleStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, createRoleStatement92.getTree());

					}
					break;
				case 28 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:876:7: dropRoleStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_dropRoleStatement_in_ddlStatement2494);
					dropRoleStatement93=dropRoleStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, dropRoleStatement93.getTree());

					}
					break;
				case 29 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:877:7: ( grantPrivileges )=> grantPrivileges
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_grantPrivileges_in_ddlStatement2508);
					grantPrivileges94=grantPrivileges();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, grantPrivileges94.getTree());

					}
					break;
				case 30 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:878:7: ( revokePrivileges )=> revokePrivileges
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_revokePrivileges_in_ddlStatement2522);
					revokePrivileges95=revokePrivileges();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, revokePrivileges95.getTree());

					}
					break;
				case 31 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:879:7: showGrants
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_showGrants_in_ddlStatement2530);
					showGrants96=showGrants();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, showGrants96.getTree());

					}
					break;
				case 32 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:880:7: showRoleGrants
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_showRoleGrants_in_ddlStatement2538);
					showRoleGrants97=showRoleGrants();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, showRoleGrants97.getTree());

					}
					break;
				case 33 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:881:7: showRolePrincipals
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_showRolePrincipals_in_ddlStatement2546);
					showRolePrincipals98=showRolePrincipals();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, showRolePrincipals98.getTree());

					}
					break;
				case 34 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:882:7: showRoles
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_showRoles_in_ddlStatement2554);
					showRoles99=showRoles();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, showRoles99.getTree());

					}
					break;
				case 35 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:883:7: grantRole
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_grantRole_in_ddlStatement2562);
					grantRole100=grantRole();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, grantRole100.getTree());

					}
					break;
				case 36 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:884:7: revokeRole
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_revokeRole_in_ddlStatement2570);
					revokeRole101=revokeRole();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, revokeRole101.getTree());

					}
					break;
				case 37 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:885:7: setRole
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_setRole_in_ddlStatement2578);
					setRole102=setRole();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, setRole102.getTree());

					}
					break;
				case 38 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:886:7: showCurrentRole
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_showCurrentRole_in_ddlStatement2586);
					showCurrentRole103=showCurrentRole();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, showCurrentRole103.getTree());

					}
					break;
				case 39 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:887:7: abortTransactionStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_abortTransactionStatement_in_ddlStatement2594);
					abortTransactionStatement104=abortTransactionStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, abortTransactionStatement104.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "ddlStatement"


	public static class ifExists_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "ifExists"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:890:1: ifExists : KW_IF KW_EXISTS -> ^( TOK_IFEXISTS ) ;
	public final HiveParser.ifExists_return ifExists() throws RecognitionException {
		HiveParser.ifExists_return retval = new HiveParser.ifExists_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_IF105=null;
		Token KW_EXISTS106=null;

		ASTNode KW_IF105_tree=null;
		ASTNode KW_EXISTS106_tree=null;
		RewriteRuleTokenStream stream_KW_EXISTS=new RewriteRuleTokenStream(adaptor,"token KW_EXISTS");
		RewriteRuleTokenStream stream_KW_IF=new RewriteRuleTokenStream(adaptor,"token KW_IF");

		 pushMsg("if exists clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:893:5: ( KW_IF KW_EXISTS -> ^( TOK_IFEXISTS ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:893:7: KW_IF KW_EXISTS
			{
			KW_IF105=(Token)match(input,KW_IF,FOLLOW_KW_IF_in_ifExists2621); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_IF.add(KW_IF105);

			KW_EXISTS106=(Token)match(input,KW_EXISTS,FOLLOW_KW_EXISTS_in_ifExists2623); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_EXISTS.add(KW_EXISTS106);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 894:5: -> ^( TOK_IFEXISTS )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:894:8: ^( TOK_IFEXISTS )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_IFEXISTS, "TOK_IFEXISTS"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "ifExists"


	public static class restrictOrCascade_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "restrictOrCascade"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:897:1: restrictOrCascade : ( KW_RESTRICT -> ^( TOK_RESTRICT ) | KW_CASCADE -> ^( TOK_CASCADE ) );
	public final HiveParser.restrictOrCascade_return restrictOrCascade() throws RecognitionException {
		HiveParser.restrictOrCascade_return retval = new HiveParser.restrictOrCascade_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RESTRICT107=null;
		Token KW_CASCADE108=null;

		ASTNode KW_RESTRICT107_tree=null;
		ASTNode KW_CASCADE108_tree=null;
		RewriteRuleTokenStream stream_KW_CASCADE=new RewriteRuleTokenStream(adaptor,"token KW_CASCADE");
		RewriteRuleTokenStream stream_KW_RESTRICT=new RewriteRuleTokenStream(adaptor,"token KW_RESTRICT");

		 pushMsg("restrict or cascade clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:900:5: ( KW_RESTRICT -> ^( TOK_RESTRICT ) | KW_CASCADE -> ^( TOK_CASCADE ) )
			int alt24=2;
			int LA24_0 = input.LA(1);
			if ( (LA24_0==KW_RESTRICT) ) {
				alt24=1;
			}
			else if ( (LA24_0==KW_CASCADE) ) {
				alt24=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 24, 0, input);
				throw nvae;
			}

			switch (alt24) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:900:7: KW_RESTRICT
					{
					KW_RESTRICT107=(Token)match(input,KW_RESTRICT,FOLLOW_KW_RESTRICT_in_restrictOrCascade2660); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_RESTRICT.add(KW_RESTRICT107);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 901:5: -> ^( TOK_RESTRICT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:901:8: ^( TOK_RESTRICT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RESTRICT, "TOK_RESTRICT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:902:7: KW_CASCADE
					{
					KW_CASCADE108=(Token)match(input,KW_CASCADE,FOLLOW_KW_CASCADE_in_restrictOrCascade2678); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CASCADE.add(KW_CASCADE108);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 903:5: -> ^( TOK_CASCADE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:903:8: ^( TOK_CASCADE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CASCADE, "TOK_CASCADE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "restrictOrCascade"


	public static class ifNotExists_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "ifNotExists"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:906:1: ifNotExists : KW_IF KW_NOT KW_EXISTS -> ^( TOK_IFNOTEXISTS ) ;
	public final HiveParser.ifNotExists_return ifNotExists() throws RecognitionException {
		HiveParser.ifNotExists_return retval = new HiveParser.ifNotExists_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_IF109=null;
		Token KW_NOT110=null;
		Token KW_EXISTS111=null;

		ASTNode KW_IF109_tree=null;
		ASTNode KW_NOT110_tree=null;
		ASTNode KW_EXISTS111_tree=null;
		RewriteRuleTokenStream stream_KW_NOT=new RewriteRuleTokenStream(adaptor,"token KW_NOT");
		RewriteRuleTokenStream stream_KW_EXISTS=new RewriteRuleTokenStream(adaptor,"token KW_EXISTS");
		RewriteRuleTokenStream stream_KW_IF=new RewriteRuleTokenStream(adaptor,"token KW_IF");

		 pushMsg("if not exists clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:909:5: ( KW_IF KW_NOT KW_EXISTS -> ^( TOK_IFNOTEXISTS ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:909:7: KW_IF KW_NOT KW_EXISTS
			{
			KW_IF109=(Token)match(input,KW_IF,FOLLOW_KW_IF_in_ifNotExists2715); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_IF.add(KW_IF109);

			KW_NOT110=(Token)match(input,KW_NOT,FOLLOW_KW_NOT_in_ifNotExists2717); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_NOT.add(KW_NOT110);

			KW_EXISTS111=(Token)match(input,KW_EXISTS,FOLLOW_KW_EXISTS_in_ifNotExists2719); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_EXISTS.add(KW_EXISTS111);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 910:5: -> ^( TOK_IFNOTEXISTS )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:910:8: ^( TOK_IFNOTEXISTS )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_IFNOTEXISTS, "TOK_IFNOTEXISTS"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "ifNotExists"


	public static class rewriteEnabled_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "rewriteEnabled"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:913:1: rewriteEnabled : KW_ENABLE KW_REWRITE -> ^( TOK_REWRITE_ENABLED ) ;
	public final HiveParser.rewriteEnabled_return rewriteEnabled() throws RecognitionException {
		HiveParser.rewriteEnabled_return retval = new HiveParser.rewriteEnabled_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ENABLE112=null;
		Token KW_REWRITE113=null;

		ASTNode KW_ENABLE112_tree=null;
		ASTNode KW_REWRITE113_tree=null;
		RewriteRuleTokenStream stream_KW_REWRITE=new RewriteRuleTokenStream(adaptor,"token KW_REWRITE");
		RewriteRuleTokenStream stream_KW_ENABLE=new RewriteRuleTokenStream(adaptor,"token KW_ENABLE");

		 pushMsg("rewrite enabled clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:916:5: ( KW_ENABLE KW_REWRITE -> ^( TOK_REWRITE_ENABLED ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:916:7: KW_ENABLE KW_REWRITE
			{
			KW_ENABLE112=(Token)match(input,KW_ENABLE,FOLLOW_KW_ENABLE_in_rewriteEnabled2756); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ENABLE.add(KW_ENABLE112);

			KW_REWRITE113=(Token)match(input,KW_REWRITE,FOLLOW_KW_REWRITE_in_rewriteEnabled2758); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REWRITE.add(KW_REWRITE113);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 917:5: -> ^( TOK_REWRITE_ENABLED )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:917:8: ^( TOK_REWRITE_ENABLED )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REWRITE_ENABLED, "TOK_REWRITE_ENABLED"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "rewriteEnabled"


	public static class rewriteDisabled_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "rewriteDisabled"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:920:1: rewriteDisabled : KW_DISABLE KW_REWRITE -> ^( TOK_REWRITE_DISABLED ) ;
	public final HiveParser.rewriteDisabled_return rewriteDisabled() throws RecognitionException {
		HiveParser.rewriteDisabled_return retval = new HiveParser.rewriteDisabled_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DISABLE114=null;
		Token KW_REWRITE115=null;

		ASTNode KW_DISABLE114_tree=null;
		ASTNode KW_REWRITE115_tree=null;
		RewriteRuleTokenStream stream_KW_DISABLE=new RewriteRuleTokenStream(adaptor,"token KW_DISABLE");
		RewriteRuleTokenStream stream_KW_REWRITE=new RewriteRuleTokenStream(adaptor,"token KW_REWRITE");

		 pushMsg("rewrite disabled clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:923:5: ( KW_DISABLE KW_REWRITE -> ^( TOK_REWRITE_DISABLED ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:923:7: KW_DISABLE KW_REWRITE
			{
			KW_DISABLE114=(Token)match(input,KW_DISABLE,FOLLOW_KW_DISABLE_in_rewriteDisabled2795); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DISABLE.add(KW_DISABLE114);

			KW_REWRITE115=(Token)match(input,KW_REWRITE,FOLLOW_KW_REWRITE_in_rewriteDisabled2797); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REWRITE.add(KW_REWRITE115);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 924:5: -> ^( TOK_REWRITE_DISABLED )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:924:8: ^( TOK_REWRITE_DISABLED )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REWRITE_DISABLED, "TOK_REWRITE_DISABLED"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "rewriteDisabled"


	public static class storedAsDirs_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "storedAsDirs"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:927:1: storedAsDirs : KW_STORED KW_AS KW_DIRECTORIES -> ^( TOK_STOREDASDIRS ) ;
	public final HiveParser.storedAsDirs_return storedAsDirs() throws RecognitionException {
		HiveParser.storedAsDirs_return retval = new HiveParser.storedAsDirs_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_STORED116=null;
		Token KW_AS117=null;
		Token KW_DIRECTORIES118=null;

		ASTNode KW_STORED116_tree=null;
		ASTNode KW_AS117_tree=null;
		ASTNode KW_DIRECTORIES118_tree=null;
		RewriteRuleTokenStream stream_KW_DIRECTORIES=new RewriteRuleTokenStream(adaptor,"token KW_DIRECTORIES");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleTokenStream stream_KW_STORED=new RewriteRuleTokenStream(adaptor,"token KW_STORED");

		 pushMsg("stored as directories", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:930:5: ( KW_STORED KW_AS KW_DIRECTORIES -> ^( TOK_STOREDASDIRS ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:930:7: KW_STORED KW_AS KW_DIRECTORIES
			{
			KW_STORED116=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_storedAsDirs2834); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_STORED.add(KW_STORED116);

			KW_AS117=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_storedAsDirs2836); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS117);

			KW_DIRECTORIES118=(Token)match(input,KW_DIRECTORIES,FOLLOW_KW_DIRECTORIES_in_storedAsDirs2838); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DIRECTORIES.add(KW_DIRECTORIES118);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 931:5: -> ^( TOK_STOREDASDIRS )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:931:8: ^( TOK_STOREDASDIRS )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_STOREDASDIRS, "TOK_STOREDASDIRS"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "storedAsDirs"


	public static class orReplace_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "orReplace"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:934:1: orReplace : KW_OR KW_REPLACE -> ^( TOK_ORREPLACE ) ;
	public final HiveParser.orReplace_return orReplace() throws RecognitionException {
		HiveParser.orReplace_return retval = new HiveParser.orReplace_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_OR119=null;
		Token KW_REPLACE120=null;

		ASTNode KW_OR119_tree=null;
		ASTNode KW_REPLACE120_tree=null;
		RewriteRuleTokenStream stream_KW_REPLACE=new RewriteRuleTokenStream(adaptor,"token KW_REPLACE");
		RewriteRuleTokenStream stream_KW_OR=new RewriteRuleTokenStream(adaptor,"token KW_OR");

		 pushMsg("or replace clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:937:5: ( KW_OR KW_REPLACE -> ^( TOK_ORREPLACE ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:937:7: KW_OR KW_REPLACE
			{
			KW_OR119=(Token)match(input,KW_OR,FOLLOW_KW_OR_in_orReplace2875); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_OR.add(KW_OR119);

			KW_REPLACE120=(Token)match(input,KW_REPLACE,FOLLOW_KW_REPLACE_in_orReplace2877); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REPLACE.add(KW_REPLACE120);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 938:5: -> ^( TOK_ORREPLACE )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:938:8: ^( TOK_ORREPLACE )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ORREPLACE, "TOK_ORREPLACE"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "orReplace"


	public static class createDatabaseStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createDatabaseStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:941:1: createDatabaseStatement : KW_CREATE ( KW_DATABASE | KW_SCHEMA ) ( ifNotExists )? name= identifier ( databaseComment )? ( dbLocation )? ( KW_WITH KW_DBPROPERTIES dbprops= dbProperties )? -> ^( TOK_CREATEDATABASE $name ( ifNotExists )? ( dbLocation )? ( databaseComment )? ( $dbprops)? ) ;
	public final HiveParser.createDatabaseStatement_return createDatabaseStatement() throws RecognitionException {
		HiveParser.createDatabaseStatement_return retval = new HiveParser.createDatabaseStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CREATE121=null;
		Token KW_DATABASE122=null;
		Token KW_SCHEMA123=null;
		Token KW_WITH127=null;
		Token KW_DBPROPERTIES128=null;
		ParserRuleReturnScope name =null;
		ParserRuleReturnScope dbprops =null;
		ParserRuleReturnScope ifNotExists124 =null;
		ParserRuleReturnScope databaseComment125 =null;
		ParserRuleReturnScope dbLocation126 =null;

		ASTNode KW_CREATE121_tree=null;
		ASTNode KW_DATABASE122_tree=null;
		ASTNode KW_SCHEMA123_tree=null;
		ASTNode KW_WITH127_tree=null;
		ASTNode KW_DBPROPERTIES128_tree=null;
		RewriteRuleTokenStream stream_KW_DBPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_DBPROPERTIES");
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_dbProperties=new RewriteRuleSubtreeStream(adaptor,"rule dbProperties");
		RewriteRuleSubtreeStream stream_databaseComment=new RewriteRuleSubtreeStream(adaptor,"rule databaseComment");
		RewriteRuleSubtreeStream stream_ifNotExists=new RewriteRuleSubtreeStream(adaptor,"rule ifNotExists");
		RewriteRuleSubtreeStream stream_dbLocation=new RewriteRuleSubtreeStream(adaptor,"rule dbLocation");

		 pushMsg("create database statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:944:5: ( KW_CREATE ( KW_DATABASE | KW_SCHEMA ) ( ifNotExists )? name= identifier ( databaseComment )? ( dbLocation )? ( KW_WITH KW_DBPROPERTIES dbprops= dbProperties )? -> ^( TOK_CREATEDATABASE $name ( ifNotExists )? ( dbLocation )? ( databaseComment )? ( $dbprops)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:944:7: KW_CREATE ( KW_DATABASE | KW_SCHEMA ) ( ifNotExists )? name= identifier ( databaseComment )? ( dbLocation )? ( KW_WITH KW_DBPROPERTIES dbprops= dbProperties )?
			{
			KW_CREATE121=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createDatabaseStatement2914); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE121);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:944:17: ( KW_DATABASE | KW_SCHEMA )
			int alt25=2;
			int LA25_0 = input.LA(1);
			if ( (LA25_0==KW_DATABASE) ) {
				alt25=1;
			}
			else if ( (LA25_0==KW_SCHEMA) ) {
				alt25=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 25, 0, input);
				throw nvae;
			}

			switch (alt25) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:944:18: KW_DATABASE
					{
					KW_DATABASE122=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_createDatabaseStatement2917); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE122);

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:944:30: KW_SCHEMA
					{
					KW_SCHEMA123=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_createDatabaseStatement2919); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA123);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:945:9: ( ifNotExists )?
			int alt26=2;
			int LA26_0 = input.LA(1);
			if ( (LA26_0==KW_IF) ) {
				alt26=1;
			}
			switch (alt26) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:945:9: ifNotExists
					{
					pushFollow(FOLLOW_ifNotExists_in_createDatabaseStatement2930);
					ifNotExists124=ifNotExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifNotExists.add(ifNotExists124.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_createDatabaseStatement2943);
			name=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(name.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:947:9: ( databaseComment )?
			int alt27=2;
			int LA27_0 = input.LA(1);
			if ( (LA27_0==KW_COMMENT) ) {
				alt27=1;
			}
			switch (alt27) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:947:9: databaseComment
					{
					pushFollow(FOLLOW_databaseComment_in_createDatabaseStatement2953);
					databaseComment125=databaseComment();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_databaseComment.add(databaseComment125.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:948:9: ( dbLocation )?
			int alt28=2;
			int LA28_0 = input.LA(1);
			if ( (LA28_0==KW_LOCATION) ) {
				alt28=1;
			}
			switch (alt28) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:948:9: dbLocation
					{
					pushFollow(FOLLOW_dbLocation_in_createDatabaseStatement2964);
					dbLocation126=dbLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_dbLocation.add(dbLocation126.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:949:9: ( KW_WITH KW_DBPROPERTIES dbprops= dbProperties )?
			int alt29=2;
			int LA29_0 = input.LA(1);
			if ( (LA29_0==KW_WITH) ) {
				alt29=1;
			}
			switch (alt29) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:949:10: KW_WITH KW_DBPROPERTIES dbprops= dbProperties
					{
					KW_WITH127=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_createDatabaseStatement2976); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH127);

					KW_DBPROPERTIES128=(Token)match(input,KW_DBPROPERTIES,FOLLOW_KW_DBPROPERTIES_in_createDatabaseStatement2978); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DBPROPERTIES.add(KW_DBPROPERTIES128);

					pushFollow(FOLLOW_dbProperties_in_createDatabaseStatement2982);
					dbprops=dbProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_dbProperties.add(dbprops.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: name, dbLocation, ifNotExists, dbprops, databaseComment
			// token labels: 
			// rule labels: name, dbprops, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name",name!=null?name.getTree():null);
			RewriteRuleSubtreeStream stream_dbprops=new RewriteRuleSubtreeStream(adaptor,"rule dbprops",dbprops!=null?dbprops.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 950:5: -> ^( TOK_CREATEDATABASE $name ( ifNotExists )? ( dbLocation )? ( databaseComment )? ( $dbprops)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:950:8: ^( TOK_CREATEDATABASE $name ( ifNotExists )? ( dbLocation )? ( databaseComment )? ( $dbprops)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEDATABASE, "TOK_CREATEDATABASE"), root_1);
				adaptor.addChild(root_1, stream_name.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:950:35: ( ifNotExists )?
				if ( stream_ifNotExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifNotExists.nextTree());
				}
				stream_ifNotExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:950:48: ( dbLocation )?
				if ( stream_dbLocation.hasNext() ) {
					adaptor.addChild(root_1, stream_dbLocation.nextTree());
				}
				stream_dbLocation.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:950:60: ( databaseComment )?
				if ( stream_databaseComment.hasNext() ) {
					adaptor.addChild(root_1, stream_databaseComment.nextTree());
				}
				stream_databaseComment.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:950:78: ( $dbprops)?
				if ( stream_dbprops.hasNext() ) {
					adaptor.addChild(root_1, stream_dbprops.nextTree());
				}
				stream_dbprops.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createDatabaseStatement"


	public static class dbLocation_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dbLocation"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:953:1: dbLocation : KW_LOCATION locn= StringLiteral -> ^( TOK_DATABASELOCATION $locn) ;
	public final HiveParser.dbLocation_return dbLocation() throws RecognitionException {
		HiveParser.dbLocation_return retval = new HiveParser.dbLocation_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token locn=null;
		Token KW_LOCATION129=null;

		ASTNode locn_tree=null;
		ASTNode KW_LOCATION129_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_LOCATION=new RewriteRuleTokenStream(adaptor,"token KW_LOCATION");

		 pushMsg("database location specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:956:5: ( KW_LOCATION locn= StringLiteral -> ^( TOK_DATABASELOCATION $locn) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:957:7: KW_LOCATION locn= StringLiteral
			{
			KW_LOCATION129=(Token)match(input,KW_LOCATION,FOLLOW_KW_LOCATION_in_dbLocation3043); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCATION.add(KW_LOCATION129);

			locn=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_dbLocation3047); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(locn);

			// AST REWRITE
			// elements: locn
			// token labels: locn
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_locn=new RewriteRuleTokenStream(adaptor,"token locn",locn);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 957:38: -> ^( TOK_DATABASELOCATION $locn)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:957:41: ^( TOK_DATABASELOCATION $locn)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DATABASELOCATION, "TOK_DATABASELOCATION"), root_1);
				adaptor.addChild(root_1, stream_locn.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dbLocation"


	public static class dbProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dbProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:960:1: dbProperties : LPAREN dbPropertiesList RPAREN -> ^( TOK_DATABASEPROPERTIES dbPropertiesList ) ;
	public final HiveParser.dbProperties_return dbProperties() throws RecognitionException {
		HiveParser.dbProperties_return retval = new HiveParser.dbProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN130=null;
		Token RPAREN132=null;
		ParserRuleReturnScope dbPropertiesList131 =null;

		ASTNode LPAREN130_tree=null;
		ASTNode RPAREN132_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_dbPropertiesList=new RewriteRuleSubtreeStream(adaptor,"rule dbPropertiesList");

		 pushMsg("dbproperties", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:963:5: ( LPAREN dbPropertiesList RPAREN -> ^( TOK_DATABASEPROPERTIES dbPropertiesList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:964:7: LPAREN dbPropertiesList RPAREN
			{
			LPAREN130=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_dbProperties3089); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN130);

			pushFollow(FOLLOW_dbPropertiesList_in_dbProperties3091);
			dbPropertiesList131=dbPropertiesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_dbPropertiesList.add(dbPropertiesList131.getTree());
			RPAREN132=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_dbProperties3093); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN132);

			// AST REWRITE
			// elements: dbPropertiesList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 964:38: -> ^( TOK_DATABASEPROPERTIES dbPropertiesList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:964:41: ^( TOK_DATABASEPROPERTIES dbPropertiesList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DATABASEPROPERTIES, "TOK_DATABASEPROPERTIES"), root_1);
				adaptor.addChild(root_1, stream_dbPropertiesList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dbProperties"


	public static class dbPropertiesList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dbPropertiesList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:967:1: dbPropertiesList : keyValueProperty ( COMMA keyValueProperty )* -> ^( TOK_DBPROPLIST ( keyValueProperty )+ ) ;
	public final HiveParser.dbPropertiesList_return dbPropertiesList() throws RecognitionException {
		HiveParser.dbPropertiesList_return retval = new HiveParser.dbPropertiesList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA134=null;
		ParserRuleReturnScope keyValueProperty133 =null;
		ParserRuleReturnScope keyValueProperty135 =null;

		ASTNode COMMA134_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_keyValueProperty=new RewriteRuleSubtreeStream(adaptor,"rule keyValueProperty");

		 pushMsg("database properties list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:970:5: ( keyValueProperty ( COMMA keyValueProperty )* -> ^( TOK_DBPROPLIST ( keyValueProperty )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:971:7: keyValueProperty ( COMMA keyValueProperty )*
			{
			pushFollow(FOLLOW_keyValueProperty_in_dbPropertiesList3134);
			keyValueProperty133=keyValueProperty();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_keyValueProperty.add(keyValueProperty133.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:971:24: ( COMMA keyValueProperty )*
			loop30:
			while (true) {
				int alt30=2;
				int LA30_0 = input.LA(1);
				if ( (LA30_0==COMMA) ) {
					alt30=1;
				}

				switch (alt30) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:971:25: COMMA keyValueProperty
					{
					COMMA134=(Token)match(input,COMMA,FOLLOW_COMMA_in_dbPropertiesList3137); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA134);

					pushFollow(FOLLOW_keyValueProperty_in_dbPropertiesList3139);
					keyValueProperty135=keyValueProperty();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_keyValueProperty.add(keyValueProperty135.getTree());
					}
					break;

				default :
					break loop30;
				}
			}

			// AST REWRITE
			// elements: keyValueProperty
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 971:50: -> ^( TOK_DBPROPLIST ( keyValueProperty )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:971:53: ^( TOK_DBPROPLIST ( keyValueProperty )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DBPROPLIST, "TOK_DBPROPLIST"), root_1);
				if ( !(stream_keyValueProperty.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_keyValueProperty.hasNext() ) {
					adaptor.addChild(root_1, stream_keyValueProperty.nextTree());
				}
				stream_keyValueProperty.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dbPropertiesList"


	public static class switchDatabaseStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "switchDatabaseStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:975:1: switchDatabaseStatement : KW_USE identifier -> ^( TOK_SWITCHDATABASE identifier ) ;
	public final HiveParser.switchDatabaseStatement_return switchDatabaseStatement() throws RecognitionException {
		HiveParser.switchDatabaseStatement_return retval = new HiveParser.switchDatabaseStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_USE136=null;
		ParserRuleReturnScope identifier137 =null;

		ASTNode KW_USE136_tree=null;
		RewriteRuleTokenStream stream_KW_USE=new RewriteRuleTokenStream(adaptor,"token KW_USE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("switch database statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:978:5: ( KW_USE identifier -> ^( TOK_SWITCHDATABASE identifier ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:978:7: KW_USE identifier
			{
			KW_USE136=(Token)match(input,KW_USE,FOLLOW_KW_USE_in_switchDatabaseStatement3178); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_USE.add(KW_USE136);

			pushFollow(FOLLOW_identifier_in_switchDatabaseStatement3180);
			identifier137=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(identifier137.getTree());
			// AST REWRITE
			// elements: identifier
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 979:5: -> ^( TOK_SWITCHDATABASE identifier )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:979:8: ^( TOK_SWITCHDATABASE identifier )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SWITCHDATABASE, "TOK_SWITCHDATABASE"), root_1);
				adaptor.addChild(root_1, stream_identifier.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "switchDatabaseStatement"


	public static class dropDatabaseStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropDatabaseStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:982:1: dropDatabaseStatement : KW_DROP ( KW_DATABASE | KW_SCHEMA ) ( ifExists )? identifier ( restrictOrCascade )? -> ^( TOK_DROPDATABASE identifier ( ifExists )? ( restrictOrCascade )? ) ;
	public final HiveParser.dropDatabaseStatement_return dropDatabaseStatement() throws RecognitionException {
		HiveParser.dropDatabaseStatement_return retval = new HiveParser.dropDatabaseStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP138=null;
		Token KW_DATABASE139=null;
		Token KW_SCHEMA140=null;
		ParserRuleReturnScope ifExists141 =null;
		ParserRuleReturnScope identifier142 =null;
		ParserRuleReturnScope restrictOrCascade143 =null;

		ASTNode KW_DROP138_tree=null;
		ASTNode KW_DATABASE139_tree=null;
		ASTNode KW_SCHEMA140_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");
		RewriteRuleSubtreeStream stream_restrictOrCascade=new RewriteRuleSubtreeStream(adaptor,"rule restrictOrCascade");

		 pushMsg("drop database statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:5: ( KW_DROP ( KW_DATABASE | KW_SCHEMA ) ( ifExists )? identifier ( restrictOrCascade )? -> ^( TOK_DROPDATABASE identifier ( ifExists )? ( restrictOrCascade )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:7: KW_DROP ( KW_DATABASE | KW_SCHEMA ) ( ifExists )? identifier ( restrictOrCascade )?
			{
			KW_DROP138=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropDatabaseStatement3219); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP138);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:15: ( KW_DATABASE | KW_SCHEMA )
			int alt31=2;
			int LA31_0 = input.LA(1);
			if ( (LA31_0==KW_DATABASE) ) {
				alt31=1;
			}
			else if ( (LA31_0==KW_SCHEMA) ) {
				alt31=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 31, 0, input);
				throw nvae;
			}

			switch (alt31) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:16: KW_DATABASE
					{
					KW_DATABASE139=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_dropDatabaseStatement3222); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE139);

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:28: KW_SCHEMA
					{
					KW_SCHEMA140=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_dropDatabaseStatement3224); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA140);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:39: ( ifExists )?
			int alt32=2;
			int LA32_0 = input.LA(1);
			if ( (LA32_0==KW_IF) ) {
				alt32=1;
			}
			switch (alt32) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:39: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropDatabaseStatement3227);
					ifExists141=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists141.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_dropDatabaseStatement3230);
			identifier142=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(identifier142.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:60: ( restrictOrCascade )?
			int alt33=2;
			int LA33_0 = input.LA(1);
			if ( (LA33_0==KW_CASCADE||LA33_0==KW_RESTRICT) ) {
				alt33=1;
			}
			switch (alt33) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:985:60: restrictOrCascade
					{
					pushFollow(FOLLOW_restrictOrCascade_in_dropDatabaseStatement3232);
					restrictOrCascade143=restrictOrCascade();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_restrictOrCascade.add(restrictOrCascade143.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: restrictOrCascade, identifier, ifExists
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 986:5: -> ^( TOK_DROPDATABASE identifier ( ifExists )? ( restrictOrCascade )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:986:8: ^( TOK_DROPDATABASE identifier ( ifExists )? ( restrictOrCascade )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPDATABASE, "TOK_DROPDATABASE"), root_1);
				adaptor.addChild(root_1, stream_identifier.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:986:38: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:986:48: ( restrictOrCascade )?
				if ( stream_restrictOrCascade.hasNext() ) {
					adaptor.addChild(root_1, stream_restrictOrCascade.nextTree());
				}
				stream_restrictOrCascade.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropDatabaseStatement"


	public static class databaseComment_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "databaseComment"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:989:1: databaseComment : KW_COMMENT comment= StringLiteral -> ^( TOK_DATABASECOMMENT $comment) ;
	public final HiveParser.databaseComment_return databaseComment() throws RecognitionException {
		HiveParser.databaseComment_return retval = new HiveParser.databaseComment_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_COMMENT144=null;

		ASTNode comment_tree=null;
		ASTNode KW_COMMENT144_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");

		 pushMsg("database's comment", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:992:5: ( KW_COMMENT comment= StringLiteral -> ^( TOK_DATABASECOMMENT $comment) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:992:7: KW_COMMENT comment= StringLiteral
			{
			KW_COMMENT144=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_databaseComment3278); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT144);

			comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_databaseComment3282); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

			// AST REWRITE
			// elements: comment
			// token labels: comment
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 993:5: -> ^( TOK_DATABASECOMMENT $comment)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:993:8: ^( TOK_DATABASECOMMENT $comment)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DATABASECOMMENT, "TOK_DATABASECOMMENT"), root_1);
				adaptor.addChild(root_1, stream_comment.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "databaseComment"


	public static class createTableStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createTableStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:996:1: createTableStatement : KW_CREATE (temp= KW_TEMPORARY )? (ext= KW_EXTERNAL )? KW_TABLE ( ifNotExists )? name= tableName (like= KW_LIKE likeName= tableName ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? | ( LPAREN columnNameTypeOrPKOrFKList RPAREN )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( KW_AS selectStatementWithCTE )? ) -> ^( TOK_CREATETABLE $name ( $temp)? ( $ext)? ( ifNotExists )? ^( TOK_LIKETABLE ( $likeName)? ) ( columnNameTypeOrPKOrFKList )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( selectStatementWithCTE )? ) ;
	public final HiveParser.createTableStatement_return createTableStatement() throws RecognitionException {
		HiveParser.createTableStatement_return retval = new HiveParser.createTableStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token temp=null;
		Token ext=null;
		Token like=null;
		Token KW_CREATE145=null;
		Token KW_TABLE146=null;
		Token LPAREN152=null;
		Token RPAREN154=null;
		Token KW_AS163=null;
		ParserRuleReturnScope name =null;
		ParserRuleReturnScope likeName =null;
		ParserRuleReturnScope ifNotExists147 =null;
		ParserRuleReturnScope tableRowFormat148 =null;
		ParserRuleReturnScope tableFileFormat149 =null;
		ParserRuleReturnScope tableLocation150 =null;
		ParserRuleReturnScope tablePropertiesPrefixed151 =null;
		ParserRuleReturnScope columnNameTypeOrPKOrFKList153 =null;
		ParserRuleReturnScope tableComment155 =null;
		ParserRuleReturnScope tablePartition156 =null;
		ParserRuleReturnScope tableBuckets157 =null;
		ParserRuleReturnScope tableSkewed158 =null;
		ParserRuleReturnScope tableRowFormat159 =null;
		ParserRuleReturnScope tableFileFormat160 =null;
		ParserRuleReturnScope tableLocation161 =null;
		ParserRuleReturnScope tablePropertiesPrefixed162 =null;
		ParserRuleReturnScope selectStatementWithCTE164 =null;

		ASTNode temp_tree=null;
		ASTNode ext_tree=null;
		ASTNode like_tree=null;
		ASTNode KW_CREATE145_tree=null;
		ASTNode KW_TABLE146_tree=null;
		ASTNode LPAREN152_tree=null;
		ASTNode RPAREN154_tree=null;
		ASTNode KW_AS163_tree=null;
		RewriteRuleTokenStream stream_KW_TEMPORARY=new RewriteRuleTokenStream(adaptor,"token KW_TEMPORARY");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_EXTERNAL=new RewriteRuleTokenStream(adaptor,"token KW_EXTERNAL");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleTokenStream stream_KW_LIKE=new RewriteRuleTokenStream(adaptor,"token KW_LIKE");
		RewriteRuleSubtreeStream stream_tableRowFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormat");
		RewriteRuleSubtreeStream stream_selectStatementWithCTE=new RewriteRuleSubtreeStream(adaptor,"rule selectStatementWithCTE");
		RewriteRuleSubtreeStream stream_tableLocation=new RewriteRuleSubtreeStream(adaptor,"rule tableLocation");
		RewriteRuleSubtreeStream stream_columnNameTypeOrPKOrFKList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameTypeOrPKOrFKList");
		RewriteRuleSubtreeStream stream_tableSkewed=new RewriteRuleSubtreeStream(adaptor,"rule tableSkewed");
		RewriteRuleSubtreeStream stream_tablePropertiesPrefixed=new RewriteRuleSubtreeStream(adaptor,"rule tablePropertiesPrefixed");
		RewriteRuleSubtreeStream stream_ifNotExists=new RewriteRuleSubtreeStream(adaptor,"rule ifNotExists");
		RewriteRuleSubtreeStream stream_tableFileFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableFileFormat");
		RewriteRuleSubtreeStream stream_tableComment=new RewriteRuleSubtreeStream(adaptor,"rule tableComment");
		RewriteRuleSubtreeStream stream_tablePartition=new RewriteRuleSubtreeStream(adaptor,"rule tablePartition");
		RewriteRuleSubtreeStream stream_tableBuckets=new RewriteRuleSubtreeStream(adaptor,"rule tableBuckets");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("create table statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:5: ( KW_CREATE (temp= KW_TEMPORARY )? (ext= KW_EXTERNAL )? KW_TABLE ( ifNotExists )? name= tableName (like= KW_LIKE likeName= tableName ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? | ( LPAREN columnNameTypeOrPKOrFKList RPAREN )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( KW_AS selectStatementWithCTE )? ) -> ^( TOK_CREATETABLE $name ( $temp)? ( $ext)? ( ifNotExists )? ^( TOK_LIKETABLE ( $likeName)? ) ( columnNameTypeOrPKOrFKList )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( selectStatementWithCTE )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:7: KW_CREATE (temp= KW_TEMPORARY )? (ext= KW_EXTERNAL )? KW_TABLE ( ifNotExists )? name= tableName (like= KW_LIKE likeName= tableName ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? | ( LPAREN columnNameTypeOrPKOrFKList RPAREN )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( KW_AS selectStatementWithCTE )? )
			{
			KW_CREATE145=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createTableStatement3322); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE145);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:17: (temp= KW_TEMPORARY )?
			int alt34=2;
			int LA34_0 = input.LA(1);
			if ( (LA34_0==KW_TEMPORARY) ) {
				alt34=1;
			}
			switch (alt34) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:18: temp= KW_TEMPORARY
					{
					temp=(Token)match(input,KW_TEMPORARY,FOLLOW_KW_TEMPORARY_in_createTableStatement3327); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TEMPORARY.add(temp);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:38: (ext= KW_EXTERNAL )?
			int alt35=2;
			int LA35_0 = input.LA(1);
			if ( (LA35_0==KW_EXTERNAL) ) {
				alt35=1;
			}
			switch (alt35) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:39: ext= KW_EXTERNAL
					{
					ext=(Token)match(input,KW_EXTERNAL,FOLLOW_KW_EXTERNAL_in_createTableStatement3334); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_EXTERNAL.add(ext);

					}
					break;

			}

			KW_TABLE146=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_createTableStatement3338); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE146);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:66: ( ifNotExists )?
			int alt36=2;
			int LA36_0 = input.LA(1);
			if ( (LA36_0==KW_IF) ) {
				alt36=1;
			}
			switch (alt36) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:999:66: ifNotExists
					{
					pushFollow(FOLLOW_ifNotExists_in_createTableStatement3340);
					ifNotExists147=ifNotExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifNotExists.add(ifNotExists147.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_tableName_in_createTableStatement3345);
			name=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(name.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1000:7: (like= KW_LIKE likeName= tableName ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? | ( LPAREN columnNameTypeOrPKOrFKList RPAREN )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( KW_AS selectStatementWithCTE )? )
			int alt51=2;
			int LA51_0 = input.LA(1);
			if ( (LA51_0==KW_LIKE) ) {
				alt51=1;
			}
			else if ( (LA51_0==EOF||LA51_0==KW_AS||LA51_0==KW_CLUSTERED||LA51_0==KW_COMMENT||LA51_0==KW_LOCATION||LA51_0==KW_PARTITIONED||LA51_0==KW_ROW||LA51_0==KW_SKEWED||LA51_0==KW_STORED||LA51_0==KW_TBLPROPERTIES||LA51_0==LPAREN) ) {
				alt51=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 51, 0, input);
				throw nvae;
			}

			switch (alt51) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1000:10: like= KW_LIKE likeName= tableName ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )?
					{
					like=(Token)match(input,KW_LIKE,FOLLOW_KW_LIKE_in_createTableStatement3358); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LIKE.add(like);

					pushFollow(FOLLOW_tableName_in_createTableStatement3362);
					likeName=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(likeName.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1001:10: ( tableRowFormat )?
					int alt37=2;
					int LA37_0 = input.LA(1);
					if ( (LA37_0==KW_ROW) ) {
						alt37=1;
					}
					switch (alt37) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1001:10: tableRowFormat
							{
							pushFollow(FOLLOW_tableRowFormat_in_createTableStatement3373);
							tableRowFormat148=tableRowFormat();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableRowFormat.add(tableRowFormat148.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1002:10: ( tableFileFormat )?
					int alt38=2;
					int LA38_0 = input.LA(1);
					if ( (LA38_0==KW_STORED) ) {
						alt38=1;
					}
					switch (alt38) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1002:10: tableFileFormat
							{
							pushFollow(FOLLOW_tableFileFormat_in_createTableStatement3385);
							tableFileFormat149=tableFileFormat();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableFileFormat.add(tableFileFormat149.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1003:10: ( tableLocation )?
					int alt39=2;
					int LA39_0 = input.LA(1);
					if ( (LA39_0==KW_LOCATION) ) {
						alt39=1;
					}
					switch (alt39) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1003:10: tableLocation
							{
							pushFollow(FOLLOW_tableLocation_in_createTableStatement3397);
							tableLocation150=tableLocation();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableLocation.add(tableLocation150.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1004:10: ( tablePropertiesPrefixed )?
					int alt40=2;
					int LA40_0 = input.LA(1);
					if ( (LA40_0==KW_TBLPROPERTIES) ) {
						alt40=1;
					}
					switch (alt40) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1004:10: tablePropertiesPrefixed
							{
							pushFollow(FOLLOW_tablePropertiesPrefixed_in_createTableStatement3409);
							tablePropertiesPrefixed151=tablePropertiesPrefixed();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tablePropertiesPrefixed.add(tablePropertiesPrefixed151.getTree());
							}
							break;

					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1005:10: ( LPAREN columnNameTypeOrPKOrFKList RPAREN )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( KW_AS selectStatementWithCTE )?
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1005:10: ( LPAREN columnNameTypeOrPKOrFKList RPAREN )?
					int alt41=2;
					int LA41_0 = input.LA(1);
					if ( (LA41_0==LPAREN) ) {
						alt41=1;
					}
					switch (alt41) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1005:11: LPAREN columnNameTypeOrPKOrFKList RPAREN
							{
							LPAREN152=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_createTableStatement3422); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN152);

							pushFollow(FOLLOW_columnNameTypeOrPKOrFKList_in_createTableStatement3424);
							columnNameTypeOrPKOrFKList153=columnNameTypeOrPKOrFKList();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_columnNameTypeOrPKOrFKList.add(columnNameTypeOrPKOrFKList153.getTree());
							RPAREN154=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_createTableStatement3426); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN154);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1006:10: ( tableComment )?
					int alt42=2;
					int LA42_0 = input.LA(1);
					if ( (LA42_0==KW_COMMENT) ) {
						alt42=1;
					}
					switch (alt42) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1006:10: tableComment
							{
							pushFollow(FOLLOW_tableComment_in_createTableStatement3439);
							tableComment155=tableComment();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableComment.add(tableComment155.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1007:10: ( tablePartition )?
					int alt43=2;
					int LA43_0 = input.LA(1);
					if ( (LA43_0==KW_PARTITIONED) ) {
						alt43=1;
					}
					switch (alt43) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1007:10: tablePartition
							{
							pushFollow(FOLLOW_tablePartition_in_createTableStatement3451);
							tablePartition156=tablePartition();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tablePartition.add(tablePartition156.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1008:10: ( tableBuckets )?
					int alt44=2;
					int LA44_0 = input.LA(1);
					if ( (LA44_0==KW_CLUSTERED) ) {
						alt44=1;
					}
					switch (alt44) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1008:10: tableBuckets
							{
							pushFollow(FOLLOW_tableBuckets_in_createTableStatement3463);
							tableBuckets157=tableBuckets();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableBuckets.add(tableBuckets157.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1009:10: ( tableSkewed )?
					int alt45=2;
					int LA45_0 = input.LA(1);
					if ( (LA45_0==KW_SKEWED) ) {
						alt45=1;
					}
					switch (alt45) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1009:10: tableSkewed
							{
							pushFollow(FOLLOW_tableSkewed_in_createTableStatement3475);
							tableSkewed158=tableSkewed();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableSkewed.add(tableSkewed158.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1010:10: ( tableRowFormat )?
					int alt46=2;
					int LA46_0 = input.LA(1);
					if ( (LA46_0==KW_ROW) ) {
						alt46=1;
					}
					switch (alt46) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1010:10: tableRowFormat
							{
							pushFollow(FOLLOW_tableRowFormat_in_createTableStatement3487);
							tableRowFormat159=tableRowFormat();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableRowFormat.add(tableRowFormat159.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1011:10: ( tableFileFormat )?
					int alt47=2;
					int LA47_0 = input.LA(1);
					if ( (LA47_0==KW_STORED) ) {
						alt47=1;
					}
					switch (alt47) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1011:10: tableFileFormat
							{
							pushFollow(FOLLOW_tableFileFormat_in_createTableStatement3499);
							tableFileFormat160=tableFileFormat();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableFileFormat.add(tableFileFormat160.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1012:10: ( tableLocation )?
					int alt48=2;
					int LA48_0 = input.LA(1);
					if ( (LA48_0==KW_LOCATION) ) {
						alt48=1;
					}
					switch (alt48) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1012:10: tableLocation
							{
							pushFollow(FOLLOW_tableLocation_in_createTableStatement3511);
							tableLocation161=tableLocation();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableLocation.add(tableLocation161.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1013:10: ( tablePropertiesPrefixed )?
					int alt49=2;
					int LA49_0 = input.LA(1);
					if ( (LA49_0==KW_TBLPROPERTIES) ) {
						alt49=1;
					}
					switch (alt49) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1013:10: tablePropertiesPrefixed
							{
							pushFollow(FOLLOW_tablePropertiesPrefixed_in_createTableStatement3523);
							tablePropertiesPrefixed162=tablePropertiesPrefixed();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tablePropertiesPrefixed.add(tablePropertiesPrefixed162.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1014:10: ( KW_AS selectStatementWithCTE )?
					int alt50=2;
					int LA50_0 = input.LA(1);
					if ( (LA50_0==KW_AS) ) {
						alt50=1;
					}
					switch (alt50) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1014:11: KW_AS selectStatementWithCTE
							{
							KW_AS163=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_createTableStatement3536); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS163);

							pushFollow(FOLLOW_selectStatementWithCTE_in_createTableStatement3538);
							selectStatementWithCTE164=selectStatementWithCTE();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_selectStatementWithCTE.add(selectStatementWithCTE164.getTree());
							}
							break;

					}

					}
					break;

			}

			// AST REWRITE
			// elements: tableFileFormat, ext, tableComment, tablePartition, name, selectStatementWithCTE, temp, ifNotExists, tableRowFormat, tableSkewed, tablePropertiesPrefixed, tableLocation, columnNameTypeOrPKOrFKList, tableBuckets, likeName
			// token labels: ext, temp
			// rule labels: likeName, name, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_ext=new RewriteRuleTokenStream(adaptor,"token ext",ext);
			RewriteRuleTokenStream stream_temp=new RewriteRuleTokenStream(adaptor,"token temp",temp);
			RewriteRuleSubtreeStream stream_likeName=new RewriteRuleSubtreeStream(adaptor,"rule likeName",likeName!=null?likeName.getTree():null);
			RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name",name!=null?name.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1016:5: -> ^( TOK_CREATETABLE $name ( $temp)? ( $ext)? ( ifNotExists )? ^( TOK_LIKETABLE ( $likeName)? ) ( columnNameTypeOrPKOrFKList )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( selectStatementWithCTE )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1016:8: ^( TOK_CREATETABLE $name ( $temp)? ( $ext)? ( ifNotExists )? ^( TOK_LIKETABLE ( $likeName)? ) ( columnNameTypeOrPKOrFKList )? ( tableComment )? ( tablePartition )? ( tableBuckets )? ( tableSkewed )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( selectStatementWithCTE )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATETABLE, "TOK_CREATETABLE"), root_1);
				adaptor.addChild(root_1, stream_name.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1016:33: ( $temp)?
				if ( stream_temp.hasNext() ) {
					adaptor.addChild(root_1, stream_temp.nextNode());
				}
				stream_temp.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1016:40: ( $ext)?
				if ( stream_ext.hasNext() ) {
					adaptor.addChild(root_1, stream_ext.nextNode());
				}
				stream_ext.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1016:45: ( ifNotExists )?
				if ( stream_ifNotExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifNotExists.nextTree());
				}
				stream_ifNotExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1017:10: ^( TOK_LIKETABLE ( $likeName)? )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LIKETABLE, "TOK_LIKETABLE"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1017:27: ( $likeName)?
				if ( stream_likeName.hasNext() ) {
					adaptor.addChild(root_2, stream_likeName.nextTree());
				}
				stream_likeName.reset();

				adaptor.addChild(root_1, root_2);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1018:10: ( columnNameTypeOrPKOrFKList )?
				if ( stream_columnNameTypeOrPKOrFKList.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameTypeOrPKOrFKList.nextTree());
				}
				stream_columnNameTypeOrPKOrFKList.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1019:10: ( tableComment )?
				if ( stream_tableComment.hasNext() ) {
					adaptor.addChild(root_1, stream_tableComment.nextTree());
				}
				stream_tableComment.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1020:10: ( tablePartition )?
				if ( stream_tablePartition.hasNext() ) {
					adaptor.addChild(root_1, stream_tablePartition.nextTree());
				}
				stream_tablePartition.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1021:10: ( tableBuckets )?
				if ( stream_tableBuckets.hasNext() ) {
					adaptor.addChild(root_1, stream_tableBuckets.nextTree());
				}
				stream_tableBuckets.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1022:10: ( tableSkewed )?
				if ( stream_tableSkewed.hasNext() ) {
					adaptor.addChild(root_1, stream_tableSkewed.nextTree());
				}
				stream_tableSkewed.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1023:10: ( tableRowFormat )?
				if ( stream_tableRowFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormat.nextTree());
				}
				stream_tableRowFormat.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1024:10: ( tableFileFormat )?
				if ( stream_tableFileFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableFileFormat.nextTree());
				}
				stream_tableFileFormat.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1025:10: ( tableLocation )?
				if ( stream_tableLocation.hasNext() ) {
					adaptor.addChild(root_1, stream_tableLocation.nextTree());
				}
				stream_tableLocation.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1026:10: ( tablePropertiesPrefixed )?
				if ( stream_tablePropertiesPrefixed.hasNext() ) {
					adaptor.addChild(root_1, stream_tablePropertiesPrefixed.nextTree());
				}
				stream_tablePropertiesPrefixed.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1027:10: ( selectStatementWithCTE )?
				if ( stream_selectStatementWithCTE.hasNext() ) {
					adaptor.addChild(root_1, stream_selectStatementWithCTE.nextTree());
				}
				stream_selectStatementWithCTE.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createTableStatement"


	public static class truncateTableStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "truncateTableStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1031:1: truncateTableStatement : KW_TRUNCATE KW_TABLE tablePartitionPrefix ( KW_COLUMNS LPAREN columnNameList RPAREN )? -> ^( TOK_TRUNCATETABLE tablePartitionPrefix ( columnNameList )? ) ;
	public final HiveParser.truncateTableStatement_return truncateTableStatement() throws RecognitionException {
		HiveParser.truncateTableStatement_return retval = new HiveParser.truncateTableStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_TRUNCATE165=null;
		Token KW_TABLE166=null;
		Token KW_COLUMNS168=null;
		Token LPAREN169=null;
		Token RPAREN171=null;
		ParserRuleReturnScope tablePartitionPrefix167 =null;
		ParserRuleReturnScope columnNameList170 =null;

		ASTNode KW_TRUNCATE165_tree=null;
		ASTNode KW_TABLE166_tree=null;
		ASTNode KW_COLUMNS168_tree=null;
		ASTNode LPAREN169_tree=null;
		ASTNode RPAREN171_tree=null;
		RewriteRuleTokenStream stream_KW_COLUMNS=new RewriteRuleTokenStream(adaptor,"token KW_COLUMNS");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_TRUNCATE=new RewriteRuleTokenStream(adaptor,"token KW_TRUNCATE");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_tablePartitionPrefix=new RewriteRuleSubtreeStream(adaptor,"rule tablePartitionPrefix");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");

		 pushMsg("truncate table statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1034:5: ( KW_TRUNCATE KW_TABLE tablePartitionPrefix ( KW_COLUMNS LPAREN columnNameList RPAREN )? -> ^( TOK_TRUNCATETABLE tablePartitionPrefix ( columnNameList )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1034:7: KW_TRUNCATE KW_TABLE tablePartitionPrefix ( KW_COLUMNS LPAREN columnNameList RPAREN )?
			{
			KW_TRUNCATE165=(Token)match(input,KW_TRUNCATE,FOLLOW_KW_TRUNCATE_in_truncateTableStatement3745); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TRUNCATE.add(KW_TRUNCATE165);

			KW_TABLE166=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_truncateTableStatement3747); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE166);

			pushFollow(FOLLOW_tablePartitionPrefix_in_truncateTableStatement3749);
			tablePartitionPrefix167=tablePartitionPrefix();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tablePartitionPrefix.add(tablePartitionPrefix167.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1034:49: ( KW_COLUMNS LPAREN columnNameList RPAREN )?
			int alt52=2;
			int LA52_0 = input.LA(1);
			if ( (LA52_0==KW_COLUMNS) ) {
				alt52=1;
			}
			switch (alt52) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1034:50: KW_COLUMNS LPAREN columnNameList RPAREN
					{
					KW_COLUMNS168=(Token)match(input,KW_COLUMNS,FOLLOW_KW_COLUMNS_in_truncateTableStatement3752); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COLUMNS.add(KW_COLUMNS168);

					LPAREN169=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_truncateTableStatement3754); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN169);

					pushFollow(FOLLOW_columnNameList_in_truncateTableStatement3756);
					columnNameList170=columnNameList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameList.add(columnNameList170.getTree());
					RPAREN171=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_truncateTableStatement3758); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN171);

					}
					break;

			}

			// AST REWRITE
			// elements: columnNameList, tablePartitionPrefix
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1034:92: -> ^( TOK_TRUNCATETABLE tablePartitionPrefix ( columnNameList )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1034:95: ^( TOK_TRUNCATETABLE tablePartitionPrefix ( columnNameList )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TRUNCATETABLE, "TOK_TRUNCATETABLE"), root_1);
				adaptor.addChild(root_1, stream_tablePartitionPrefix.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1034:136: ( columnNameList )?
				if ( stream_columnNameList.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameList.nextTree());
				}
				stream_columnNameList.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "truncateTableStatement"


	public static class createIndexStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createIndexStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1036:1: createIndexStatement : KW_CREATE KW_INDEX indexName= identifier KW_ON KW_TABLE tab= tableName LPAREN indexedCols= columnNameList RPAREN KW_AS typeName= StringLiteral ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )? -> ^( TOK_CREATEINDEX $indexName $typeName $tab $indexedCols ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )? ) ;
	public final HiveParser.createIndexStatement_return createIndexStatement() throws RecognitionException {
		HiveParser.createIndexStatement_return retval = new HiveParser.createIndexStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token typeName=null;
		Token KW_CREATE172=null;
		Token KW_INDEX173=null;
		Token KW_ON174=null;
		Token KW_TABLE175=null;
		Token LPAREN176=null;
		Token RPAREN177=null;
		Token KW_AS178=null;
		ParserRuleReturnScope indexName =null;
		ParserRuleReturnScope tab =null;
		ParserRuleReturnScope indexedCols =null;
		ParserRuleReturnScope autoRebuild179 =null;
		ParserRuleReturnScope indexPropertiesPrefixed180 =null;
		ParserRuleReturnScope indexTblName181 =null;
		ParserRuleReturnScope tableRowFormat182 =null;
		ParserRuleReturnScope tableFileFormat183 =null;
		ParserRuleReturnScope tableLocation184 =null;
		ParserRuleReturnScope tablePropertiesPrefixed185 =null;
		ParserRuleReturnScope indexComment186 =null;

		ASTNode typeName_tree=null;
		ASTNode KW_CREATE172_tree=null;
		ASTNode KW_INDEX173_tree=null;
		ASTNode KW_ON174_tree=null;
		ASTNode KW_TABLE175_tree=null;
		ASTNode LPAREN176_tree=null;
		ASTNode RPAREN177_tree=null;
		ASTNode KW_AS178_tree=null;
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_INDEX=new RewriteRuleTokenStream(adaptor,"token KW_INDEX");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_tableRowFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormat");
		RewriteRuleSubtreeStream stream_indexComment=new RewriteRuleSubtreeStream(adaptor,"rule indexComment");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_tableLocation=new RewriteRuleSubtreeStream(adaptor,"rule tableLocation");
		RewriteRuleSubtreeStream stream_tablePropertiesPrefixed=new RewriteRuleSubtreeStream(adaptor,"rule tablePropertiesPrefixed");
		RewriteRuleSubtreeStream stream_tableFileFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableFileFormat");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");
		RewriteRuleSubtreeStream stream_indexTblName=new RewriteRuleSubtreeStream(adaptor,"rule indexTblName");
		RewriteRuleSubtreeStream stream_autoRebuild=new RewriteRuleSubtreeStream(adaptor,"rule autoRebuild");
		RewriteRuleSubtreeStream stream_indexPropertiesPrefixed=new RewriteRuleSubtreeStream(adaptor,"rule indexPropertiesPrefixed");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("create index statement", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1039:5: ( KW_CREATE KW_INDEX indexName= identifier KW_ON KW_TABLE tab= tableName LPAREN indexedCols= columnNameList RPAREN KW_AS typeName= StringLiteral ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )? -> ^( TOK_CREATEINDEX $indexName $typeName $tab $indexedCols ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1039:7: KW_CREATE KW_INDEX indexName= identifier KW_ON KW_TABLE tab= tableName LPAREN indexedCols= columnNameList RPAREN KW_AS typeName= StringLiteral ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )?
			{
			KW_CREATE172=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createIndexStatement3793); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE172);

			KW_INDEX173=(Token)match(input,KW_INDEX,FOLLOW_KW_INDEX_in_createIndexStatement3795); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INDEX.add(KW_INDEX173);

			pushFollow(FOLLOW_identifier_in_createIndexStatement3799);
			indexName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(indexName.getTree());
			KW_ON174=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_createIndexStatement3807); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON174);

			KW_TABLE175=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_createIndexStatement3809); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE175);

			pushFollow(FOLLOW_tableName_in_createIndexStatement3813);
			tab=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tab.getTree());
			LPAREN176=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_createIndexStatement3815); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN176);

			pushFollow(FOLLOW_columnNameList_in_createIndexStatement3819);
			indexedCols=columnNameList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameList.add(indexedCols.getTree());
			RPAREN177=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_createIndexStatement3821); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN177);

			KW_AS178=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_createIndexStatement3829); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS178);

			typeName=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_createIndexStatement3833); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(typeName);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1042:7: ( autoRebuild )?
			int alt53=2;
			int LA53_0 = input.LA(1);
			if ( (LA53_0==KW_WITH) ) {
				alt53=1;
			}
			switch (alt53) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1042:7: autoRebuild
					{
					pushFollow(FOLLOW_autoRebuild_in_createIndexStatement3841);
					autoRebuild179=autoRebuild();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_autoRebuild.add(autoRebuild179.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1043:7: ( indexPropertiesPrefixed )?
			int alt54=2;
			int LA54_0 = input.LA(1);
			if ( (LA54_0==KW_IDXPROPERTIES) ) {
				alt54=1;
			}
			switch (alt54) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1043:7: indexPropertiesPrefixed
					{
					pushFollow(FOLLOW_indexPropertiesPrefixed_in_createIndexStatement3850);
					indexPropertiesPrefixed180=indexPropertiesPrefixed();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_indexPropertiesPrefixed.add(indexPropertiesPrefixed180.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1044:7: ( indexTblName )?
			int alt55=2;
			int LA55_0 = input.LA(1);
			if ( (LA55_0==KW_IN) ) {
				alt55=1;
			}
			switch (alt55) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1044:7: indexTblName
					{
					pushFollow(FOLLOW_indexTblName_in_createIndexStatement3859);
					indexTblName181=indexTblName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_indexTblName.add(indexTblName181.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1045:7: ( tableRowFormat )?
			int alt56=2;
			int LA56_0 = input.LA(1);
			if ( (LA56_0==KW_ROW) ) {
				alt56=1;
			}
			switch (alt56) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1045:7: tableRowFormat
					{
					pushFollow(FOLLOW_tableRowFormat_in_createIndexStatement3868);
					tableRowFormat182=tableRowFormat();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowFormat.add(tableRowFormat182.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1046:7: ( tableFileFormat )?
			int alt57=2;
			int LA57_0 = input.LA(1);
			if ( (LA57_0==KW_STORED) ) {
				alt57=1;
			}
			switch (alt57) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1046:7: tableFileFormat
					{
					pushFollow(FOLLOW_tableFileFormat_in_createIndexStatement3877);
					tableFileFormat183=tableFileFormat();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableFileFormat.add(tableFileFormat183.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1047:7: ( tableLocation )?
			int alt58=2;
			int LA58_0 = input.LA(1);
			if ( (LA58_0==KW_LOCATION) ) {
				alt58=1;
			}
			switch (alt58) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1047:7: tableLocation
					{
					pushFollow(FOLLOW_tableLocation_in_createIndexStatement3886);
					tableLocation184=tableLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableLocation.add(tableLocation184.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1048:7: ( tablePropertiesPrefixed )?
			int alt59=2;
			int LA59_0 = input.LA(1);
			if ( (LA59_0==KW_TBLPROPERTIES) ) {
				alt59=1;
			}
			switch (alt59) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1048:7: tablePropertiesPrefixed
					{
					pushFollow(FOLLOW_tablePropertiesPrefixed_in_createIndexStatement3895);
					tablePropertiesPrefixed185=tablePropertiesPrefixed();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tablePropertiesPrefixed.add(tablePropertiesPrefixed185.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1049:7: ( indexComment )?
			int alt60=2;
			int LA60_0 = input.LA(1);
			if ( (LA60_0==KW_COMMENT) ) {
				alt60=1;
			}
			switch (alt60) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1049:7: indexComment
					{
					pushFollow(FOLLOW_indexComment_in_createIndexStatement3904);
					indexComment186=indexComment();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_indexComment.add(indexComment186.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: indexTblName, tableLocation, typeName, autoRebuild, tableRowFormat, indexPropertiesPrefixed, indexComment, indexName, tableFileFormat, tab, indexedCols, tablePropertiesPrefixed
			// token labels: typeName
			// rule labels: indexedCols, tab, indexName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_typeName=new RewriteRuleTokenStream(adaptor,"token typeName",typeName);
			RewriteRuleSubtreeStream stream_indexedCols=new RewriteRuleSubtreeStream(adaptor,"rule indexedCols",indexedCols!=null?indexedCols.getTree():null);
			RewriteRuleSubtreeStream stream_tab=new RewriteRuleSubtreeStream(adaptor,"rule tab",tab!=null?tab.getTree():null);
			RewriteRuleSubtreeStream stream_indexName=new RewriteRuleSubtreeStream(adaptor,"rule indexName",indexName!=null?indexName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1050:5: -> ^( TOK_CREATEINDEX $indexName $typeName $tab $indexedCols ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1050:7: ^( TOK_CREATEINDEX $indexName $typeName $tab $indexedCols ( autoRebuild )? ( indexPropertiesPrefixed )? ( indexTblName )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? ( indexComment )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEINDEX, "TOK_CREATEINDEX"), root_1);
				adaptor.addChild(root_1, stream_indexName.nextTree());
				adaptor.addChild(root_1, stream_typeName.nextNode());
				adaptor.addChild(root_1, stream_tab.nextTree());
				adaptor.addChild(root_1, stream_indexedCols.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1051:9: ( autoRebuild )?
				if ( stream_autoRebuild.hasNext() ) {
					adaptor.addChild(root_1, stream_autoRebuild.nextTree());
				}
				stream_autoRebuild.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1052:9: ( indexPropertiesPrefixed )?
				if ( stream_indexPropertiesPrefixed.hasNext() ) {
					adaptor.addChild(root_1, stream_indexPropertiesPrefixed.nextTree());
				}
				stream_indexPropertiesPrefixed.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1053:9: ( indexTblName )?
				if ( stream_indexTblName.hasNext() ) {
					adaptor.addChild(root_1, stream_indexTblName.nextTree());
				}
				stream_indexTblName.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1054:9: ( tableRowFormat )?
				if ( stream_tableRowFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormat.nextTree());
				}
				stream_tableRowFormat.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1055:9: ( tableFileFormat )?
				if ( stream_tableFileFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableFileFormat.nextTree());
				}
				stream_tableFileFormat.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1056:9: ( tableLocation )?
				if ( stream_tableLocation.hasNext() ) {
					adaptor.addChild(root_1, stream_tableLocation.nextTree());
				}
				stream_tableLocation.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1057:9: ( tablePropertiesPrefixed )?
				if ( stream_tablePropertiesPrefixed.hasNext() ) {
					adaptor.addChild(root_1, stream_tablePropertiesPrefixed.nextTree());
				}
				stream_tablePropertiesPrefixed.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1058:9: ( indexComment )?
				if ( stream_indexComment.hasNext() ) {
					adaptor.addChild(root_1, stream_indexComment.nextTree());
				}
				stream_indexComment.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createIndexStatement"


	public static class indexComment_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "indexComment"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1061:1: indexComment : KW_COMMENT comment= StringLiteral -> ^( TOK_INDEXCOMMENT $comment) ;
	public final HiveParser.indexComment_return indexComment() throws RecognitionException {
		HiveParser.indexComment_return retval = new HiveParser.indexComment_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_COMMENT187=null;

		ASTNode comment_tree=null;
		ASTNode KW_COMMENT187_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");

		 pushMsg("comment on an index", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1064:9: ( KW_COMMENT comment= StringLiteral -> ^( TOK_INDEXCOMMENT $comment) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1065:17: KW_COMMENT comment= StringLiteral
			{
			KW_COMMENT187=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_indexComment4061); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT187);

			comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_indexComment4065); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

			// AST REWRITE
			// elements: comment
			// token labels: comment
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1065:51: -> ^( TOK_INDEXCOMMENT $comment)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1065:54: ^( TOK_INDEXCOMMENT $comment)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INDEXCOMMENT, "TOK_INDEXCOMMENT"), root_1);
				adaptor.addChild(root_1, stream_comment.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "indexComment"


	public static class autoRebuild_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "autoRebuild"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1068:1: autoRebuild : KW_WITH KW_DEFERRED KW_REBUILD -> ^( TOK_DEFERRED_REBUILDINDEX ) ;
	public final HiveParser.autoRebuild_return autoRebuild() throws RecognitionException {
		HiveParser.autoRebuild_return retval = new HiveParser.autoRebuild_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WITH188=null;
		Token KW_DEFERRED189=null;
		Token KW_REBUILD190=null;

		ASTNode KW_WITH188_tree=null;
		ASTNode KW_DEFERRED189_tree=null;
		ASTNode KW_REBUILD190_tree=null;
		RewriteRuleTokenStream stream_KW_REBUILD=new RewriteRuleTokenStream(adaptor,"token KW_REBUILD");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_DEFERRED=new RewriteRuleTokenStream(adaptor,"token KW_DEFERRED");

		 pushMsg("auto rebuild index", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1071:5: ( KW_WITH KW_DEFERRED KW_REBUILD -> ^( TOK_DEFERRED_REBUILDINDEX ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1071:7: KW_WITH KW_DEFERRED KW_REBUILD
			{
			KW_WITH188=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_autoRebuild4106); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH188);

			KW_DEFERRED189=(Token)match(input,KW_DEFERRED,FOLLOW_KW_DEFERRED_in_autoRebuild4108); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DEFERRED.add(KW_DEFERRED189);

			KW_REBUILD190=(Token)match(input,KW_REBUILD,FOLLOW_KW_REBUILD_in_autoRebuild4110); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REBUILD.add(KW_REBUILD190);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1072:5: -> ^( TOK_DEFERRED_REBUILDINDEX )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1072:7: ^( TOK_DEFERRED_REBUILDINDEX )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DEFERRED_REBUILDINDEX, "TOK_DEFERRED_REBUILDINDEX"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "autoRebuild"


	public static class indexTblName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "indexTblName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1075:1: indexTblName : KW_IN KW_TABLE indexTbl= tableName -> ^( TOK_CREATEINDEX_INDEXTBLNAME $indexTbl) ;
	public final HiveParser.indexTblName_return indexTblName() throws RecognitionException {
		HiveParser.indexTblName_return retval = new HiveParser.indexTblName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_IN191=null;
		Token KW_TABLE192=null;
		ParserRuleReturnScope indexTbl =null;

		ASTNode KW_IN191_tree=null;
		ASTNode KW_TABLE192_tree=null;
		RewriteRuleTokenStream stream_KW_IN=new RewriteRuleTokenStream(adaptor,"token KW_IN");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("index table name", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1078:5: ( KW_IN KW_TABLE indexTbl= tableName -> ^( TOK_CREATEINDEX_INDEXTBLNAME $indexTbl) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1078:7: KW_IN KW_TABLE indexTbl= tableName
			{
			KW_IN191=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_indexTblName4146); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN191);

			KW_TABLE192=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_indexTblName4148); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE192);

			pushFollow(FOLLOW_tableName_in_indexTblName4152);
			indexTbl=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(indexTbl.getTree());
			// AST REWRITE
			// elements: indexTbl
			// token labels: 
			// rule labels: indexTbl, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_indexTbl=new RewriteRuleSubtreeStream(adaptor,"rule indexTbl",indexTbl!=null?indexTbl.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1079:5: -> ^( TOK_CREATEINDEX_INDEXTBLNAME $indexTbl)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1079:7: ^( TOK_CREATEINDEX_INDEXTBLNAME $indexTbl)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEINDEX_INDEXTBLNAME, "TOK_CREATEINDEX_INDEXTBLNAME"), root_1);
				adaptor.addChild(root_1, stream_indexTbl.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "indexTblName"


	public static class indexPropertiesPrefixed_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "indexPropertiesPrefixed"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1082:1: indexPropertiesPrefixed : KW_IDXPROPERTIES ! indexProperties ;
	public final HiveParser.indexPropertiesPrefixed_return indexPropertiesPrefixed() throws RecognitionException {
		HiveParser.indexPropertiesPrefixed_return retval = new HiveParser.indexPropertiesPrefixed_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_IDXPROPERTIES193=null;
		ParserRuleReturnScope indexProperties194 =null;

		ASTNode KW_IDXPROPERTIES193_tree=null;

		 pushMsg("table properties with prefix", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1085:5: ( KW_IDXPROPERTIES ! indexProperties )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1086:9: KW_IDXPROPERTIES ! indexProperties
			{
			root_0 = (ASTNode)adaptor.nil();


			KW_IDXPROPERTIES193=(Token)match(input,KW_IDXPROPERTIES,FOLLOW_KW_IDXPROPERTIES_in_indexPropertiesPrefixed4199); if (state.failed) return retval;
			pushFollow(FOLLOW_indexProperties_in_indexPropertiesPrefixed4202);
			indexProperties194=indexProperties();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, indexProperties194.getTree());

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "indexPropertiesPrefixed"


	public static class indexProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "indexProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1089:1: indexProperties : LPAREN indexPropertiesList RPAREN -> ^( TOK_INDEXPROPERTIES indexPropertiesList ) ;
	public final HiveParser.indexProperties_return indexProperties() throws RecognitionException {
		HiveParser.indexProperties_return retval = new HiveParser.indexProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN195=null;
		Token RPAREN197=null;
		ParserRuleReturnScope indexPropertiesList196 =null;

		ASTNode LPAREN195_tree=null;
		ASTNode RPAREN197_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_indexPropertiesList=new RewriteRuleSubtreeStream(adaptor,"rule indexPropertiesList");

		 pushMsg("index properties", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1092:5: ( LPAREN indexPropertiesList RPAREN -> ^( TOK_INDEXPROPERTIES indexPropertiesList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1093:7: LPAREN indexPropertiesList RPAREN
			{
			LPAREN195=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_indexProperties4235); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN195);

			pushFollow(FOLLOW_indexPropertiesList_in_indexProperties4237);
			indexPropertiesList196=indexPropertiesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_indexPropertiesList.add(indexPropertiesList196.getTree());
			RPAREN197=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_indexProperties4239); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN197);

			// AST REWRITE
			// elements: indexPropertiesList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1093:41: -> ^( TOK_INDEXPROPERTIES indexPropertiesList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1093:44: ^( TOK_INDEXPROPERTIES indexPropertiesList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INDEXPROPERTIES, "TOK_INDEXPROPERTIES"), root_1);
				adaptor.addChild(root_1, stream_indexPropertiesList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "indexProperties"


	public static class indexPropertiesList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "indexPropertiesList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1096:1: indexPropertiesList : keyValueProperty ( COMMA keyValueProperty )* -> ^( TOK_INDEXPROPLIST ( keyValueProperty )+ ) ;
	public final HiveParser.indexPropertiesList_return indexPropertiesList() throws RecognitionException {
		HiveParser.indexPropertiesList_return retval = new HiveParser.indexPropertiesList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA199=null;
		ParserRuleReturnScope keyValueProperty198 =null;
		ParserRuleReturnScope keyValueProperty200 =null;

		ASTNode COMMA199_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_keyValueProperty=new RewriteRuleSubtreeStream(adaptor,"rule keyValueProperty");

		 pushMsg("index properties list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1099:5: ( keyValueProperty ( COMMA keyValueProperty )* -> ^( TOK_INDEXPROPLIST ( keyValueProperty )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1100:7: keyValueProperty ( COMMA keyValueProperty )*
			{
			pushFollow(FOLLOW_keyValueProperty_in_indexPropertiesList4280);
			keyValueProperty198=keyValueProperty();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_keyValueProperty.add(keyValueProperty198.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1100:24: ( COMMA keyValueProperty )*
			loop61:
			while (true) {
				int alt61=2;
				int LA61_0 = input.LA(1);
				if ( (LA61_0==COMMA) ) {
					alt61=1;
				}

				switch (alt61) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1100:25: COMMA keyValueProperty
					{
					COMMA199=(Token)match(input,COMMA,FOLLOW_COMMA_in_indexPropertiesList4283); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA199);

					pushFollow(FOLLOW_keyValueProperty_in_indexPropertiesList4285);
					keyValueProperty200=keyValueProperty();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_keyValueProperty.add(keyValueProperty200.getTree());
					}
					break;

				default :
					break loop61;
				}
			}

			// AST REWRITE
			// elements: keyValueProperty
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1100:50: -> ^( TOK_INDEXPROPLIST ( keyValueProperty )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1100:53: ^( TOK_INDEXPROPLIST ( keyValueProperty )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INDEXPROPLIST, "TOK_INDEXPROPLIST"), root_1);
				if ( !(stream_keyValueProperty.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_keyValueProperty.hasNext() ) {
					adaptor.addChild(root_1, stream_keyValueProperty.nextTree());
				}
				stream_keyValueProperty.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "indexPropertiesList"


	public static class dropIndexStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropIndexStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1103:1: dropIndexStatement : KW_DROP KW_INDEX ( ifExists )? indexName= identifier KW_ON tab= tableName -> ^( TOK_DROPINDEX $indexName $tab ( ifExists )? ) ;
	public final HiveParser.dropIndexStatement_return dropIndexStatement() throws RecognitionException {
		HiveParser.dropIndexStatement_return retval = new HiveParser.dropIndexStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP201=null;
		Token KW_INDEX202=null;
		Token KW_ON204=null;
		ParserRuleReturnScope indexName =null;
		ParserRuleReturnScope tab =null;
		ParserRuleReturnScope ifExists203 =null;

		ASTNode KW_DROP201_tree=null;
		ASTNode KW_INDEX202_tree=null;
		ASTNode KW_ON204_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_INDEX=new RewriteRuleTokenStream(adaptor,"token KW_INDEX");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("drop index statement", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1106:5: ( KW_DROP KW_INDEX ( ifExists )? indexName= identifier KW_ON tab= tableName -> ^( TOK_DROPINDEX $indexName $tab ( ifExists )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1106:7: KW_DROP KW_INDEX ( ifExists )? indexName= identifier KW_ON tab= tableName
			{
			KW_DROP201=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropIndexStatement4323); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP201);

			KW_INDEX202=(Token)match(input,KW_INDEX,FOLLOW_KW_INDEX_in_dropIndexStatement4325); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INDEX.add(KW_INDEX202);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1106:24: ( ifExists )?
			int alt62=2;
			int LA62_0 = input.LA(1);
			if ( (LA62_0==KW_IF) ) {
				alt62=1;
			}
			switch (alt62) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1106:24: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropIndexStatement4327);
					ifExists203=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists203.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_dropIndexStatement4332);
			indexName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(indexName.getTree());
			KW_ON204=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_dropIndexStatement4334); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON204);

			pushFollow(FOLLOW_tableName_in_dropIndexStatement4338);
			tab=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tab.getTree());
			// AST REWRITE
			// elements: indexName, tab, ifExists
			// token labels: 
			// rule labels: tab, indexName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_tab=new RewriteRuleSubtreeStream(adaptor,"rule tab",tab!=null?tab.getTree():null);
			RewriteRuleSubtreeStream stream_indexName=new RewriteRuleSubtreeStream(adaptor,"rule indexName",indexName!=null?indexName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1107:5: -> ^( TOK_DROPINDEX $indexName $tab ( ifExists )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1107:7: ^( TOK_DROPINDEX $indexName $tab ( ifExists )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPINDEX, "TOK_DROPINDEX"), root_1);
				adaptor.addChild(root_1, stream_indexName.nextTree());
				adaptor.addChild(root_1, stream_tab.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1107:39: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropIndexStatement"


	public static class dropTableStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropTableStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1110:1: dropTableStatement : KW_DROP KW_TABLE ( ifExists )? tableName ( KW_PURGE )? ( replicationClause )? -> ^( TOK_DROPTABLE tableName ( ifExists )? ( KW_PURGE )? ( replicationClause )? ) ;
	public final HiveParser.dropTableStatement_return dropTableStatement() throws RecognitionException {
		HiveParser.dropTableStatement_return retval = new HiveParser.dropTableStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP205=null;
		Token KW_TABLE206=null;
		Token KW_PURGE209=null;
		ParserRuleReturnScope ifExists207 =null;
		ParserRuleReturnScope tableName208 =null;
		ParserRuleReturnScope replicationClause210 =null;

		ASTNode KW_DROP205_tree=null;
		ASTNode KW_TABLE206_tree=null;
		ASTNode KW_PURGE209_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_PURGE=new RewriteRuleTokenStream(adaptor,"token KW_PURGE");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");
		RewriteRuleSubtreeStream stream_replicationClause=new RewriteRuleSubtreeStream(adaptor,"rule replicationClause");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("drop statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:5: ( KW_DROP KW_TABLE ( ifExists )? tableName ( KW_PURGE )? ( replicationClause )? -> ^( TOK_DROPTABLE tableName ( ifExists )? ( KW_PURGE )? ( replicationClause )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:7: KW_DROP KW_TABLE ( ifExists )? tableName ( KW_PURGE )? ( replicationClause )?
			{
			KW_DROP205=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropTableStatement4383); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP205);

			KW_TABLE206=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_dropTableStatement4385); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE206);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:24: ( ifExists )?
			int alt63=2;
			int LA63_0 = input.LA(1);
			if ( (LA63_0==KW_IF) ) {
				alt63=1;
			}
			switch (alt63) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:24: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropTableStatement4387);
					ifExists207=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists207.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_tableName_in_dropTableStatement4390);
			tableName208=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName208.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:44: ( KW_PURGE )?
			int alt64=2;
			int LA64_0 = input.LA(1);
			if ( (LA64_0==KW_PURGE) ) {
				alt64=1;
			}
			switch (alt64) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:44: KW_PURGE
					{
					KW_PURGE209=(Token)match(input,KW_PURGE,FOLLOW_KW_PURGE_in_dropTableStatement4392); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_PURGE.add(KW_PURGE209);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:54: ( replicationClause )?
			int alt65=2;
			int LA65_0 = input.LA(1);
			if ( (LA65_0==KW_FOR) ) {
				alt65=1;
			}
			switch (alt65) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1113:54: replicationClause
					{
					pushFollow(FOLLOW_replicationClause_in_dropTableStatement4395);
					replicationClause210=replicationClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_replicationClause.add(replicationClause210.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: replicationClause, tableName, KW_PURGE, ifExists
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1114:5: -> ^( TOK_DROPTABLE tableName ( ifExists )? ( KW_PURGE )? ( replicationClause )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1114:8: ^( TOK_DROPTABLE tableName ( ifExists )? ( KW_PURGE )? ( replicationClause )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPTABLE, "TOK_DROPTABLE"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1114:34: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1114:44: ( KW_PURGE )?
				if ( stream_KW_PURGE.hasNext() ) {
					adaptor.addChild(root_1, stream_KW_PURGE.nextNode());
				}
				stream_KW_PURGE.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1114:54: ( replicationClause )?
				if ( stream_replicationClause.hasNext() ) {
					adaptor.addChild(root_1, stream_replicationClause.nextTree());
				}
				stream_replicationClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropTableStatement"


	public static class alterStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1117:1: alterStatement : ( KW_ALTER KW_TABLE tableName alterTableStatementSuffix -> ^( TOK_ALTERTABLE tableName alterTableStatementSuffix ) | KW_ALTER KW_VIEW tableName ( KW_AS )? alterViewStatementSuffix -> ^( TOK_ALTERVIEW tableName alterViewStatementSuffix ) | KW_ALTER KW_INDEX alterIndexStatementSuffix -> alterIndexStatementSuffix | KW_ALTER ( KW_DATABASE | KW_SCHEMA ) alterDatabaseStatementSuffix -> alterDatabaseStatementSuffix );
	public final HiveParser.alterStatement_return alterStatement() throws RecognitionException {
		HiveParser.alterStatement_return retval = new HiveParser.alterStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ALTER211=null;
		Token KW_TABLE212=null;
		Token KW_ALTER215=null;
		Token KW_VIEW216=null;
		Token KW_AS218=null;
		Token KW_ALTER220=null;
		Token KW_INDEX221=null;
		Token KW_ALTER223=null;
		Token KW_DATABASE224=null;
		Token KW_SCHEMA225=null;
		ParserRuleReturnScope tableName213 =null;
		ParserRuleReturnScope alterTableStatementSuffix214 =null;
		ParserRuleReturnScope tableName217 =null;
		ParserRuleReturnScope alterViewStatementSuffix219 =null;
		ParserRuleReturnScope alterIndexStatementSuffix222 =null;
		ParserRuleReturnScope alterDatabaseStatementSuffix226 =null;

		ASTNode KW_ALTER211_tree=null;
		ASTNode KW_TABLE212_tree=null;
		ASTNode KW_ALTER215_tree=null;
		ASTNode KW_VIEW216_tree=null;
		ASTNode KW_AS218_tree=null;
		ASTNode KW_ALTER220_tree=null;
		ASTNode KW_INDEX221_tree=null;
		ASTNode KW_ALTER223_tree=null;
		ASTNode KW_DATABASE224_tree=null;
		ASTNode KW_SCHEMA225_tree=null;
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_VIEW=new RewriteRuleTokenStream(adaptor,"token KW_VIEW");
		RewriteRuleTokenStream stream_KW_INDEX=new RewriteRuleTokenStream(adaptor,"token KW_INDEX");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_KW_ALTER=new RewriteRuleTokenStream(adaptor,"token KW_ALTER");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_alterTableStatementSuffix=new RewriteRuleSubtreeStream(adaptor,"rule alterTableStatementSuffix");
		RewriteRuleSubtreeStream stream_alterViewStatementSuffix=new RewriteRuleSubtreeStream(adaptor,"rule alterViewStatementSuffix");
		RewriteRuleSubtreeStream stream_alterDatabaseStatementSuffix=new RewriteRuleSubtreeStream(adaptor,"rule alterDatabaseStatementSuffix");
		RewriteRuleSubtreeStream stream_alterIndexStatementSuffix=new RewriteRuleSubtreeStream(adaptor,"rule alterIndexStatementSuffix");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("alter statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1120:5: ( KW_ALTER KW_TABLE tableName alterTableStatementSuffix -> ^( TOK_ALTERTABLE tableName alterTableStatementSuffix ) | KW_ALTER KW_VIEW tableName ( KW_AS )? alterViewStatementSuffix -> ^( TOK_ALTERVIEW tableName alterViewStatementSuffix ) | KW_ALTER KW_INDEX alterIndexStatementSuffix -> alterIndexStatementSuffix | KW_ALTER ( KW_DATABASE | KW_SCHEMA ) alterDatabaseStatementSuffix -> alterDatabaseStatementSuffix )
			int alt68=4;
			int LA68_0 = input.LA(1);
			if ( (LA68_0==KW_ALTER) ) {
				switch ( input.LA(2) ) {
				case KW_TABLE:
					{
					alt68=1;
					}
					break;
				case KW_VIEW:
					{
					alt68=2;
					}
					break;
				case KW_INDEX:
					{
					alt68=3;
					}
					break;
				case KW_DATABASE:
				case KW_SCHEMA:
					{
					alt68=4;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 68, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 68, 0, input);
				throw nvae;
			}

			switch (alt68) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1120:7: KW_ALTER KW_TABLE tableName alterTableStatementSuffix
					{
					KW_ALTER211=(Token)match(input,KW_ALTER,FOLLOW_KW_ALTER_in_alterStatement4444); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALTER.add(KW_ALTER211);

					KW_TABLE212=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_alterStatement4446); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE212);

					pushFollow(FOLLOW_tableName_in_alterStatement4448);
					tableName213=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName213.getTree());
					pushFollow(FOLLOW_alterTableStatementSuffix_in_alterStatement4450);
					alterTableStatementSuffix214=alterTableStatementSuffix();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterTableStatementSuffix.add(alterTableStatementSuffix214.getTree());
					// AST REWRITE
					// elements: tableName, alterTableStatementSuffix
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1120:61: -> ^( TOK_ALTERTABLE tableName alterTableStatementSuffix )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1120:64: ^( TOK_ALTERTABLE tableName alterTableStatementSuffix )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE, "TOK_ALTERTABLE"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						adaptor.addChild(root_1, stream_alterTableStatementSuffix.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1121:7: KW_ALTER KW_VIEW tableName ( KW_AS )? alterViewStatementSuffix
					{
					KW_ALTER215=(Token)match(input,KW_ALTER,FOLLOW_KW_ALTER_in_alterStatement4468); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALTER.add(KW_ALTER215);

					KW_VIEW216=(Token)match(input,KW_VIEW,FOLLOW_KW_VIEW_in_alterStatement4470); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_VIEW.add(KW_VIEW216);

					pushFollow(FOLLOW_tableName_in_alterStatement4472);
					tableName217=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName217.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1121:34: ( KW_AS )?
					int alt66=2;
					int LA66_0 = input.LA(1);
					if ( (LA66_0==KW_AS) ) {
						alt66=1;
					}
					switch (alt66) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1121:34: KW_AS
							{
							KW_AS218=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_alterStatement4474); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS218);

							}
							break;

					}

					pushFollow(FOLLOW_alterViewStatementSuffix_in_alterStatement4477);
					alterViewStatementSuffix219=alterViewStatementSuffix();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterViewStatementSuffix.add(alterViewStatementSuffix219.getTree());
					// AST REWRITE
					// elements: tableName, alterViewStatementSuffix
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1121:66: -> ^( TOK_ALTERVIEW tableName alterViewStatementSuffix )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1121:69: ^( TOK_ALTERVIEW tableName alterViewStatementSuffix )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERVIEW, "TOK_ALTERVIEW"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						adaptor.addChild(root_1, stream_alterViewStatementSuffix.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1122:7: KW_ALTER KW_INDEX alterIndexStatementSuffix
					{
					KW_ALTER220=(Token)match(input,KW_ALTER,FOLLOW_KW_ALTER_in_alterStatement4495); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALTER.add(KW_ALTER220);

					KW_INDEX221=(Token)match(input,KW_INDEX,FOLLOW_KW_INDEX_in_alterStatement4497); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INDEX.add(KW_INDEX221);

					pushFollow(FOLLOW_alterIndexStatementSuffix_in_alterStatement4499);
					alterIndexStatementSuffix222=alterIndexStatementSuffix();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterIndexStatementSuffix.add(alterIndexStatementSuffix222.getTree());
					// AST REWRITE
					// elements: alterIndexStatementSuffix
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1122:51: -> alterIndexStatementSuffix
					{
						adaptor.addChild(root_0, stream_alterIndexStatementSuffix.nextTree());
					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1123:7: KW_ALTER ( KW_DATABASE | KW_SCHEMA ) alterDatabaseStatementSuffix
					{
					KW_ALTER223=(Token)match(input,KW_ALTER,FOLLOW_KW_ALTER_in_alterStatement4511); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALTER.add(KW_ALTER223);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1123:16: ( KW_DATABASE | KW_SCHEMA )
					int alt67=2;
					int LA67_0 = input.LA(1);
					if ( (LA67_0==KW_DATABASE) ) {
						alt67=1;
					}
					else if ( (LA67_0==KW_SCHEMA) ) {
						alt67=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 67, 0, input);
						throw nvae;
					}

					switch (alt67) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1123:17: KW_DATABASE
							{
							KW_DATABASE224=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_alterStatement4514); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE224);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1123:29: KW_SCHEMA
							{
							KW_SCHEMA225=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_alterStatement4516); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA225);

							}
							break;

					}

					pushFollow(FOLLOW_alterDatabaseStatementSuffix_in_alterStatement4519);
					alterDatabaseStatementSuffix226=alterDatabaseStatementSuffix();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterDatabaseStatementSuffix.add(alterDatabaseStatementSuffix226.getTree());
					// AST REWRITE
					// elements: alterDatabaseStatementSuffix
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1123:69: -> alterDatabaseStatementSuffix
					{
						adaptor.addChild(root_0, stream_alterDatabaseStatementSuffix.nextTree());
					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatement"


	public static class alterTableStatementSuffix_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterTableStatementSuffix"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1126:1: alterTableStatementSuffix : ( ( alterStatementSuffixRename[true] )=> alterStatementSuffixRename[true] | alterStatementSuffixDropPartitions[true] | alterStatementSuffixAddPartitions[true] | alterStatementSuffixTouch | alterStatementSuffixArchive | alterStatementSuffixUnArchive | alterStatementSuffixProperties | alterStatementSuffixSkewedby | alterStatementSuffixExchangePartition | alterStatementPartitionKeyType | alterStatementSuffixDropConstraint | alterStatementSuffixAddConstraint | ( partitionSpec )? alterTblPartitionStatementSuffix -> alterTblPartitionStatementSuffix ( partitionSpec )? );
	public final HiveParser.alterTableStatementSuffix_return alterTableStatementSuffix() throws RecognitionException {
		HiveParser.alterTableStatementSuffix_return retval = new HiveParser.alterTableStatementSuffix_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope alterStatementSuffixRename227 =null;
		ParserRuleReturnScope alterStatementSuffixDropPartitions228 =null;
		ParserRuleReturnScope alterStatementSuffixAddPartitions229 =null;
		ParserRuleReturnScope alterStatementSuffixTouch230 =null;
		ParserRuleReturnScope alterStatementSuffixArchive231 =null;
		ParserRuleReturnScope alterStatementSuffixUnArchive232 =null;
		ParserRuleReturnScope alterStatementSuffixProperties233 =null;
		ParserRuleReturnScope alterStatementSuffixSkewedby234 =null;
		ParserRuleReturnScope alterStatementSuffixExchangePartition235 =null;
		ParserRuleReturnScope alterStatementPartitionKeyType236 =null;
		ParserRuleReturnScope alterStatementSuffixDropConstraint237 =null;
		ParserRuleReturnScope alterStatementSuffixAddConstraint238 =null;
		ParserRuleReturnScope partitionSpec239 =null;
		ParserRuleReturnScope alterTblPartitionStatementSuffix240 =null;

		RewriteRuleSubtreeStream stream_alterTblPartitionStatementSuffix=new RewriteRuleSubtreeStream(adaptor,"rule alterTblPartitionStatementSuffix");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");

		 pushMsg("alter table statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1129:5: ( ( alterStatementSuffixRename[true] )=> alterStatementSuffixRename[true] | alterStatementSuffixDropPartitions[true] | alterStatementSuffixAddPartitions[true] | alterStatementSuffixTouch | alterStatementSuffixArchive | alterStatementSuffixUnArchive | alterStatementSuffixProperties | alterStatementSuffixSkewedby | alterStatementSuffixExchangePartition | alterStatementPartitionKeyType | alterStatementSuffixDropConstraint | alterStatementSuffixAddConstraint | ( partitionSpec )? alterTblPartitionStatementSuffix -> alterTblPartitionStatementSuffix ( partitionSpec )? )
			int alt70=13;
			switch ( input.LA(1) ) {
			case KW_RENAME:
				{
				int LA70_1 = input.LA(2);
				if ( (LA70_1==KW_TO) ) {
					int LA70_20 = input.LA(3);
					if ( (LA70_20==Identifier) && (synpred3_HiveParser())) {
						alt70=1;
					}
					else if ( ((LA70_20 >= KW_ABORT && LA70_20 <= KW_AFTER)||LA70_20==KW_ANALYZE||LA70_20==KW_ARCHIVE||LA70_20==KW_ASC||(LA70_20 >= KW_AUTOCOMMIT && LA70_20 <= KW_BEFORE)||(LA70_20 >= KW_BUCKET && LA70_20 <= KW_BUCKETS)||(LA70_20 >= KW_CACHE && LA70_20 <= KW_CASCADE)||LA70_20==KW_CHANGE||(LA70_20 >= KW_CLUSTER && LA70_20 <= KW_COLLECTION)||(LA70_20 >= KW_COLUMNS && LA70_20 <= KW_COMMENT)||(LA70_20 >= KW_COMPACT && LA70_20 <= KW_CONCATENATE)||LA70_20==KW_CONTINUE||LA70_20==KW_DATA||LA70_20==KW_DATABASES||(LA70_20 >= KW_DATETIME && LA70_20 <= KW_DBPROPERTIES)||(LA70_20 >= KW_DEFERRED && LA70_20 <= KW_DEFINED)||(LA70_20 >= KW_DELIMITED && LA70_20 <= KW_DESC)||(LA70_20 >= KW_DETAIL && LA70_20 <= KW_DISABLE)||LA70_20==KW_DISTRIBUTE||LA70_20==KW_DOW||(LA70_20 >= KW_DUMP && LA70_20 <= KW_ELEM_TYPE)||LA70_20==KW_ENABLE||LA70_20==KW_ESCAPED||LA70_20==KW_EXCLUSIVE||(LA70_20 >= KW_EXPLAIN && LA70_20 <= KW_EXPRESSION)||(LA70_20 >= KW_FIELDS && LA70_20 <= KW_FIRST)||(LA70_20 >= KW_FORMAT && LA70_20 <= KW_FORMATTED)||LA70_20==KW_FUNCTIONS||(LA70_20 >= KW_HOUR && LA70_20 <= KW_IDXPROPERTIES)||(LA70_20 >= KW_INDEX && LA70_20 <= KW_INDEXES)||(LA70_20 >= KW_INPATH && LA70_20 <= KW_INPUTFORMAT)||(LA70_20 >= KW_ISOLATION && LA70_20 <= KW_JAR)||(LA70_20 >= KW_KEY && LA70_20 <= KW_LAST)||LA70_20==KW_LEVEL||(LA70_20 >= KW_LIMIT && LA70_20 <= KW_LOAD)||(LA70_20 >= KW_LOCATION && LA70_20 <= KW_LONG)||(LA70_20 >= KW_MAPJOIN && LA70_20 <= KW_MATERIALIZED)||LA70_20==KW_METADATA||(LA70_20 >= KW_MINUTE && LA70_20 <= KW_MONTH)||LA70_20==KW_MSCK||(LA70_20 >= KW_NORELY && LA70_20 <= KW_NOSCAN)||LA70_20==KW_NOVALIDATE||LA70_20==KW_NULLS||LA70_20==KW_OFFSET||(LA70_20 >= KW_OPERATOR && LA70_20 <= KW_OPTION)||(LA70_20 >= KW_OUTPUTDRIVER && LA70_20 <= KW_OUTPUTFORMAT)||(LA70_20 >= KW_OVERWRITE && LA70_20 <= KW_OWNER)||(LA70_20 >= KW_PARTITIONED && LA70_20 <= KW_PARTITIONS)||LA70_20==KW_PLUS||LA70_20==KW_PRETTY||LA70_20==KW_PRINCIPALS||(LA70_20 >= KW_PURGE && LA70_20 <= KW_QUARTER)||LA70_20==KW_READ||(LA70_20 >= KW_REBUILD && LA70_20 <= KW_RECORDWRITER)||(LA70_20 >= KW_RELOAD && LA70_20 <= KW_RESTRICT)||LA70_20==KW_REWRITE||(LA70_20 >= KW_ROLE && LA70_20 <= KW_ROLES)||(LA70_20 >= KW_SCHEMA && LA70_20 <= KW_SECOND)||(LA70_20 >= KW_SEMI && LA70_20 <= KW_SERVER)||(LA70_20 >= KW_SETS && LA70_20 <= KW_SKEWED)||(LA70_20 >= KW_SNAPSHOT && LA70_20 <= KW_SSL)||(LA70_20 >= KW_STATISTICS && LA70_20 <= KW_SUMMARY)||LA70_20==KW_TABLES||(LA70_20 >= KW_TBLPROPERTIES && LA70_20 <= KW_TERMINATED)||LA70_20==KW_TINYINT||(LA70_20 >= KW_TOUCH && LA70_20 <= KW_TRANSACTIONS)||LA70_20==KW_UNARCHIVE||LA70_20==KW_UNDO||LA70_20==KW_UNIONTYPE||(LA70_20 >= KW_UNLOCK && LA70_20 <= KW_UNSIGNED)||(LA70_20 >= KW_URI && LA70_20 <= KW_USE)||(LA70_20 >= KW_UTC && LA70_20 <= KW_VALIDATE)||LA70_20==KW_VALUE_TYPE||(LA70_20 >= KW_VECTORIZATION && LA70_20 <= KW_WEEK)||LA70_20==KW_WHILE||(LA70_20 >= KW_WORK && LA70_20 <= KW_YEAR)||LA70_20==KW_BATCH||LA70_20==KW_DAYOFWEEK||LA70_20==KW_HOLD_DDLTIME||LA70_20==KW_IGNORE||LA70_20==KW_NO_DROP||LA70_20==KW_OFFLINE||LA70_20==KW_PROTECTION||LA70_20==KW_READONLY) && (synpred3_HiveParser())) {
						alt70=1;
					}
					else if ( (LA70_20==KW_PARTITION) ) {
						alt70=13;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 70, 20, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 70, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_DROP:
				{
				int LA70_2 = input.LA(2);
				if ( (LA70_2==KW_CONSTRAINT) ) {
					alt70=11;
				}
				else if ( (LA70_2==KW_IF||LA70_2==KW_PARTITION) ) {
					alt70=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 70, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_ADD:
				{
				switch ( input.LA(2) ) {
				case KW_IF:
				case KW_PARTITION:
					{
					alt70=3;
					}
					break;
				case KW_CONSTRAINT:
					{
					alt70=12;
					}
					break;
				case KW_COLUMNS:
					{
					alt70=13;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 70, 3, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
				}
				break;
			case KW_TOUCH:
				{
				alt70=4;
				}
				break;
			case KW_ARCHIVE:
				{
				alt70=5;
				}
				break;
			case KW_UNARCHIVE:
				{
				alt70=6;
				}
				break;
			case KW_SET:
				{
				int LA70_7 = input.LA(2);
				if ( (LA70_7==KW_TBLPROPERTIES) ) {
					alt70=7;
				}
				else if ( (LA70_7==KW_FILEFORMAT||LA70_7==KW_LOCATION||(LA70_7 >= KW_SERDE && LA70_7 <= KW_SERDEPROPERTIES)||LA70_7==KW_SKEWED) ) {
					alt70=13;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 70, 7, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_UNSET:
				{
				alt70=7;
				}
				break;
			case KW_SKEWED:
				{
				alt70=8;
				}
				break;
			case KW_NOT:
				{
				int LA70_10 = input.LA(2);
				if ( (LA70_10==KW_SKEWED||LA70_10==KW_STORED) ) {
					alt70=8;
				}
				else if ( (LA70_10==KW_CLUSTERED||LA70_10==KW_SORTED) ) {
					alt70=13;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 70, 10, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_EXCHANGE:
				{
				alt70=9;
				}
				break;
			case KW_PARTITION:
				{
				int LA70_12 = input.LA(2);
				if ( (LA70_12==KW_COLUMN) ) {
					alt70=10;
				}
				else if ( (LA70_12==LPAREN) ) {
					alt70=13;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 70, 12, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_CHANGE:
			case KW_CLUSTERED:
			case KW_COMPACT:
			case KW_CONCATENATE:
			case KW_INTO:
			case KW_REPLACE:
			case KW_UPDATE:
				{
				alt70=13;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 70, 0, input);
				throw nvae;
			}
			switch (alt70) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1129:7: ( alterStatementSuffixRename[true] )=> alterStatementSuffixRename[true]
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixRename_in_alterTableStatementSuffix4557);
					alterStatementSuffixRename227=alterStatementSuffixRename(true);
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixRename227.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1130:7: alterStatementSuffixDropPartitions[true]
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixDropPartitions_in_alterTableStatementSuffix4566);
					alterStatementSuffixDropPartitions228=alterStatementSuffixDropPartitions(true);
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixDropPartitions228.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1131:7: alterStatementSuffixAddPartitions[true]
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixAddPartitions_in_alterTableStatementSuffix4575);
					alterStatementSuffixAddPartitions229=alterStatementSuffixAddPartitions(true);
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixAddPartitions229.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1132:7: alterStatementSuffixTouch
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixTouch_in_alterTableStatementSuffix4584);
					alterStatementSuffixTouch230=alterStatementSuffixTouch();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixTouch230.getTree());

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1133:7: alterStatementSuffixArchive
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixArchive_in_alterTableStatementSuffix4592);
					alterStatementSuffixArchive231=alterStatementSuffixArchive();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixArchive231.getTree());

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1134:7: alterStatementSuffixUnArchive
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixUnArchive_in_alterTableStatementSuffix4600);
					alterStatementSuffixUnArchive232=alterStatementSuffixUnArchive();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixUnArchive232.getTree());

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1135:7: alterStatementSuffixProperties
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixProperties_in_alterTableStatementSuffix4608);
					alterStatementSuffixProperties233=alterStatementSuffixProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixProperties233.getTree());

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1136:7: alterStatementSuffixSkewedby
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixSkewedby_in_alterTableStatementSuffix4616);
					alterStatementSuffixSkewedby234=alterStatementSuffixSkewedby();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixSkewedby234.getTree());

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1137:7: alterStatementSuffixExchangePartition
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixExchangePartition_in_alterTableStatementSuffix4624);
					alterStatementSuffixExchangePartition235=alterStatementSuffixExchangePartition();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixExchangePartition235.getTree());

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1138:7: alterStatementPartitionKeyType
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementPartitionKeyType_in_alterTableStatementSuffix4632);
					alterStatementPartitionKeyType236=alterStatementPartitionKeyType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementPartitionKeyType236.getTree());

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1139:7: alterStatementSuffixDropConstraint
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixDropConstraint_in_alterTableStatementSuffix4640);
					alterStatementSuffixDropConstraint237=alterStatementSuffixDropConstraint();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixDropConstraint237.getTree());

					}
					break;
				case 12 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1140:7: alterStatementSuffixAddConstraint
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixAddConstraint_in_alterTableStatementSuffix4648);
					alterStatementSuffixAddConstraint238=alterStatementSuffixAddConstraint();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixAddConstraint238.getTree());

					}
					break;
				case 13 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1141:7: ( partitionSpec )? alterTblPartitionStatementSuffix
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1141:7: ( partitionSpec )?
					int alt69=2;
					int LA69_0 = input.LA(1);
					if ( (LA69_0==KW_PARTITION) ) {
						alt69=1;
					}
					switch (alt69) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1141:7: partitionSpec
							{
							pushFollow(FOLLOW_partitionSpec_in_alterTableStatementSuffix4656);
							partitionSpec239=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec239.getTree());
							}
							break;

					}

					pushFollow(FOLLOW_alterTblPartitionStatementSuffix_in_alterTableStatementSuffix4659);
					alterTblPartitionStatementSuffix240=alterTblPartitionStatementSuffix();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterTblPartitionStatementSuffix.add(alterTblPartitionStatementSuffix240.getTree());
					// AST REWRITE
					// elements: partitionSpec, alterTblPartitionStatementSuffix
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1141:55: -> alterTblPartitionStatementSuffix ( partitionSpec )?
					{
						adaptor.addChild(root_0, stream_alterTblPartitionStatementSuffix.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1141:91: ( partitionSpec )?
						if ( stream_partitionSpec.hasNext() ) {
							adaptor.addChild(root_0, stream_partitionSpec.nextTree());
						}
						stream_partitionSpec.reset();

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterTableStatementSuffix"


	public static class alterTblPartitionStatementSuffix_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterTblPartitionStatementSuffix"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1144:1: alterTblPartitionStatementSuffix : ( alterStatementSuffixFileFormat | alterStatementSuffixLocation | alterStatementSuffixMergeFiles | alterStatementSuffixSerdeProperties | alterStatementSuffixRenamePart | alterStatementSuffixBucketNum | alterTblPartitionStatementSuffixSkewedLocation | alterStatementSuffixClusterbySortby | alterStatementSuffixCompact | alterStatementSuffixUpdateStatsCol | alterStatementSuffixUpdateStats | alterStatementSuffixRenameCol | alterStatementSuffixAddCol );
	public final HiveParser.alterTblPartitionStatementSuffix_return alterTblPartitionStatementSuffix() throws RecognitionException {
		HiveParser.alterTblPartitionStatementSuffix_return retval = new HiveParser.alterTblPartitionStatementSuffix_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope alterStatementSuffixFileFormat241 =null;
		ParserRuleReturnScope alterStatementSuffixLocation242 =null;
		ParserRuleReturnScope alterStatementSuffixMergeFiles243 =null;
		ParserRuleReturnScope alterStatementSuffixSerdeProperties244 =null;
		ParserRuleReturnScope alterStatementSuffixRenamePart245 =null;
		ParserRuleReturnScope alterStatementSuffixBucketNum246 =null;
		ParserRuleReturnScope alterTblPartitionStatementSuffixSkewedLocation247 =null;
		ParserRuleReturnScope alterStatementSuffixClusterbySortby248 =null;
		ParserRuleReturnScope alterStatementSuffixCompact249 =null;
		ParserRuleReturnScope alterStatementSuffixUpdateStatsCol250 =null;
		ParserRuleReturnScope alterStatementSuffixUpdateStats251 =null;
		ParserRuleReturnScope alterStatementSuffixRenameCol252 =null;
		ParserRuleReturnScope alterStatementSuffixAddCol253 =null;


		pushMsg("alter table partition statement suffix", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1147:3: ( alterStatementSuffixFileFormat | alterStatementSuffixLocation | alterStatementSuffixMergeFiles | alterStatementSuffixSerdeProperties | alterStatementSuffixRenamePart | alterStatementSuffixBucketNum | alterTblPartitionStatementSuffixSkewedLocation | alterStatementSuffixClusterbySortby | alterStatementSuffixCompact | alterStatementSuffixUpdateStatsCol | alterStatementSuffixUpdateStats | alterStatementSuffixRenameCol | alterStatementSuffixAddCol )
			int alt71=13;
			switch ( input.LA(1) ) {
			case KW_SET:
				{
				switch ( input.LA(2) ) {
				case KW_FILEFORMAT:
					{
					alt71=1;
					}
					break;
				case KW_LOCATION:
					{
					alt71=2;
					}
					break;
				case KW_SERDE:
				case KW_SERDEPROPERTIES:
					{
					alt71=4;
					}
					break;
				case KW_SKEWED:
					{
					alt71=7;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 71, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
				}
				break;
			case KW_CONCATENATE:
				{
				alt71=3;
				}
				break;
			case KW_RENAME:
				{
				alt71=5;
				}
				break;
			case KW_INTO:
				{
				alt71=6;
				}
				break;
			case KW_CLUSTERED:
			case KW_NOT:
				{
				alt71=8;
				}
				break;
			case KW_COMPACT:
				{
				alt71=9;
				}
				break;
			case KW_UPDATE:
				{
				int LA71_8 = input.LA(2);
				if ( (LA71_8==KW_STATISTICS) ) {
					int LA71_17 = input.LA(3);
					if ( (LA71_17==KW_FOR) ) {
						alt71=10;
					}
					else if ( (LA71_17==KW_SET) ) {
						alt71=11;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 71, 17, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 71, 8, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_CHANGE:
				{
				alt71=12;
				}
				break;
			case KW_ADD:
			case KW_REPLACE:
				{
				alt71=13;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 71, 0, input);
				throw nvae;
			}
			switch (alt71) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1147:5: alterStatementSuffixFileFormat
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixFileFormat_in_alterTblPartitionStatementSuffix4691);
					alterStatementSuffixFileFormat241=alterStatementSuffixFileFormat();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixFileFormat241.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1148:5: alterStatementSuffixLocation
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixLocation_in_alterTblPartitionStatementSuffix4697);
					alterStatementSuffixLocation242=alterStatementSuffixLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixLocation242.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1149:5: alterStatementSuffixMergeFiles
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixMergeFiles_in_alterTblPartitionStatementSuffix4703);
					alterStatementSuffixMergeFiles243=alterStatementSuffixMergeFiles();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixMergeFiles243.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1150:5: alterStatementSuffixSerdeProperties
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixSerdeProperties_in_alterTblPartitionStatementSuffix4709);
					alterStatementSuffixSerdeProperties244=alterStatementSuffixSerdeProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixSerdeProperties244.getTree());

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1151:5: alterStatementSuffixRenamePart
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixRenamePart_in_alterTblPartitionStatementSuffix4715);
					alterStatementSuffixRenamePart245=alterStatementSuffixRenamePart();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixRenamePart245.getTree());

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1152:5: alterStatementSuffixBucketNum
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixBucketNum_in_alterTblPartitionStatementSuffix4721);
					alterStatementSuffixBucketNum246=alterStatementSuffixBucketNum();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixBucketNum246.getTree());

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1153:5: alterTblPartitionStatementSuffixSkewedLocation
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterTblPartitionStatementSuffixSkewedLocation_in_alterTblPartitionStatementSuffix4727);
					alterTblPartitionStatementSuffixSkewedLocation247=alterTblPartitionStatementSuffixSkewedLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterTblPartitionStatementSuffixSkewedLocation247.getTree());

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1154:5: alterStatementSuffixClusterbySortby
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixClusterbySortby_in_alterTblPartitionStatementSuffix4733);
					alterStatementSuffixClusterbySortby248=alterStatementSuffixClusterbySortby();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixClusterbySortby248.getTree());

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1155:5: alterStatementSuffixCompact
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixCompact_in_alterTblPartitionStatementSuffix4739);
					alterStatementSuffixCompact249=alterStatementSuffixCompact();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixCompact249.getTree());

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1156:5: alterStatementSuffixUpdateStatsCol
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixUpdateStatsCol_in_alterTblPartitionStatementSuffix4745);
					alterStatementSuffixUpdateStatsCol250=alterStatementSuffixUpdateStatsCol();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixUpdateStatsCol250.getTree());

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1157:5: alterStatementSuffixUpdateStats
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixUpdateStats_in_alterTblPartitionStatementSuffix4751);
					alterStatementSuffixUpdateStats251=alterStatementSuffixUpdateStats();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixUpdateStats251.getTree());

					}
					break;
				case 12 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1158:5: alterStatementSuffixRenameCol
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixRenameCol_in_alterTblPartitionStatementSuffix4757);
					alterStatementSuffixRenameCol252=alterStatementSuffixRenameCol();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixRenameCol252.getTree());

					}
					break;
				case 13 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1159:5: alterStatementSuffixAddCol
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixAddCol_in_alterTblPartitionStatementSuffix4763);
					alterStatementSuffixAddCol253=alterStatementSuffixAddCol();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixAddCol253.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterTblPartitionStatementSuffix"


	public static class alterStatementPartitionKeyType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementPartitionKeyType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1162:1: alterStatementPartitionKeyType : KW_PARTITION KW_COLUMN LPAREN columnNameType RPAREN -> ^( TOK_ALTERTABLE_PARTCOLTYPE columnNameType ) ;
	public final HiveParser.alterStatementPartitionKeyType_return alterStatementPartitionKeyType() throws RecognitionException {
		HiveParser.alterStatementPartitionKeyType_return retval = new HiveParser.alterStatementPartitionKeyType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_PARTITION254=null;
		Token KW_COLUMN255=null;
		Token LPAREN256=null;
		Token RPAREN258=null;
		ParserRuleReturnScope columnNameType257 =null;

		ASTNode KW_PARTITION254_tree=null;
		ASTNode KW_COLUMN255_tree=null;
		ASTNode LPAREN256_tree=null;
		ASTNode RPAREN258_tree=null;
		RewriteRuleTokenStream stream_KW_PARTITION=new RewriteRuleTokenStream(adaptor,"token KW_PARTITION");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_COLUMN=new RewriteRuleTokenStream(adaptor,"token KW_COLUMN");
		RewriteRuleSubtreeStream stream_columnNameType=new RewriteRuleSubtreeStream(adaptor,"rule columnNameType");

		msgs.push("alter partition key type"); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1165:2: ( KW_PARTITION KW_COLUMN LPAREN columnNameType RPAREN -> ^( TOK_ALTERTABLE_PARTCOLTYPE columnNameType ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1165:4: KW_PARTITION KW_COLUMN LPAREN columnNameType RPAREN
			{
			KW_PARTITION254=(Token)match(input,KW_PARTITION,FOLLOW_KW_PARTITION_in_alterStatementPartitionKeyType4785); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_PARTITION.add(KW_PARTITION254);

			KW_COLUMN255=(Token)match(input,KW_COLUMN,FOLLOW_KW_COLUMN_in_alterStatementPartitionKeyType4787); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COLUMN.add(KW_COLUMN255);

			LPAREN256=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_alterStatementPartitionKeyType4789); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN256);

			pushFollow(FOLLOW_columnNameType_in_alterStatementPartitionKeyType4791);
			columnNameType257=columnNameType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameType.add(columnNameType257.getTree());
			RPAREN258=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_alterStatementPartitionKeyType4793); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN258);

			// AST REWRITE
			// elements: columnNameType
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1166:2: -> ^( TOK_ALTERTABLE_PARTCOLTYPE columnNameType )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1166:5: ^( TOK_ALTERTABLE_PARTCOLTYPE columnNameType )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_PARTCOLTYPE, "TOK_ALTERTABLE_PARTCOLTYPE"), root_1);
				adaptor.addChild(root_1, stream_columnNameType.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {msgs.pop();}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementPartitionKeyType"


	public static class alterViewStatementSuffix_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterViewStatementSuffix"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1169:1: alterViewStatementSuffix : ( alterViewSuffixProperties | alterStatementSuffixRename[false] | alterStatementSuffixAddPartitions[false] | alterStatementSuffixDropPartitions[false] | selectStatementWithCTE );
	public final HiveParser.alterViewStatementSuffix_return alterViewStatementSuffix() throws RecognitionException {
		HiveParser.alterViewStatementSuffix_return retval = new HiveParser.alterViewStatementSuffix_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope alterViewSuffixProperties259 =null;
		ParserRuleReturnScope alterStatementSuffixRename260 =null;
		ParserRuleReturnScope alterStatementSuffixAddPartitions261 =null;
		ParserRuleReturnScope alterStatementSuffixDropPartitions262 =null;
		ParserRuleReturnScope selectStatementWithCTE263 =null;


		 pushMsg("alter view statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1172:5: ( alterViewSuffixProperties | alterStatementSuffixRename[false] | alterStatementSuffixAddPartitions[false] | alterStatementSuffixDropPartitions[false] | selectStatementWithCTE )
			int alt72=5;
			switch ( input.LA(1) ) {
			case KW_SET:
			case KW_UNSET:
				{
				alt72=1;
				}
				break;
			case KW_RENAME:
				{
				alt72=2;
				}
				break;
			case KW_ADD:
				{
				alt72=3;
				}
				break;
			case KW_DROP:
				{
				alt72=4;
				}
				break;
			case KW_MAP:
			case KW_REDUCE:
			case KW_SELECT:
			case KW_WITH:
			case LPAREN:
				{
				alt72=5;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 72, 0, input);
				throw nvae;
			}
			switch (alt72) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1172:7: alterViewSuffixProperties
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterViewSuffixProperties_in_alterViewStatementSuffix4826);
					alterViewSuffixProperties259=alterViewSuffixProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterViewSuffixProperties259.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1173:7: alterStatementSuffixRename[false]
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixRename_in_alterViewStatementSuffix4834);
					alterStatementSuffixRename260=alterStatementSuffixRename(false);
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixRename260.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1174:7: alterStatementSuffixAddPartitions[false]
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixAddPartitions_in_alterViewStatementSuffix4843);
					alterStatementSuffixAddPartitions261=alterStatementSuffixAddPartitions(false);
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixAddPartitions261.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1175:7: alterStatementSuffixDropPartitions[false]
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterStatementSuffixDropPartitions_in_alterViewStatementSuffix4852);
					alterStatementSuffixDropPartitions262=alterStatementSuffixDropPartitions(false);
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterStatementSuffixDropPartitions262.getTree());

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1176:7: selectStatementWithCTE
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_selectStatementWithCTE_in_alterViewStatementSuffix4861);
					selectStatementWithCTE263=selectStatementWithCTE();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, selectStatementWithCTE263.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterViewStatementSuffix"


	public static class alterIndexStatementSuffix_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterIndexStatementSuffix"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1179:1: alterIndexStatementSuffix : indexName= identifier KW_ON tableName ( partitionSpec )? ( KW_REBUILD -> ^( TOK_ALTERINDEX_REBUILD tableName $indexName ( partitionSpec )? ) | KW_SET KW_IDXPROPERTIES indexProperties -> ^( TOK_ALTERINDEX_PROPERTIES tableName $indexName indexProperties ) ) ;
	public final HiveParser.alterIndexStatementSuffix_return alterIndexStatementSuffix() throws RecognitionException {
		HiveParser.alterIndexStatementSuffix_return retval = new HiveParser.alterIndexStatementSuffix_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ON264=null;
		Token KW_REBUILD267=null;
		Token KW_SET268=null;
		Token KW_IDXPROPERTIES269=null;
		ParserRuleReturnScope indexName =null;
		ParserRuleReturnScope tableName265 =null;
		ParserRuleReturnScope partitionSpec266 =null;
		ParserRuleReturnScope indexProperties270 =null;

		ASTNode KW_ON264_tree=null;
		ASTNode KW_REBUILD267_tree=null;
		ASTNode KW_SET268_tree=null;
		ASTNode KW_IDXPROPERTIES269_tree=null;
		RewriteRuleTokenStream stream_KW_IDXPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_IDXPROPERTIES");
		RewriteRuleTokenStream stream_KW_REBUILD=new RewriteRuleTokenStream(adaptor,"token KW_REBUILD");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_indexProperties=new RewriteRuleSubtreeStream(adaptor,"rule indexProperties");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("alter index statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1182:5: (indexName= identifier KW_ON tableName ( partitionSpec )? ( KW_REBUILD -> ^( TOK_ALTERINDEX_REBUILD tableName $indexName ( partitionSpec )? ) | KW_SET KW_IDXPROPERTIES indexProperties -> ^( TOK_ALTERINDEX_PROPERTIES tableName $indexName indexProperties ) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1182:7: indexName= identifier KW_ON tableName ( partitionSpec )? ( KW_REBUILD -> ^( TOK_ALTERINDEX_REBUILD tableName $indexName ( partitionSpec )? ) | KW_SET KW_IDXPROPERTIES indexProperties -> ^( TOK_ALTERINDEX_PROPERTIES tableName $indexName indexProperties ) )
			{
			pushFollow(FOLLOW_identifier_in_alterIndexStatementSuffix4890);
			indexName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(indexName.getTree());
			KW_ON264=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_alterIndexStatementSuffix4892); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON264);

			pushFollow(FOLLOW_tableName_in_alterIndexStatementSuffix4894);
			tableName265=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName265.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1182:44: ( partitionSpec )?
			int alt73=2;
			int LA73_0 = input.LA(1);
			if ( (LA73_0==KW_PARTITION) ) {
				alt73=1;
			}
			switch (alt73) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1182:44: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_alterIndexStatementSuffix4896);
					partitionSpec266=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec266.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1183:5: ( KW_REBUILD -> ^( TOK_ALTERINDEX_REBUILD tableName $indexName ( partitionSpec )? ) | KW_SET KW_IDXPROPERTIES indexProperties -> ^( TOK_ALTERINDEX_PROPERTIES tableName $indexName indexProperties ) )
			int alt74=2;
			int LA74_0 = input.LA(1);
			if ( (LA74_0==KW_REBUILD) ) {
				alt74=1;
			}
			else if ( (LA74_0==KW_SET) ) {
				alt74=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 74, 0, input);
				throw nvae;
			}

			switch (alt74) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1184:7: KW_REBUILD
					{
					KW_REBUILD267=(Token)match(input,KW_REBUILD,FOLLOW_KW_REBUILD_in_alterIndexStatementSuffix4911); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_REBUILD.add(KW_REBUILD267);

					// AST REWRITE
					// elements: partitionSpec, indexName, tableName
					// token labels: 
					// rule labels: indexName, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_indexName=new RewriteRuleSubtreeStream(adaptor,"rule indexName",indexName!=null?indexName.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1185:7: -> ^( TOK_ALTERINDEX_REBUILD tableName $indexName ( partitionSpec )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1185:9: ^( TOK_ALTERINDEX_REBUILD tableName $indexName ( partitionSpec )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERINDEX_REBUILD, "TOK_ALTERINDEX_REBUILD"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						adaptor.addChild(root_1, stream_indexName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1185:55: ( partitionSpec )?
						if ( stream_partitionSpec.hasNext() ) {
							adaptor.addChild(root_1, stream_partitionSpec.nextTree());
						}
						stream_partitionSpec.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1187:7: KW_SET KW_IDXPROPERTIES indexProperties
					{
					KW_SET268=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterIndexStatementSuffix4944); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET268);

					KW_IDXPROPERTIES269=(Token)match(input,KW_IDXPROPERTIES,FOLLOW_KW_IDXPROPERTIES_in_alterIndexStatementSuffix4946); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_IDXPROPERTIES.add(KW_IDXPROPERTIES269);

					pushFollow(FOLLOW_indexProperties_in_alterIndexStatementSuffix4954);
					indexProperties270=indexProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_indexProperties.add(indexProperties270.getTree());
					// AST REWRITE
					// elements: tableName, indexName, indexProperties
					// token labels: 
					// rule labels: indexName, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_indexName=new RewriteRuleSubtreeStream(adaptor,"rule indexName",indexName!=null?indexName.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1189:7: -> ^( TOK_ALTERINDEX_PROPERTIES tableName $indexName indexProperties )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1189:9: ^( TOK_ALTERINDEX_PROPERTIES tableName $indexName indexProperties )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERINDEX_PROPERTIES, "TOK_ALTERINDEX_PROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						adaptor.addChild(root_1, stream_indexName.nextTree());
						adaptor.addChild(root_1, stream_indexProperties.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterIndexStatementSuffix"


	public static class alterDatabaseStatementSuffix_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterDatabaseStatementSuffix"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1193:1: alterDatabaseStatementSuffix : ( alterDatabaseSuffixProperties | alterDatabaseSuffixSetOwner );
	public final HiveParser.alterDatabaseStatementSuffix_return alterDatabaseStatementSuffix() throws RecognitionException {
		HiveParser.alterDatabaseStatementSuffix_return retval = new HiveParser.alterDatabaseStatementSuffix_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope alterDatabaseSuffixProperties271 =null;
		ParserRuleReturnScope alterDatabaseSuffixSetOwner272 =null;


		 pushMsg("alter database statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1196:5: ( alterDatabaseSuffixProperties | alterDatabaseSuffixSetOwner )
			int alt75=2;
			int LA75_0 = input.LA(1);
			if ( (LA75_0==Identifier) ) {
				int LA75_1 = input.LA(2);
				if ( (LA75_1==KW_SET) ) {
					int LA75_3 = input.LA(3);
					if ( (LA75_3==KW_DBPROPERTIES) ) {
						alt75=1;
					}
					else if ( (LA75_3==KW_OWNER) ) {
						alt75=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 75, 3, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 75, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}
			else if ( ((LA75_0 >= KW_ABORT && LA75_0 <= KW_AFTER)||LA75_0==KW_ANALYZE||LA75_0==KW_ARCHIVE||LA75_0==KW_ASC||(LA75_0 >= KW_AUTOCOMMIT && LA75_0 <= KW_BEFORE)||(LA75_0 >= KW_BUCKET && LA75_0 <= KW_BUCKETS)||(LA75_0 >= KW_CACHE && LA75_0 <= KW_CASCADE)||LA75_0==KW_CHANGE||(LA75_0 >= KW_CLUSTER && LA75_0 <= KW_COLLECTION)||(LA75_0 >= KW_COLUMNS && LA75_0 <= KW_COMMENT)||(LA75_0 >= KW_COMPACT && LA75_0 <= KW_CONCATENATE)||LA75_0==KW_CONTINUE||LA75_0==KW_DATA||LA75_0==KW_DATABASES||(LA75_0 >= KW_DATETIME && LA75_0 <= KW_DBPROPERTIES)||(LA75_0 >= KW_DEFERRED && LA75_0 <= KW_DEFINED)||(LA75_0 >= KW_DELIMITED && LA75_0 <= KW_DESC)||(LA75_0 >= KW_DETAIL && LA75_0 <= KW_DISABLE)||LA75_0==KW_DISTRIBUTE||LA75_0==KW_DOW||(LA75_0 >= KW_DUMP && LA75_0 <= KW_ELEM_TYPE)||LA75_0==KW_ENABLE||LA75_0==KW_ESCAPED||LA75_0==KW_EXCLUSIVE||(LA75_0 >= KW_EXPLAIN && LA75_0 <= KW_EXPRESSION)||(LA75_0 >= KW_FIELDS && LA75_0 <= KW_FIRST)||(LA75_0 >= KW_FORMAT && LA75_0 <= KW_FORMATTED)||LA75_0==KW_FUNCTIONS||(LA75_0 >= KW_HOUR && LA75_0 <= KW_IDXPROPERTIES)||(LA75_0 >= KW_INDEX && LA75_0 <= KW_INDEXES)||(LA75_0 >= KW_INPATH && LA75_0 <= KW_INPUTFORMAT)||(LA75_0 >= KW_ISOLATION && LA75_0 <= KW_JAR)||(LA75_0 >= KW_KEY && LA75_0 <= KW_LAST)||LA75_0==KW_LEVEL||(LA75_0 >= KW_LIMIT && LA75_0 <= KW_LOAD)||(LA75_0 >= KW_LOCATION && LA75_0 <= KW_LONG)||(LA75_0 >= KW_MAPJOIN && LA75_0 <= KW_MATERIALIZED)||LA75_0==KW_METADATA||(LA75_0 >= KW_MINUTE && LA75_0 <= KW_MONTH)||LA75_0==KW_MSCK||(LA75_0 >= KW_NORELY && LA75_0 <= KW_NOSCAN)||LA75_0==KW_NOVALIDATE||LA75_0==KW_NULLS||LA75_0==KW_OFFSET||(LA75_0 >= KW_OPERATOR && LA75_0 <= KW_OPTION)||(LA75_0 >= KW_OUTPUTDRIVER && LA75_0 <= KW_OUTPUTFORMAT)||(LA75_0 >= KW_OVERWRITE && LA75_0 <= KW_OWNER)||(LA75_0 >= KW_PARTITIONED && LA75_0 <= KW_PARTITIONS)||LA75_0==KW_PLUS||LA75_0==KW_PRETTY||LA75_0==KW_PRINCIPALS||(LA75_0 >= KW_PURGE && LA75_0 <= KW_QUARTER)||LA75_0==KW_READ||(LA75_0 >= KW_REBUILD && LA75_0 <= KW_RECORDWRITER)||(LA75_0 >= KW_RELOAD && LA75_0 <= KW_RESTRICT)||LA75_0==KW_REWRITE||(LA75_0 >= KW_ROLE && LA75_0 <= KW_ROLES)||(LA75_0 >= KW_SCHEMA && LA75_0 <= KW_SECOND)||(LA75_0 >= KW_SEMI && LA75_0 <= KW_SERVER)||(LA75_0 >= KW_SETS && LA75_0 <= KW_SKEWED)||(LA75_0 >= KW_SNAPSHOT && LA75_0 <= KW_SSL)||(LA75_0 >= KW_STATISTICS && LA75_0 <= KW_SUMMARY)||LA75_0==KW_TABLES||(LA75_0 >= KW_TBLPROPERTIES && LA75_0 <= KW_TERMINATED)||LA75_0==KW_TINYINT||(LA75_0 >= KW_TOUCH && LA75_0 <= KW_TRANSACTIONS)||LA75_0==KW_UNARCHIVE||LA75_0==KW_UNDO||LA75_0==KW_UNIONTYPE||(LA75_0 >= KW_UNLOCK && LA75_0 <= KW_UNSIGNED)||(LA75_0 >= KW_URI && LA75_0 <= KW_USE)||(LA75_0 >= KW_UTC && LA75_0 <= KW_VALIDATE)||LA75_0==KW_VALUE_TYPE||(LA75_0 >= KW_VECTORIZATION && LA75_0 <= KW_WEEK)||LA75_0==KW_WHILE||(LA75_0 >= KW_WORK && LA75_0 <= KW_YEAR)||LA75_0==KW_BATCH||LA75_0==KW_DAYOFWEEK||LA75_0==KW_HOLD_DDLTIME||LA75_0==KW_IGNORE||LA75_0==KW_NO_DROP||LA75_0==KW_OFFLINE||LA75_0==KW_PROTECTION||LA75_0==KW_READONLY) ) {
				int LA75_2 = input.LA(2);
				if ( (LA75_2==KW_SET) ) {
					int LA75_4 = input.LA(3);
					if ( (LA75_4==KW_DBPROPERTIES) ) {
						alt75=1;
					}
					else if ( (LA75_4==KW_OWNER) ) {
						alt75=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 75, 4, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 75, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 75, 0, input);
				throw nvae;
			}

			switch (alt75) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1196:7: alterDatabaseSuffixProperties
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterDatabaseSuffixProperties_in_alterDatabaseStatementSuffix5005);
					alterDatabaseSuffixProperties271=alterDatabaseSuffixProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterDatabaseSuffixProperties271.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1197:7: alterDatabaseSuffixSetOwner
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_alterDatabaseSuffixSetOwner_in_alterDatabaseStatementSuffix5013);
					alterDatabaseSuffixSetOwner272=alterDatabaseSuffixSetOwner();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, alterDatabaseSuffixSetOwner272.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterDatabaseStatementSuffix"


	public static class alterDatabaseSuffixProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterDatabaseSuffixProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1200:1: alterDatabaseSuffixProperties : name= identifier KW_SET KW_DBPROPERTIES dbProperties -> ^( TOK_ALTERDATABASE_PROPERTIES $name dbProperties ) ;
	public final HiveParser.alterDatabaseSuffixProperties_return alterDatabaseSuffixProperties() throws RecognitionException {
		HiveParser.alterDatabaseSuffixProperties_return retval = new HiveParser.alterDatabaseSuffixProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET273=null;
		Token KW_DBPROPERTIES274=null;
		ParserRuleReturnScope name =null;
		ParserRuleReturnScope dbProperties275 =null;

		ASTNode KW_SET273_tree=null;
		ASTNode KW_DBPROPERTIES274_tree=null;
		RewriteRuleTokenStream stream_KW_DBPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_DBPROPERTIES");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_dbProperties=new RewriteRuleSubtreeStream(adaptor,"rule dbProperties");

		 pushMsg("alter database properties statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1203:5: (name= identifier KW_SET KW_DBPROPERTIES dbProperties -> ^( TOK_ALTERDATABASE_PROPERTIES $name dbProperties ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1203:7: name= identifier KW_SET KW_DBPROPERTIES dbProperties
			{
			pushFollow(FOLLOW_identifier_in_alterDatabaseSuffixProperties5042);
			name=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(name.getTree());
			KW_SET273=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterDatabaseSuffixProperties5044); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET273);

			KW_DBPROPERTIES274=(Token)match(input,KW_DBPROPERTIES,FOLLOW_KW_DBPROPERTIES_in_alterDatabaseSuffixProperties5046); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DBPROPERTIES.add(KW_DBPROPERTIES274);

			pushFollow(FOLLOW_dbProperties_in_alterDatabaseSuffixProperties5048);
			dbProperties275=dbProperties();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_dbProperties.add(dbProperties275.getTree());
			// AST REWRITE
			// elements: dbProperties, name
			// token labels: 
			// rule labels: name, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name",name!=null?name.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1204:5: -> ^( TOK_ALTERDATABASE_PROPERTIES $name dbProperties )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1204:8: ^( TOK_ALTERDATABASE_PROPERTIES $name dbProperties )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERDATABASE_PROPERTIES, "TOK_ALTERDATABASE_PROPERTIES"), root_1);
				adaptor.addChild(root_1, stream_name.nextTree());
				adaptor.addChild(root_1, stream_dbProperties.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterDatabaseSuffixProperties"


	public static class alterDatabaseSuffixSetOwner_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterDatabaseSuffixSetOwner"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1207:1: alterDatabaseSuffixSetOwner : dbName= identifier KW_SET KW_OWNER principalName -> ^( TOK_ALTERDATABASE_OWNER $dbName principalName ) ;
	public final HiveParser.alterDatabaseSuffixSetOwner_return alterDatabaseSuffixSetOwner() throws RecognitionException {
		HiveParser.alterDatabaseSuffixSetOwner_return retval = new HiveParser.alterDatabaseSuffixSetOwner_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET276=null;
		Token KW_OWNER277=null;
		ParserRuleReturnScope dbName =null;
		ParserRuleReturnScope principalName278 =null;

		ASTNode KW_SET276_tree=null;
		ASTNode KW_OWNER277_tree=null;
		RewriteRuleTokenStream stream_KW_OWNER=new RewriteRuleTokenStream(adaptor,"token KW_OWNER");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_principalName=new RewriteRuleSubtreeStream(adaptor,"rule principalName");

		 pushMsg("alter database set owner", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1210:5: (dbName= identifier KW_SET KW_OWNER principalName -> ^( TOK_ALTERDATABASE_OWNER $dbName principalName ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1210:7: dbName= identifier KW_SET KW_OWNER principalName
			{
			pushFollow(FOLLOW_identifier_in_alterDatabaseSuffixSetOwner5092);
			dbName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(dbName.getTree());
			KW_SET276=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterDatabaseSuffixSetOwner5094); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET276);

			KW_OWNER277=(Token)match(input,KW_OWNER,FOLLOW_KW_OWNER_in_alterDatabaseSuffixSetOwner5096); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_OWNER.add(KW_OWNER277);

			pushFollow(FOLLOW_principalName_in_alterDatabaseSuffixSetOwner5098);
			principalName278=principalName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalName.add(principalName278.getTree());
			// AST REWRITE
			// elements: dbName, principalName
			// token labels: 
			// rule labels: dbName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_dbName=new RewriteRuleSubtreeStream(adaptor,"rule dbName",dbName!=null?dbName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1211:5: -> ^( TOK_ALTERDATABASE_OWNER $dbName principalName )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1211:8: ^( TOK_ALTERDATABASE_OWNER $dbName principalName )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERDATABASE_OWNER, "TOK_ALTERDATABASE_OWNER"), root_1);
				adaptor.addChild(root_1, stream_dbName.nextTree());
				adaptor.addChild(root_1, stream_principalName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterDatabaseSuffixSetOwner"


	public static class alterStatementSuffixRename_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixRename"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1214:1: alterStatementSuffixRename[boolean table] : KW_RENAME KW_TO tableName -> { table }? ^( TOK_ALTERTABLE_RENAME tableName ) -> ^( TOK_ALTERVIEW_RENAME tableName ) ;
	public final HiveParser.alterStatementSuffixRename_return alterStatementSuffixRename(boolean table) throws RecognitionException {
		HiveParser.alterStatementSuffixRename_return retval = new HiveParser.alterStatementSuffixRename_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RENAME279=null;
		Token KW_TO280=null;
		ParserRuleReturnScope tableName281 =null;

		ASTNode KW_RENAME279_tree=null;
		ASTNode KW_TO280_tree=null;
		RewriteRuleTokenStream stream_KW_RENAME=new RewriteRuleTokenStream(adaptor,"token KW_RENAME");
		RewriteRuleTokenStream stream_KW_TO=new RewriteRuleTokenStream(adaptor,"token KW_TO");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("rename statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1217:5: ( KW_RENAME KW_TO tableName -> { table }? ^( TOK_ALTERTABLE_RENAME tableName ) -> ^( TOK_ALTERVIEW_RENAME tableName ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1217:7: KW_RENAME KW_TO tableName
			{
			KW_RENAME279=(Token)match(input,KW_RENAME,FOLLOW_KW_RENAME_in_alterStatementSuffixRename5141); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_RENAME.add(KW_RENAME279);

			KW_TO280=(Token)match(input,KW_TO,FOLLOW_KW_TO_in_alterStatementSuffixRename5143); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TO.add(KW_TO280);

			pushFollow(FOLLOW_tableName_in_alterStatementSuffixRename5145);
			tableName281=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName281.getTree());
			// AST REWRITE
			// elements: tableName, tableName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1218:5: -> { table }? ^( TOK_ALTERTABLE_RENAME tableName )
			if ( table ) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1218:19: ^( TOK_ALTERTABLE_RENAME tableName )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_RENAME, "TOK_ALTERTABLE_RENAME"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1219:5: -> ^( TOK_ALTERVIEW_RENAME tableName )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1219:19: ^( TOK_ALTERVIEW_RENAME tableName )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERVIEW_RENAME, "TOK_ALTERVIEW_RENAME"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixRename"


	public static class alterStatementSuffixAddCol_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixAddCol"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1222:1: alterStatementSuffixAddCol : (add= KW_ADD |replace= KW_REPLACE ) KW_COLUMNS LPAREN columnNameTypeList RPAREN ( restrictOrCascade )? -> {$add != null}? ^( TOK_ALTERTABLE_ADDCOLS columnNameTypeList ( restrictOrCascade )? ) -> ^( TOK_ALTERTABLE_REPLACECOLS columnNameTypeList ( restrictOrCascade )? ) ;
	public final HiveParser.alterStatementSuffixAddCol_return alterStatementSuffixAddCol() throws RecognitionException {
		HiveParser.alterStatementSuffixAddCol_return retval = new HiveParser.alterStatementSuffixAddCol_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token add=null;
		Token replace=null;
		Token KW_COLUMNS282=null;
		Token LPAREN283=null;
		Token RPAREN285=null;
		ParserRuleReturnScope columnNameTypeList284 =null;
		ParserRuleReturnScope restrictOrCascade286 =null;

		ASTNode add_tree=null;
		ASTNode replace_tree=null;
		ASTNode KW_COLUMNS282_tree=null;
		ASTNode LPAREN283_tree=null;
		ASTNode RPAREN285_tree=null;
		RewriteRuleTokenStream stream_KW_COLUMNS=new RewriteRuleTokenStream(adaptor,"token KW_COLUMNS");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_REPLACE=new RewriteRuleTokenStream(adaptor,"token KW_REPLACE");
		RewriteRuleTokenStream stream_KW_ADD=new RewriteRuleTokenStream(adaptor,"token KW_ADD");
		RewriteRuleSubtreeStream stream_columnNameTypeList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameTypeList");
		RewriteRuleSubtreeStream stream_restrictOrCascade=new RewriteRuleSubtreeStream(adaptor,"rule restrictOrCascade");

		 pushMsg("add column statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:5: ( (add= KW_ADD |replace= KW_REPLACE ) KW_COLUMNS LPAREN columnNameTypeList RPAREN ( restrictOrCascade )? -> {$add != null}? ^( TOK_ALTERTABLE_ADDCOLS columnNameTypeList ( restrictOrCascade )? ) -> ^( TOK_ALTERTABLE_REPLACECOLS columnNameTypeList ( restrictOrCascade )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:7: (add= KW_ADD |replace= KW_REPLACE ) KW_COLUMNS LPAREN columnNameTypeList RPAREN ( restrictOrCascade )?
			{
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:7: (add= KW_ADD |replace= KW_REPLACE )
			int alt76=2;
			int LA76_0 = input.LA(1);
			if ( (LA76_0==KW_ADD) ) {
				alt76=1;
			}
			else if ( (LA76_0==KW_REPLACE) ) {
				alt76=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 76, 0, input);
				throw nvae;
			}

			switch (alt76) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:8: add= KW_ADD
					{
					add=(Token)match(input,KW_ADD,FOLLOW_KW_ADD_in_alterStatementSuffixAddCol5212); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ADD.add(add);

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:21: replace= KW_REPLACE
					{
					replace=(Token)match(input,KW_REPLACE,FOLLOW_KW_REPLACE_in_alterStatementSuffixAddCol5218); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_REPLACE.add(replace);

					}
					break;

			}

			KW_COLUMNS282=(Token)match(input,KW_COLUMNS,FOLLOW_KW_COLUMNS_in_alterStatementSuffixAddCol5221); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COLUMNS.add(KW_COLUMNS282);

			LPAREN283=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_alterStatementSuffixAddCol5223); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN283);

			pushFollow(FOLLOW_columnNameTypeList_in_alterStatementSuffixAddCol5225);
			columnNameTypeList284=columnNameTypeList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameTypeList.add(columnNameTypeList284.getTree());
			RPAREN285=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_alterStatementSuffixAddCol5227); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN285);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:85: ( restrictOrCascade )?
			int alt77=2;
			int LA77_0 = input.LA(1);
			if ( (LA77_0==KW_CASCADE||LA77_0==KW_RESTRICT) ) {
				alt77=1;
			}
			switch (alt77) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1225:85: restrictOrCascade
					{
					pushFollow(FOLLOW_restrictOrCascade_in_alterStatementSuffixAddCol5229);
					restrictOrCascade286=restrictOrCascade();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_restrictOrCascade.add(restrictOrCascade286.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: restrictOrCascade, columnNameTypeList, columnNameTypeList, restrictOrCascade
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1226:5: -> {$add != null}? ^( TOK_ALTERTABLE_ADDCOLS columnNameTypeList ( restrictOrCascade )? )
			if (add != null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1226:24: ^( TOK_ALTERTABLE_ADDCOLS columnNameTypeList ( restrictOrCascade )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_ADDCOLS, "TOK_ALTERTABLE_ADDCOLS"), root_1);
				adaptor.addChild(root_1, stream_columnNameTypeList.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1226:68: ( restrictOrCascade )?
				if ( stream_restrictOrCascade.hasNext() ) {
					adaptor.addChild(root_1, stream_restrictOrCascade.nextTree());
				}
				stream_restrictOrCascade.reset();

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1227:5: -> ^( TOK_ALTERTABLE_REPLACECOLS columnNameTypeList ( restrictOrCascade )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1227:24: ^( TOK_ALTERTABLE_REPLACECOLS columnNameTypeList ( restrictOrCascade )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_REPLACECOLS, "TOK_ALTERTABLE_REPLACECOLS"), root_1);
				adaptor.addChild(root_1, stream_columnNameTypeList.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1227:72: ( restrictOrCascade )?
				if ( stream_restrictOrCascade.hasNext() ) {
					adaptor.addChild(root_1, stream_restrictOrCascade.nextTree());
				}
				stream_restrictOrCascade.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixAddCol"


	public static class alterStatementSuffixAddConstraint_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixAddConstraint"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1230:1: alterStatementSuffixAddConstraint : KW_ADD (fk= foreignKeyWithName | primaryKeyWithName ) -> {fk != null}? ^( TOK_ALTERTABLE_ADDCONSTRAINT foreignKeyWithName ) -> ^( TOK_ALTERTABLE_ADDCONSTRAINT primaryKeyWithName ) ;
	public final HiveParser.alterStatementSuffixAddConstraint_return alterStatementSuffixAddConstraint() throws RecognitionException {
		HiveParser.alterStatementSuffixAddConstraint_return retval = new HiveParser.alterStatementSuffixAddConstraint_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ADD287=null;
		ParserRuleReturnScope fk =null;
		ParserRuleReturnScope primaryKeyWithName288 =null;

		ASTNode KW_ADD287_tree=null;
		RewriteRuleTokenStream stream_KW_ADD=new RewriteRuleTokenStream(adaptor,"token KW_ADD");
		RewriteRuleSubtreeStream stream_foreignKeyWithName=new RewriteRuleSubtreeStream(adaptor,"rule foreignKeyWithName");
		RewriteRuleSubtreeStream stream_primaryKeyWithName=new RewriteRuleSubtreeStream(adaptor,"rule primaryKeyWithName");

		 pushMsg("add constraint statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1233:4: ( KW_ADD (fk= foreignKeyWithName | primaryKeyWithName ) -> {fk != null}? ^( TOK_ALTERTABLE_ADDCONSTRAINT foreignKeyWithName ) -> ^( TOK_ALTERTABLE_ADDCONSTRAINT primaryKeyWithName ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1233:7: KW_ADD (fk= foreignKeyWithName | primaryKeyWithName )
			{
			KW_ADD287=(Token)match(input,KW_ADD,FOLLOW_KW_ADD_in_alterStatementSuffixAddConstraint5305); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ADD.add(KW_ADD287);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1233:14: (fk= foreignKeyWithName | primaryKeyWithName )
			int alt78=2;
			int LA78_0 = input.LA(1);
			if ( (LA78_0==KW_CONSTRAINT) ) {
				int LA78_1 = input.LA(2);
				if ( (LA78_1==Identifier) ) {
					int LA78_2 = input.LA(3);
					if ( (LA78_2==KW_FOREIGN) ) {
						alt78=1;
					}
					else if ( (LA78_2==KW_PRIMARY) ) {
						alt78=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 78, 2, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}
				else if ( ((LA78_1 >= KW_ABORT && LA78_1 <= KW_AFTER)||LA78_1==KW_ANALYZE||LA78_1==KW_ARCHIVE||LA78_1==KW_ASC||(LA78_1 >= KW_AUTOCOMMIT && LA78_1 <= KW_BEFORE)||(LA78_1 >= KW_BUCKET && LA78_1 <= KW_BUCKETS)||(LA78_1 >= KW_CACHE && LA78_1 <= KW_CASCADE)||LA78_1==KW_CHANGE||(LA78_1 >= KW_CLUSTER && LA78_1 <= KW_COLLECTION)||(LA78_1 >= KW_COLUMNS && LA78_1 <= KW_COMMENT)||(LA78_1 >= KW_COMPACT && LA78_1 <= KW_CONCATENATE)||LA78_1==KW_CONTINUE||LA78_1==KW_DATA||LA78_1==KW_DATABASES||(LA78_1 >= KW_DATETIME && LA78_1 <= KW_DBPROPERTIES)||(LA78_1 >= KW_DEFERRED && LA78_1 <= KW_DEFINED)||(LA78_1 >= KW_DELIMITED && LA78_1 <= KW_DESC)||(LA78_1 >= KW_DETAIL && LA78_1 <= KW_DISABLE)||LA78_1==KW_DISTRIBUTE||LA78_1==KW_DOW||(LA78_1 >= KW_DUMP && LA78_1 <= KW_ELEM_TYPE)||LA78_1==KW_ENABLE||LA78_1==KW_ESCAPED||LA78_1==KW_EXCLUSIVE||(LA78_1 >= KW_EXPLAIN && LA78_1 <= KW_EXPRESSION)||(LA78_1 >= KW_FIELDS && LA78_1 <= KW_FIRST)||(LA78_1 >= KW_FORMAT && LA78_1 <= KW_FORMATTED)||LA78_1==KW_FUNCTIONS||(LA78_1 >= KW_HOUR && LA78_1 <= KW_IDXPROPERTIES)||(LA78_1 >= KW_INDEX && LA78_1 <= KW_INDEXES)||(LA78_1 >= KW_INPATH && LA78_1 <= KW_INPUTFORMAT)||(LA78_1 >= KW_ISOLATION && LA78_1 <= KW_JAR)||(LA78_1 >= KW_KEY && LA78_1 <= KW_LAST)||LA78_1==KW_LEVEL||(LA78_1 >= KW_LIMIT && LA78_1 <= KW_LOAD)||(LA78_1 >= KW_LOCATION && LA78_1 <= KW_LONG)||(LA78_1 >= KW_MAPJOIN && LA78_1 <= KW_MATERIALIZED)||LA78_1==KW_METADATA||(LA78_1 >= KW_MINUTE && LA78_1 <= KW_MONTH)||LA78_1==KW_MSCK||(LA78_1 >= KW_NORELY && LA78_1 <= KW_NOSCAN)||LA78_1==KW_NOVALIDATE||LA78_1==KW_NULLS||LA78_1==KW_OFFSET||(LA78_1 >= KW_OPERATOR && LA78_1 <= KW_OPTION)||(LA78_1 >= KW_OUTPUTDRIVER && LA78_1 <= KW_OUTPUTFORMAT)||(LA78_1 >= KW_OVERWRITE && LA78_1 <= KW_OWNER)||(LA78_1 >= KW_PARTITIONED && LA78_1 <= KW_PARTITIONS)||LA78_1==KW_PLUS||LA78_1==KW_PRETTY||LA78_1==KW_PRINCIPALS||(LA78_1 >= KW_PURGE && LA78_1 <= KW_QUARTER)||LA78_1==KW_READ||(LA78_1 >= KW_REBUILD && LA78_1 <= KW_RECORDWRITER)||(LA78_1 >= KW_RELOAD && LA78_1 <= KW_RESTRICT)||LA78_1==KW_REWRITE||(LA78_1 >= KW_ROLE && LA78_1 <= KW_ROLES)||(LA78_1 >= KW_SCHEMA && LA78_1 <= KW_SECOND)||(LA78_1 >= KW_SEMI && LA78_1 <= KW_SERVER)||(LA78_1 >= KW_SETS && LA78_1 <= KW_SKEWED)||(LA78_1 >= KW_SNAPSHOT && LA78_1 <= KW_SSL)||(LA78_1 >= KW_STATISTICS && LA78_1 <= KW_SUMMARY)||LA78_1==KW_TABLES||(LA78_1 >= KW_TBLPROPERTIES && LA78_1 <= KW_TERMINATED)||LA78_1==KW_TINYINT||(LA78_1 >= KW_TOUCH && LA78_1 <= KW_TRANSACTIONS)||LA78_1==KW_UNARCHIVE||LA78_1==KW_UNDO||LA78_1==KW_UNIONTYPE||(LA78_1 >= KW_UNLOCK && LA78_1 <= KW_UNSIGNED)||(LA78_1 >= KW_URI && LA78_1 <= KW_USE)||(LA78_1 >= KW_UTC && LA78_1 <= KW_VALIDATE)||LA78_1==KW_VALUE_TYPE||(LA78_1 >= KW_VECTORIZATION && LA78_1 <= KW_WEEK)||LA78_1==KW_WHILE||(LA78_1 >= KW_WORK && LA78_1 <= KW_YEAR)||LA78_1==KW_BATCH||LA78_1==KW_DAYOFWEEK||LA78_1==KW_HOLD_DDLTIME||LA78_1==KW_IGNORE||LA78_1==KW_NO_DROP||LA78_1==KW_OFFLINE||LA78_1==KW_PROTECTION||LA78_1==KW_READONLY) ) {
					int LA78_3 = input.LA(3);
					if ( (LA78_3==KW_FOREIGN) ) {
						alt78=1;
					}
					else if ( (LA78_3==KW_PRIMARY) ) {
						alt78=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 78, 3, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 78, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 78, 0, input);
				throw nvae;
			}

			switch (alt78) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1233:15: fk= foreignKeyWithName
					{
					pushFollow(FOLLOW_foreignKeyWithName_in_alterStatementSuffixAddConstraint5310);
					fk=foreignKeyWithName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_foreignKeyWithName.add(fk.getTree());
					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1233:39: primaryKeyWithName
					{
					pushFollow(FOLLOW_primaryKeyWithName_in_alterStatementSuffixAddConstraint5314);
					primaryKeyWithName288=primaryKeyWithName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_primaryKeyWithName.add(primaryKeyWithName288.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: primaryKeyWithName, foreignKeyWithName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1234:4: -> {fk != null}? ^( TOK_ALTERTABLE_ADDCONSTRAINT foreignKeyWithName )
			if (fk != null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1234:21: ^( TOK_ALTERTABLE_ADDCONSTRAINT foreignKeyWithName )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_ADDCONSTRAINT, "TOK_ALTERTABLE_ADDCONSTRAINT"), root_1);
				adaptor.addChild(root_1, stream_foreignKeyWithName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1235:4: -> ^( TOK_ALTERTABLE_ADDCONSTRAINT primaryKeyWithName )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1235:21: ^( TOK_ALTERTABLE_ADDCONSTRAINT primaryKeyWithName )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_ADDCONSTRAINT, "TOK_ALTERTABLE_ADDCONSTRAINT"), root_1);
				adaptor.addChild(root_1, stream_primaryKeyWithName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixAddConstraint"


	public static class alterStatementSuffixDropConstraint_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixDropConstraint"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1238:1: alterStatementSuffixDropConstraint : KW_DROP KW_CONSTRAINT cName= identifier -> ^( TOK_ALTERTABLE_DROPCONSTRAINT $cName) ;
	public final HiveParser.alterStatementSuffixDropConstraint_return alterStatementSuffixDropConstraint() throws RecognitionException {
		HiveParser.alterStatementSuffixDropConstraint_return retval = new HiveParser.alterStatementSuffixDropConstraint_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP289=null;
		Token KW_CONSTRAINT290=null;
		ParserRuleReturnScope cName =null;

		ASTNode KW_DROP289_tree=null;
		ASTNode KW_CONSTRAINT290_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_CONSTRAINT=new RewriteRuleTokenStream(adaptor,"token KW_CONSTRAINT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("drop constraint statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1241:4: ( KW_DROP KW_CONSTRAINT cName= identifier -> ^( TOK_ALTERTABLE_DROPCONSTRAINT $cName) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1241:6: KW_DROP KW_CONSTRAINT cName= identifier
			{
			KW_DROP289=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_alterStatementSuffixDropConstraint5378); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP289);

			KW_CONSTRAINT290=(Token)match(input,KW_CONSTRAINT,FOLLOW_KW_CONSTRAINT_in_alterStatementSuffixDropConstraint5380); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CONSTRAINT.add(KW_CONSTRAINT290);

			pushFollow(FOLLOW_identifier_in_alterStatementSuffixDropConstraint5384);
			cName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(cName.getTree());
			// AST REWRITE
			// elements: cName
			// token labels: 
			// rule labels: cName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_cName=new RewriteRuleSubtreeStream(adaptor,"rule cName",cName!=null?cName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1242:4: -> ^( TOK_ALTERTABLE_DROPCONSTRAINT $cName)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1242:6: ^( TOK_ALTERTABLE_DROPCONSTRAINT $cName)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_DROPCONSTRAINT, "TOK_ALTERTABLE_DROPCONSTRAINT"), root_1);
				adaptor.addChild(root_1, stream_cName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixDropConstraint"


	public static class alterStatementSuffixRenameCol_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixRenameCol"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1245:1: alterStatementSuffixRenameCol : KW_CHANGE ( KW_COLUMN )? oldName= identifier newName= identifier colType ( KW_COMMENT comment= StringLiteral )? ( alterStatementChangeColPosition )? ( restrictOrCascade )? -> ^( TOK_ALTERTABLE_RENAMECOL $oldName $newName colType ( $comment)? ( alterStatementChangeColPosition )? ( restrictOrCascade )? ) ;
	public final HiveParser.alterStatementSuffixRenameCol_return alterStatementSuffixRenameCol() throws RecognitionException {
		HiveParser.alterStatementSuffixRenameCol_return retval = new HiveParser.alterStatementSuffixRenameCol_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_CHANGE291=null;
		Token KW_COLUMN292=null;
		Token KW_COMMENT294=null;
		ParserRuleReturnScope oldName =null;
		ParserRuleReturnScope newName =null;
		ParserRuleReturnScope colType293 =null;
		ParserRuleReturnScope alterStatementChangeColPosition295 =null;
		ParserRuleReturnScope restrictOrCascade296 =null;

		ASTNode comment_tree=null;
		ASTNode KW_CHANGE291_tree=null;
		ASTNode KW_COLUMN292_tree=null;
		ASTNode KW_COMMENT294_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");
		RewriteRuleTokenStream stream_KW_COLUMN=new RewriteRuleTokenStream(adaptor,"token KW_COLUMN");
		RewriteRuleTokenStream stream_KW_CHANGE=new RewriteRuleTokenStream(adaptor,"token KW_CHANGE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_colType=new RewriteRuleSubtreeStream(adaptor,"rule colType");
		RewriteRuleSubtreeStream stream_alterStatementChangeColPosition=new RewriteRuleSubtreeStream(adaptor,"rule alterStatementChangeColPosition");
		RewriteRuleSubtreeStream stream_restrictOrCascade=new RewriteRuleSubtreeStream(adaptor,"rule restrictOrCascade");

		 pushMsg("rename column name", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:5: ( KW_CHANGE ( KW_COLUMN )? oldName= identifier newName= identifier colType ( KW_COMMENT comment= StringLiteral )? ( alterStatementChangeColPosition )? ( restrictOrCascade )? -> ^( TOK_ALTERTABLE_RENAMECOL $oldName $newName colType ( $comment)? ( alterStatementChangeColPosition )? ( restrictOrCascade )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:7: KW_CHANGE ( KW_COLUMN )? oldName= identifier newName= identifier colType ( KW_COMMENT comment= StringLiteral )? ( alterStatementChangeColPosition )? ( restrictOrCascade )?
			{
			KW_CHANGE291=(Token)match(input,KW_CHANGE,FOLLOW_KW_CHANGE_in_alterStatementSuffixRenameCol5421); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CHANGE.add(KW_CHANGE291);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:17: ( KW_COLUMN )?
			int alt79=2;
			int LA79_0 = input.LA(1);
			if ( (LA79_0==KW_COLUMN) ) {
				alt79=1;
			}
			switch (alt79) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:17: KW_COLUMN
					{
					KW_COLUMN292=(Token)match(input,KW_COLUMN,FOLLOW_KW_COLUMN_in_alterStatementSuffixRenameCol5423); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COLUMN.add(KW_COLUMN292);

					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_alterStatementSuffixRenameCol5428);
			oldName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(oldName.getTree());
			pushFollow(FOLLOW_identifier_in_alterStatementSuffixRenameCol5432);
			newName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(newName.getTree());
			pushFollow(FOLLOW_colType_in_alterStatementSuffixRenameCol5434);
			colType293=colType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_colType.add(colType293.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:74: ( KW_COMMENT comment= StringLiteral )?
			int alt80=2;
			int LA80_0 = input.LA(1);
			if ( (LA80_0==KW_COMMENT) ) {
				alt80=1;
			}
			switch (alt80) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:75: KW_COMMENT comment= StringLiteral
					{
					KW_COMMENT294=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_alterStatementSuffixRenameCol5437); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT294);

					comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_alterStatementSuffixRenameCol5441); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:110: ( alterStatementChangeColPosition )?
			int alt81=2;
			int LA81_0 = input.LA(1);
			if ( (LA81_0==KW_AFTER||LA81_0==KW_FIRST) ) {
				alt81=1;
			}
			switch (alt81) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:110: alterStatementChangeColPosition
					{
					pushFollow(FOLLOW_alterStatementChangeColPosition_in_alterStatementSuffixRenameCol5445);
					alterStatementChangeColPosition295=alterStatementChangeColPosition();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterStatementChangeColPosition.add(alterStatementChangeColPosition295.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:143: ( restrictOrCascade )?
			int alt82=2;
			int LA82_0 = input.LA(1);
			if ( (LA82_0==KW_CASCADE||LA82_0==KW_RESTRICT) ) {
				alt82=1;
			}
			switch (alt82) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1248:143: restrictOrCascade
					{
					pushFollow(FOLLOW_restrictOrCascade_in_alterStatementSuffixRenameCol5448);
					restrictOrCascade296=restrictOrCascade();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_restrictOrCascade.add(restrictOrCascade296.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: alterStatementChangeColPosition, restrictOrCascade, newName, colType, oldName, comment
			// token labels: comment
			// rule labels: newName, oldName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_newName=new RewriteRuleSubtreeStream(adaptor,"rule newName",newName!=null?newName.getTree():null);
			RewriteRuleSubtreeStream stream_oldName=new RewriteRuleSubtreeStream(adaptor,"rule oldName",oldName!=null?oldName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1249:5: -> ^( TOK_ALTERTABLE_RENAMECOL $oldName $newName colType ( $comment)? ( alterStatementChangeColPosition )? ( restrictOrCascade )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1249:7: ^( TOK_ALTERTABLE_RENAMECOL $oldName $newName colType ( $comment)? ( alterStatementChangeColPosition )? ( restrictOrCascade )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_RENAMECOL, "TOK_ALTERTABLE_RENAMECOL"), root_1);
				adaptor.addChild(root_1, stream_oldName.nextTree());
				adaptor.addChild(root_1, stream_newName.nextTree());
				adaptor.addChild(root_1, stream_colType.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1249:61: ( $comment)?
				if ( stream_comment.hasNext() ) {
					adaptor.addChild(root_1, stream_comment.nextNode());
				}
				stream_comment.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1249:70: ( alterStatementChangeColPosition )?
				if ( stream_alterStatementChangeColPosition.hasNext() ) {
					adaptor.addChild(root_1, stream_alterStatementChangeColPosition.nextTree());
				}
				stream_alterStatementChangeColPosition.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1249:103: ( restrictOrCascade )?
				if ( stream_restrictOrCascade.hasNext() ) {
					adaptor.addChild(root_1, stream_restrictOrCascade.nextTree());
				}
				stream_restrictOrCascade.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixRenameCol"


	public static class alterStatementSuffixUpdateStatsCol_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixUpdateStatsCol"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1252:1: alterStatementSuffixUpdateStatsCol : KW_UPDATE KW_STATISTICS KW_FOR ( KW_COLUMN )? colName= identifier KW_SET tableProperties ( KW_COMMENT comment= StringLiteral )? -> ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? ) ;
	public final HiveParser.alterStatementSuffixUpdateStatsCol_return alterStatementSuffixUpdateStatsCol() throws RecognitionException {
		HiveParser.alterStatementSuffixUpdateStatsCol_return retval = new HiveParser.alterStatementSuffixUpdateStatsCol_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_UPDATE297=null;
		Token KW_STATISTICS298=null;
		Token KW_FOR299=null;
		Token KW_COLUMN300=null;
		Token KW_SET301=null;
		Token KW_COMMENT303=null;
		ParserRuleReturnScope colName =null;
		ParserRuleReturnScope tableProperties302 =null;

		ASTNode comment_tree=null;
		ASTNode KW_UPDATE297_tree=null;
		ASTNode KW_STATISTICS298_tree=null;
		ASTNode KW_FOR299_tree=null;
		ASTNode KW_COLUMN300_tree=null;
		ASTNode KW_SET301_tree=null;
		ASTNode KW_COMMENT303_tree=null;
		RewriteRuleTokenStream stream_KW_STATISTICS=new RewriteRuleTokenStream(adaptor,"token KW_STATISTICS");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,"token KW_FOR");
		RewriteRuleTokenStream stream_KW_UPDATE=new RewriteRuleTokenStream(adaptor,"token KW_UPDATE");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");
		RewriteRuleTokenStream stream_KW_COLUMN=new RewriteRuleTokenStream(adaptor,"token KW_COLUMN");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 pushMsg("update column statistics", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1255:5: ( KW_UPDATE KW_STATISTICS KW_FOR ( KW_COLUMN )? colName= identifier KW_SET tableProperties ( KW_COMMENT comment= StringLiteral )? -> ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1255:7: KW_UPDATE KW_STATISTICS KW_FOR ( KW_COLUMN )? colName= identifier KW_SET tableProperties ( KW_COMMENT comment= StringLiteral )?
			{
			KW_UPDATE297=(Token)match(input,KW_UPDATE,FOLLOW_KW_UPDATE_in_alterStatementSuffixUpdateStatsCol5503); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UPDATE.add(KW_UPDATE297);

			KW_STATISTICS298=(Token)match(input,KW_STATISTICS,FOLLOW_KW_STATISTICS_in_alterStatementSuffixUpdateStatsCol5505); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_STATISTICS.add(KW_STATISTICS298);

			KW_FOR299=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_alterStatementSuffixUpdateStatsCol5507); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOR.add(KW_FOR299);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1255:38: ( KW_COLUMN )?
			int alt83=2;
			int LA83_0 = input.LA(1);
			if ( (LA83_0==KW_COLUMN) ) {
				alt83=1;
			}
			switch (alt83) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1255:38: KW_COLUMN
					{
					KW_COLUMN300=(Token)match(input,KW_COLUMN,FOLLOW_KW_COLUMN_in_alterStatementSuffixUpdateStatsCol5509); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COLUMN.add(KW_COLUMN300);

					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_alterStatementSuffixUpdateStatsCol5514);
			colName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(colName.getTree());
			KW_SET301=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixUpdateStatsCol5516); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET301);

			pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixUpdateStatsCol5518);
			tableProperties302=tableProperties();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties302.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1255:91: ( KW_COMMENT comment= StringLiteral )?
			int alt84=2;
			int LA84_0 = input.LA(1);
			if ( (LA84_0==KW_COMMENT) ) {
				alt84=1;
			}
			switch (alt84) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1255:92: KW_COMMENT comment= StringLiteral
					{
					KW_COMMENT303=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_alterStatementSuffixUpdateStatsCol5521); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT303);

					comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_alterStatementSuffixUpdateStatsCol5525); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

					}
					break;

			}

			// AST REWRITE
			// elements: colName, tableProperties, comment
			// token labels: comment
			// rule labels: colName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_colName=new RewriteRuleSubtreeStream(adaptor,"rule colName",colName!=null?colName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1256:5: -> ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1256:7: ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_UPDATECOLSTATS, "TOK_ALTERTABLE_UPDATECOLSTATS"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, stream_tableProperties.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1256:65: ( $comment)?
				if ( stream_comment.hasNext() ) {
					adaptor.addChild(root_1, stream_comment.nextNode());
				}
				stream_comment.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixUpdateStatsCol"


	public static class alterStatementSuffixUpdateStats_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixUpdateStats"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1259:1: alterStatementSuffixUpdateStats : KW_UPDATE KW_STATISTICS KW_SET tableProperties -> ^( TOK_ALTERTABLE_UPDATESTATS tableProperties ) ;
	public final HiveParser.alterStatementSuffixUpdateStats_return alterStatementSuffixUpdateStats() throws RecognitionException {
		HiveParser.alterStatementSuffixUpdateStats_return retval = new HiveParser.alterStatementSuffixUpdateStats_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UPDATE304=null;
		Token KW_STATISTICS305=null;
		Token KW_SET306=null;
		ParserRuleReturnScope tableProperties307 =null;

		ASTNode KW_UPDATE304_tree=null;
		ASTNode KW_STATISTICS305_tree=null;
		ASTNode KW_SET306_tree=null;
		RewriteRuleTokenStream stream_KW_STATISTICS=new RewriteRuleTokenStream(adaptor,"token KW_STATISTICS");
		RewriteRuleTokenStream stream_KW_UPDATE=new RewriteRuleTokenStream(adaptor,"token KW_UPDATE");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 pushMsg("update basic statistics", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1262:5: ( KW_UPDATE KW_STATISTICS KW_SET tableProperties -> ^( TOK_ALTERTABLE_UPDATESTATS tableProperties ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1262:7: KW_UPDATE KW_STATISTICS KW_SET tableProperties
			{
			KW_UPDATE304=(Token)match(input,KW_UPDATE,FOLLOW_KW_UPDATE_in_alterStatementSuffixUpdateStats5572); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UPDATE.add(KW_UPDATE304);

			KW_STATISTICS305=(Token)match(input,KW_STATISTICS,FOLLOW_KW_STATISTICS_in_alterStatementSuffixUpdateStats5574); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_STATISTICS.add(KW_STATISTICS305);

			KW_SET306=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixUpdateStats5576); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET306);

			pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixUpdateStats5578);
			tableProperties307=tableProperties();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties307.getTree());
			// AST REWRITE
			// elements: tableProperties
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1263:5: -> ^( TOK_ALTERTABLE_UPDATESTATS tableProperties )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1263:7: ^( TOK_ALTERTABLE_UPDATESTATS tableProperties )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_UPDATESTATS, "TOK_ALTERTABLE_UPDATESTATS"), root_1);
				adaptor.addChild(root_1, stream_tableProperties.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixUpdateStats"


	public static class alterStatementChangeColPosition_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementChangeColPosition"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1266:1: alterStatementChangeColPosition : (first= KW_FIRST | KW_AFTER afterCol= identifier -> {$first != null}? ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION ) -> ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION $afterCol) );
	public final HiveParser.alterStatementChangeColPosition_return alterStatementChangeColPosition() throws RecognitionException {
		HiveParser.alterStatementChangeColPosition_return retval = new HiveParser.alterStatementChangeColPosition_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token first=null;
		Token KW_AFTER308=null;
		ParserRuleReturnScope afterCol =null;

		ASTNode first_tree=null;
		ASTNode KW_AFTER308_tree=null;
		RewriteRuleTokenStream stream_KW_AFTER=new RewriteRuleTokenStream(adaptor,"token KW_AFTER");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1267:5: (first= KW_FIRST | KW_AFTER afterCol= identifier -> {$first != null}? ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION ) -> ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION $afterCol) )
			int alt85=2;
			int LA85_0 = input.LA(1);
			if ( (LA85_0==KW_FIRST) ) {
				alt85=1;
			}
			else if ( (LA85_0==KW_AFTER) ) {
				alt85=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 85, 0, input);
				throw nvae;
			}

			switch (alt85) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1267:7: first= KW_FIRST
					{
					root_0 = (ASTNode)adaptor.nil();


					first=(Token)match(input,KW_FIRST,FOLLOW_KW_FIRST_in_alterStatementChangeColPosition5608); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					first_tree = (ASTNode)adaptor.create(first);
					adaptor.addChild(root_0, first_tree);
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1267:22: KW_AFTER afterCol= identifier
					{
					KW_AFTER308=(Token)match(input,KW_AFTER,FOLLOW_KW_AFTER_in_alterStatementChangeColPosition5610); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_AFTER.add(KW_AFTER308);

					pushFollow(FOLLOW_identifier_in_alterStatementChangeColPosition5614);
					afterCol=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(afterCol.getTree());
					// AST REWRITE
					// elements: afterCol
					// token labels: 
					// rule labels: afterCol, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_afterCol=new RewriteRuleSubtreeStream(adaptor,"rule afterCol",afterCol!=null?afterCol.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1268:5: -> {$first != null}? ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION )
					if (first != null) {
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1268:25: ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION, "TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}

					else // 1269:5: -> ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION $afterCol)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1269:8: ^( TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION $afterCol)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION, "TOK_ALTERTABLE_CHANGECOL_AFTER_POSITION"), root_1);
						adaptor.addChild(root_1, stream_afterCol.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementChangeColPosition"


	public static class alterStatementSuffixAddPartitions_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixAddPartitions"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1272:1: alterStatementSuffixAddPartitions[boolean table] : KW_ADD ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ -> { table }? ^( TOK_ALTERTABLE_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ ) -> ^( TOK_ALTERVIEW_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ ) ;
	public final HiveParser.alterStatementSuffixAddPartitions_return alterStatementSuffixAddPartitions(boolean table) throws RecognitionException {
		HiveParser.alterStatementSuffixAddPartitions_return retval = new HiveParser.alterStatementSuffixAddPartitions_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ADD309=null;
		ParserRuleReturnScope ifNotExists310 =null;
		ParserRuleReturnScope alterStatementSuffixAddPartitionsElement311 =null;

		ASTNode KW_ADD309_tree=null;
		RewriteRuleTokenStream stream_KW_ADD=new RewriteRuleTokenStream(adaptor,"token KW_ADD");
		RewriteRuleSubtreeStream stream_ifNotExists=new RewriteRuleSubtreeStream(adaptor,"rule ifNotExists");
		RewriteRuleSubtreeStream stream_alterStatementSuffixAddPartitionsElement=new RewriteRuleSubtreeStream(adaptor,"rule alterStatementSuffixAddPartitionsElement");

		 pushMsg("add partition statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1275:5: ( KW_ADD ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ -> { table }? ^( TOK_ALTERTABLE_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ ) -> ^( TOK_ALTERVIEW_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1275:7: KW_ADD ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+
			{
			KW_ADD309=(Token)match(input,KW_ADD,FOLLOW_KW_ADD_in_alterStatementSuffixAddPartitions5667); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ADD.add(KW_ADD309);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1275:14: ( ifNotExists )?
			int alt86=2;
			int LA86_0 = input.LA(1);
			if ( (LA86_0==KW_IF) ) {
				alt86=1;
			}
			switch (alt86) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1275:14: ifNotExists
					{
					pushFollow(FOLLOW_ifNotExists_in_alterStatementSuffixAddPartitions5669);
					ifNotExists310=ifNotExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifNotExists.add(ifNotExists310.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1275:27: ( alterStatementSuffixAddPartitionsElement )+
			int cnt87=0;
			loop87:
			while (true) {
				int alt87=2;
				int LA87_0 = input.LA(1);
				if ( (LA87_0==KW_PARTITION) ) {
					alt87=1;
				}

				switch (alt87) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1275:27: alterStatementSuffixAddPartitionsElement
					{
					pushFollow(FOLLOW_alterStatementSuffixAddPartitionsElement_in_alterStatementSuffixAddPartitions5672);
					alterStatementSuffixAddPartitionsElement311=alterStatementSuffixAddPartitionsElement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_alterStatementSuffixAddPartitionsElement.add(alterStatementSuffixAddPartitionsElement311.getTree());
					}
					break;

				default :
					if ( cnt87 >= 1 ) break loop87;
					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee = new EarlyExitException(87, input);
					throw eee;
				}
				cnt87++;
			}

			// AST REWRITE
			// elements: ifNotExists, alterStatementSuffixAddPartitionsElement, ifNotExists, alterStatementSuffixAddPartitionsElement
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1276:5: -> { table }? ^( TOK_ALTERTABLE_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ )
			if ( table ) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1276:19: ^( TOK_ALTERTABLE_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_ADDPARTS, "TOK_ALTERTABLE_ADDPARTS"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1276:45: ( ifNotExists )?
				if ( stream_ifNotExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifNotExists.nextTree());
				}
				stream_ifNotExists.reset();

				if ( !(stream_alterStatementSuffixAddPartitionsElement.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_alterStatementSuffixAddPartitionsElement.hasNext() ) {
					adaptor.addChild(root_1, stream_alterStatementSuffixAddPartitionsElement.nextTree());
				}
				stream_alterStatementSuffixAddPartitionsElement.reset();

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1277:5: -> ^( TOK_ALTERVIEW_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1277:19: ^( TOK_ALTERVIEW_ADDPARTS ( ifNotExists )? ( alterStatementSuffixAddPartitionsElement )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERVIEW_ADDPARTS, "TOK_ALTERVIEW_ADDPARTS"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1277:44: ( ifNotExists )?
				if ( stream_ifNotExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifNotExists.nextTree());
				}
				stream_ifNotExists.reset();

				if ( !(stream_alterStatementSuffixAddPartitionsElement.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_alterStatementSuffixAddPartitionsElement.hasNext() ) {
					adaptor.addChild(root_1, stream_alterStatementSuffixAddPartitionsElement.nextTree());
				}
				stream_alterStatementSuffixAddPartitionsElement.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixAddPartitions"


	public static class alterStatementSuffixAddPartitionsElement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixAddPartitionsElement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1280:1: alterStatementSuffixAddPartitionsElement : partitionSpec ( partitionLocation )? ;
	public final HiveParser.alterStatementSuffixAddPartitionsElement_return alterStatementSuffixAddPartitionsElement() throws RecognitionException {
		HiveParser.alterStatementSuffixAddPartitionsElement_return retval = new HiveParser.alterStatementSuffixAddPartitionsElement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope partitionSpec312 =null;
		ParserRuleReturnScope partitionLocation313 =null;


		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1281:5: ( partitionSpec ( partitionLocation )? )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1281:7: partitionSpec ( partitionLocation )?
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_partitionSpec_in_alterStatementSuffixAddPartitionsElement5735);
			partitionSpec312=partitionSpec();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, partitionSpec312.getTree());

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1281:21: ( partitionLocation )?
			int alt88=2;
			int LA88_0 = input.LA(1);
			if ( (LA88_0==KW_LOCATION) ) {
				alt88=1;
			}
			switch (alt88) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1281:21: partitionLocation
					{
					pushFollow(FOLLOW_partitionLocation_in_alterStatementSuffixAddPartitionsElement5737);
					partitionLocation313=partitionLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, partitionLocation313.getTree());

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixAddPartitionsElement"


	public static class alterStatementSuffixTouch_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixTouch"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1284:1: alterStatementSuffixTouch : KW_TOUCH ( partitionSpec )* -> ^( TOK_ALTERTABLE_TOUCH ( partitionSpec )* ) ;
	public final HiveParser.alterStatementSuffixTouch_return alterStatementSuffixTouch() throws RecognitionException {
		HiveParser.alterStatementSuffixTouch_return retval = new HiveParser.alterStatementSuffixTouch_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_TOUCH314=null;
		ParserRuleReturnScope partitionSpec315 =null;

		ASTNode KW_TOUCH314_tree=null;
		RewriteRuleTokenStream stream_KW_TOUCH=new RewriteRuleTokenStream(adaptor,"token KW_TOUCH");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");

		 pushMsg("touch statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1287:5: ( KW_TOUCH ( partitionSpec )* -> ^( TOK_ALTERTABLE_TOUCH ( partitionSpec )* ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1287:7: KW_TOUCH ( partitionSpec )*
			{
			KW_TOUCH314=(Token)match(input,KW_TOUCH,FOLLOW_KW_TOUCH_in_alterStatementSuffixTouch5765); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TOUCH.add(KW_TOUCH314);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1287:16: ( partitionSpec )*
			loop89:
			while (true) {
				int alt89=2;
				int LA89_0 = input.LA(1);
				if ( (LA89_0==KW_PARTITION) ) {
					alt89=1;
				}

				switch (alt89) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1287:17: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_alterStatementSuffixTouch5768);
					partitionSpec315=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec315.getTree());
					}
					break;

				default :
					break loop89;
				}
			}

			// AST REWRITE
			// elements: partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1288:5: -> ^( TOK_ALTERTABLE_TOUCH ( partitionSpec )* )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1288:8: ^( TOK_ALTERTABLE_TOUCH ( partitionSpec )* )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_TOUCH, "TOK_ALTERTABLE_TOUCH"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1288:31: ( partitionSpec )*
				while ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixTouch"


	public static class alterStatementSuffixArchive_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixArchive"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1291:1: alterStatementSuffixArchive : KW_ARCHIVE ( partitionSpec )* -> ^( TOK_ALTERTABLE_ARCHIVE ( partitionSpec )* ) ;
	public final HiveParser.alterStatementSuffixArchive_return alterStatementSuffixArchive() throws RecognitionException {
		HiveParser.alterStatementSuffixArchive_return retval = new HiveParser.alterStatementSuffixArchive_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ARCHIVE316=null;
		ParserRuleReturnScope partitionSpec317 =null;

		ASTNode KW_ARCHIVE316_tree=null;
		RewriteRuleTokenStream stream_KW_ARCHIVE=new RewriteRuleTokenStream(adaptor,"token KW_ARCHIVE");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");

		 pushMsg("archive statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1294:5: ( KW_ARCHIVE ( partitionSpec )* -> ^( TOK_ALTERTABLE_ARCHIVE ( partitionSpec )* ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1294:7: KW_ARCHIVE ( partitionSpec )*
			{
			KW_ARCHIVE316=(Token)match(input,KW_ARCHIVE,FOLLOW_KW_ARCHIVE_in_alterStatementSuffixArchive5812); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ARCHIVE.add(KW_ARCHIVE316);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1294:18: ( partitionSpec )*
			loop90:
			while (true) {
				int alt90=2;
				int LA90_0 = input.LA(1);
				if ( (LA90_0==KW_PARTITION) ) {
					alt90=1;
				}

				switch (alt90) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1294:19: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_alterStatementSuffixArchive5815);
					partitionSpec317=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec317.getTree());
					}
					break;

				default :
					break loop90;
				}
			}

			// AST REWRITE
			// elements: partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1295:5: -> ^( TOK_ALTERTABLE_ARCHIVE ( partitionSpec )* )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1295:8: ^( TOK_ALTERTABLE_ARCHIVE ( partitionSpec )* )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_ARCHIVE, "TOK_ALTERTABLE_ARCHIVE"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1295:33: ( partitionSpec )*
				while ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixArchive"


	public static class alterStatementSuffixUnArchive_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixUnArchive"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1298:1: alterStatementSuffixUnArchive : KW_UNARCHIVE ( partitionSpec )* -> ^( TOK_ALTERTABLE_UNARCHIVE ( partitionSpec )* ) ;
	public final HiveParser.alterStatementSuffixUnArchive_return alterStatementSuffixUnArchive() throws RecognitionException {
		HiveParser.alterStatementSuffixUnArchive_return retval = new HiveParser.alterStatementSuffixUnArchive_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UNARCHIVE318=null;
		ParserRuleReturnScope partitionSpec319 =null;

		ASTNode KW_UNARCHIVE318_tree=null;
		RewriteRuleTokenStream stream_KW_UNARCHIVE=new RewriteRuleTokenStream(adaptor,"token KW_UNARCHIVE");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");

		 pushMsg("unarchive statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1301:5: ( KW_UNARCHIVE ( partitionSpec )* -> ^( TOK_ALTERTABLE_UNARCHIVE ( partitionSpec )* ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1301:7: KW_UNARCHIVE ( partitionSpec )*
			{
			KW_UNARCHIVE318=(Token)match(input,KW_UNARCHIVE,FOLLOW_KW_UNARCHIVE_in_alterStatementSuffixUnArchive5859); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UNARCHIVE.add(KW_UNARCHIVE318);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1301:20: ( partitionSpec )*
			loop91:
			while (true) {
				int alt91=2;
				int LA91_0 = input.LA(1);
				if ( (LA91_0==KW_PARTITION) ) {
					alt91=1;
				}

				switch (alt91) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1301:21: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_alterStatementSuffixUnArchive5862);
					partitionSpec319=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec319.getTree());
					}
					break;

				default :
					break loop91;
				}
			}

			// AST REWRITE
			// elements: partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1302:5: -> ^( TOK_ALTERTABLE_UNARCHIVE ( partitionSpec )* )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1302:8: ^( TOK_ALTERTABLE_UNARCHIVE ( partitionSpec )* )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_UNARCHIVE, "TOK_ALTERTABLE_UNARCHIVE"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1302:35: ( partitionSpec )*
				while ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixUnArchive"


	public static class partitionLocation_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "partitionLocation"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1305:1: partitionLocation : KW_LOCATION locn= StringLiteral -> ^( TOK_PARTITIONLOCATION $locn) ;
	public final HiveParser.partitionLocation_return partitionLocation() throws RecognitionException {
		HiveParser.partitionLocation_return retval = new HiveParser.partitionLocation_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token locn=null;
		Token KW_LOCATION320=null;

		ASTNode locn_tree=null;
		ASTNode KW_LOCATION320_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_LOCATION=new RewriteRuleTokenStream(adaptor,"token KW_LOCATION");

		 pushMsg("partition location", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1308:5: ( KW_LOCATION locn= StringLiteral -> ^( TOK_PARTITIONLOCATION $locn) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1309:7: KW_LOCATION locn= StringLiteral
			{
			KW_LOCATION320=(Token)match(input,KW_LOCATION,FOLLOW_KW_LOCATION_in_partitionLocation5912); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCATION.add(KW_LOCATION320);

			locn=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_partitionLocation5916); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(locn);

			// AST REWRITE
			// elements: locn
			// token labels: locn
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_locn=new RewriteRuleTokenStream(adaptor,"token locn",locn);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1309:38: -> ^( TOK_PARTITIONLOCATION $locn)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1309:41: ^( TOK_PARTITIONLOCATION $locn)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PARTITIONLOCATION, "TOK_PARTITIONLOCATION"), root_1);
				adaptor.addChild(root_1, stream_locn.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "partitionLocation"


	public static class alterStatementSuffixDropPartitions_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixDropPartitions"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1312:1: alterStatementSuffixDropPartitions[boolean table] : KW_DROP ( ifExists )? dropPartitionSpec ( COMMA dropPartitionSpec )* ( KW_PURGE )? ( replicationClause )? -> { table }? ^( TOK_ALTERTABLE_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( KW_PURGE )? ( replicationClause )? ) -> ^( TOK_ALTERVIEW_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( replicationClause )? ) ;
	public final HiveParser.alterStatementSuffixDropPartitions_return alterStatementSuffixDropPartitions(boolean table) throws RecognitionException {
		HiveParser.alterStatementSuffixDropPartitions_return retval = new HiveParser.alterStatementSuffixDropPartitions_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP321=null;
		Token COMMA324=null;
		Token KW_PURGE326=null;
		ParserRuleReturnScope ifExists322 =null;
		ParserRuleReturnScope dropPartitionSpec323 =null;
		ParserRuleReturnScope dropPartitionSpec325 =null;
		ParserRuleReturnScope replicationClause327 =null;

		ASTNode KW_DROP321_tree=null;
		ASTNode COMMA324_tree=null;
		ASTNode KW_PURGE326_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_PURGE=new RewriteRuleTokenStream(adaptor,"token KW_PURGE");
		RewriteRuleSubtreeStream stream_dropPartitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule dropPartitionSpec");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");
		RewriteRuleSubtreeStream stream_replicationClause=new RewriteRuleSubtreeStream(adaptor,"rule replicationClause");

		 pushMsg("drop partition statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:5: ( KW_DROP ( ifExists )? dropPartitionSpec ( COMMA dropPartitionSpec )* ( KW_PURGE )? ( replicationClause )? -> { table }? ^( TOK_ALTERTABLE_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( KW_PURGE )? ( replicationClause )? ) -> ^( TOK_ALTERVIEW_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( replicationClause )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:7: KW_DROP ( ifExists )? dropPartitionSpec ( COMMA dropPartitionSpec )* ( KW_PURGE )? ( replicationClause )?
			{
			KW_DROP321=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_alterStatementSuffixDropPartitions5953); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP321);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:15: ( ifExists )?
			int alt92=2;
			int LA92_0 = input.LA(1);
			if ( (LA92_0==KW_IF) ) {
				alt92=1;
			}
			switch (alt92) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:15: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_alterStatementSuffixDropPartitions5955);
					ifExists322=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists322.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_dropPartitionSpec_in_alterStatementSuffixDropPartitions5958);
			dropPartitionSpec323=dropPartitionSpec();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_dropPartitionSpec.add(dropPartitionSpec323.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:43: ( COMMA dropPartitionSpec )*
			loop93:
			while (true) {
				int alt93=2;
				int LA93_0 = input.LA(1);
				if ( (LA93_0==COMMA) ) {
					alt93=1;
				}

				switch (alt93) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:44: COMMA dropPartitionSpec
					{
					COMMA324=(Token)match(input,COMMA,FOLLOW_COMMA_in_alterStatementSuffixDropPartitions5961); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA324);

					pushFollow(FOLLOW_dropPartitionSpec_in_alterStatementSuffixDropPartitions5963);
					dropPartitionSpec325=dropPartitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_dropPartitionSpec.add(dropPartitionSpec325.getTree());
					}
					break;

				default :
					break loop93;
				}
			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:70: ( KW_PURGE )?
			int alt94=2;
			int LA94_0 = input.LA(1);
			if ( (LA94_0==KW_PURGE) ) {
				alt94=1;
			}
			switch (alt94) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:70: KW_PURGE
					{
					KW_PURGE326=(Token)match(input,KW_PURGE,FOLLOW_KW_PURGE_in_alterStatementSuffixDropPartitions5967); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_PURGE.add(KW_PURGE326);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:80: ( replicationClause )?
			int alt95=2;
			int LA95_0 = input.LA(1);
			if ( (LA95_0==KW_FOR) ) {
				alt95=1;
			}
			switch (alt95) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1315:80: replicationClause
					{
					pushFollow(FOLLOW_replicationClause_in_alterStatementSuffixDropPartitions5970);
					replicationClause327=replicationClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_replicationClause.add(replicationClause327.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: replicationClause, dropPartitionSpec, dropPartitionSpec, KW_PURGE, ifExists, ifExists, replicationClause
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1316:5: -> { table }? ^( TOK_ALTERTABLE_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( KW_PURGE )? ( replicationClause )? )
			if ( table ) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1316:19: ^( TOK_ALTERTABLE_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( KW_PURGE )? ( replicationClause )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_DROPPARTS, "TOK_ALTERTABLE_DROPPARTS"), root_1);
				if ( !(stream_dropPartitionSpec.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_dropPartitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_dropPartitionSpec.nextTree());
				}
				stream_dropPartitionSpec.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1316:65: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1316:75: ( KW_PURGE )?
				if ( stream_KW_PURGE.hasNext() ) {
					adaptor.addChild(root_1, stream_KW_PURGE.nextNode());
				}
				stream_KW_PURGE.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1316:85: ( replicationClause )?
				if ( stream_replicationClause.hasNext() ) {
					adaptor.addChild(root_1, stream_replicationClause.nextTree());
				}
				stream_replicationClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1317:5: -> ^( TOK_ALTERVIEW_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( replicationClause )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1317:19: ^( TOK_ALTERVIEW_DROPPARTS ( dropPartitionSpec )+ ( ifExists )? ( replicationClause )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERVIEW_DROPPARTS, "TOK_ALTERVIEW_DROPPARTS"), root_1);
				if ( !(stream_dropPartitionSpec.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_dropPartitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_dropPartitionSpec.nextTree());
				}
				stream_dropPartitionSpec.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1317:64: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1317:74: ( replicationClause )?
				if ( stream_replicationClause.hasNext() ) {
					adaptor.addChild(root_1, stream_replicationClause.nextTree());
				}
				stream_replicationClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixDropPartitions"


	public static class alterStatementSuffixProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1320:1: alterStatementSuffixProperties : ( KW_SET KW_TBLPROPERTIES tableProperties -> ^( TOK_ALTERTABLE_PROPERTIES tableProperties ) | KW_UNSET KW_TBLPROPERTIES ( ifExists )? tableProperties -> ^( TOK_ALTERTABLE_DROPPROPERTIES tableProperties ( ifExists )? ) );
	public final HiveParser.alterStatementSuffixProperties_return alterStatementSuffixProperties() throws RecognitionException {
		HiveParser.alterStatementSuffixProperties_return retval = new HiveParser.alterStatementSuffixProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET328=null;
		Token KW_TBLPROPERTIES329=null;
		Token KW_UNSET331=null;
		Token KW_TBLPROPERTIES332=null;
		ParserRuleReturnScope tableProperties330 =null;
		ParserRuleReturnScope ifExists333 =null;
		ParserRuleReturnScope tableProperties334 =null;

		ASTNode KW_SET328_tree=null;
		ASTNode KW_TBLPROPERTIES329_tree=null;
		ASTNode KW_UNSET331_tree=null;
		ASTNode KW_TBLPROPERTIES332_tree=null;
		RewriteRuleTokenStream stream_KW_UNSET=new RewriteRuleTokenStream(adaptor,"token KW_UNSET");
		RewriteRuleTokenStream stream_KW_TBLPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_TBLPROPERTIES");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");

		 pushMsg("alter properties statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1323:5: ( KW_SET KW_TBLPROPERTIES tableProperties -> ^( TOK_ALTERTABLE_PROPERTIES tableProperties ) | KW_UNSET KW_TBLPROPERTIES ( ifExists )? tableProperties -> ^( TOK_ALTERTABLE_DROPPROPERTIES tableProperties ( ifExists )? ) )
			int alt97=2;
			int LA97_0 = input.LA(1);
			if ( (LA97_0==KW_SET) ) {
				alt97=1;
			}
			else if ( (LA97_0==KW_UNSET) ) {
				alt97=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 97, 0, input);
				throw nvae;
			}

			switch (alt97) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1323:7: KW_SET KW_TBLPROPERTIES tableProperties
					{
					KW_SET328=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixProperties6052); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET328);

					KW_TBLPROPERTIES329=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_alterStatementSuffixProperties6054); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TBLPROPERTIES.add(KW_TBLPROPERTIES329);

					pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixProperties6056);
					tableProperties330=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties330.getTree());
					// AST REWRITE
					// elements: tableProperties
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1324:5: -> ^( TOK_ALTERTABLE_PROPERTIES tableProperties )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1324:8: ^( TOK_ALTERTABLE_PROPERTIES tableProperties )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_PROPERTIES, "TOK_ALTERTABLE_PROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableProperties.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1325:7: KW_UNSET KW_TBLPROPERTIES ( ifExists )? tableProperties
					{
					KW_UNSET331=(Token)match(input,KW_UNSET,FOLLOW_KW_UNSET_in_alterStatementSuffixProperties6076); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_UNSET.add(KW_UNSET331);

					KW_TBLPROPERTIES332=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_alterStatementSuffixProperties6078); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TBLPROPERTIES.add(KW_TBLPROPERTIES332);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1325:33: ( ifExists )?
					int alt96=2;
					int LA96_0 = input.LA(1);
					if ( (LA96_0==KW_IF) ) {
						alt96=1;
					}
					switch (alt96) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1325:33: ifExists
							{
							pushFollow(FOLLOW_ifExists_in_alterStatementSuffixProperties6080);
							ifExists333=ifExists();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_ifExists.add(ifExists333.getTree());
							}
							break;

					}

					pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixProperties6083);
					tableProperties334=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties334.getTree());
					// AST REWRITE
					// elements: ifExists, tableProperties
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1326:5: -> ^( TOK_ALTERTABLE_DROPPROPERTIES tableProperties ( ifExists )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1326:8: ^( TOK_ALTERTABLE_DROPPROPERTIES tableProperties ( ifExists )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_DROPPROPERTIES, "TOK_ALTERTABLE_DROPPROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableProperties.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1326:56: ( ifExists )?
						if ( stream_ifExists.hasNext() ) {
							adaptor.addChild(root_1, stream_ifExists.nextTree());
						}
						stream_ifExists.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixProperties"


	public static class alterViewSuffixProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterViewSuffixProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1329:1: alterViewSuffixProperties : ( KW_SET KW_TBLPROPERTIES tableProperties -> ^( TOK_ALTERVIEW_PROPERTIES tableProperties ) | KW_UNSET KW_TBLPROPERTIES ( ifExists )? tableProperties -> ^( TOK_ALTERVIEW_DROPPROPERTIES tableProperties ( ifExists )? ) );
	public final HiveParser.alterViewSuffixProperties_return alterViewSuffixProperties() throws RecognitionException {
		HiveParser.alterViewSuffixProperties_return retval = new HiveParser.alterViewSuffixProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET335=null;
		Token KW_TBLPROPERTIES336=null;
		Token KW_UNSET338=null;
		Token KW_TBLPROPERTIES339=null;
		ParserRuleReturnScope tableProperties337 =null;
		ParserRuleReturnScope ifExists340 =null;
		ParserRuleReturnScope tableProperties341 =null;

		ASTNode KW_SET335_tree=null;
		ASTNode KW_TBLPROPERTIES336_tree=null;
		ASTNode KW_UNSET338_tree=null;
		ASTNode KW_TBLPROPERTIES339_tree=null;
		RewriteRuleTokenStream stream_KW_UNSET=new RewriteRuleTokenStream(adaptor,"token KW_UNSET");
		RewriteRuleTokenStream stream_KW_TBLPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_TBLPROPERTIES");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");

		 pushMsg("alter view properties statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1332:5: ( KW_SET KW_TBLPROPERTIES tableProperties -> ^( TOK_ALTERVIEW_PROPERTIES tableProperties ) | KW_UNSET KW_TBLPROPERTIES ( ifExists )? tableProperties -> ^( TOK_ALTERVIEW_DROPPROPERTIES tableProperties ( ifExists )? ) )
			int alt99=2;
			int LA99_0 = input.LA(1);
			if ( (LA99_0==KW_SET) ) {
				alt99=1;
			}
			else if ( (LA99_0==KW_UNSET) ) {
				alt99=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 99, 0, input);
				throw nvae;
			}

			switch (alt99) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1332:7: KW_SET KW_TBLPROPERTIES tableProperties
					{
					KW_SET335=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterViewSuffixProperties6125); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET335);

					KW_TBLPROPERTIES336=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_alterViewSuffixProperties6127); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TBLPROPERTIES.add(KW_TBLPROPERTIES336);

					pushFollow(FOLLOW_tableProperties_in_alterViewSuffixProperties6129);
					tableProperties337=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties337.getTree());
					// AST REWRITE
					// elements: tableProperties
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1333:5: -> ^( TOK_ALTERVIEW_PROPERTIES tableProperties )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1333:8: ^( TOK_ALTERVIEW_PROPERTIES tableProperties )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERVIEW_PROPERTIES, "TOK_ALTERVIEW_PROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableProperties.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1334:7: KW_UNSET KW_TBLPROPERTIES ( ifExists )? tableProperties
					{
					KW_UNSET338=(Token)match(input,KW_UNSET,FOLLOW_KW_UNSET_in_alterViewSuffixProperties6149); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_UNSET.add(KW_UNSET338);

					KW_TBLPROPERTIES339=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_alterViewSuffixProperties6151); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TBLPROPERTIES.add(KW_TBLPROPERTIES339);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1334:33: ( ifExists )?
					int alt98=2;
					int LA98_0 = input.LA(1);
					if ( (LA98_0==KW_IF) ) {
						alt98=1;
					}
					switch (alt98) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1334:33: ifExists
							{
							pushFollow(FOLLOW_ifExists_in_alterViewSuffixProperties6153);
							ifExists340=ifExists();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_ifExists.add(ifExists340.getTree());
							}
							break;

					}

					pushFollow(FOLLOW_tableProperties_in_alterViewSuffixProperties6156);
					tableProperties341=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties341.getTree());
					// AST REWRITE
					// elements: ifExists, tableProperties
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1335:5: -> ^( TOK_ALTERVIEW_DROPPROPERTIES tableProperties ( ifExists )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1335:8: ^( TOK_ALTERVIEW_DROPPROPERTIES tableProperties ( ifExists )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERVIEW_DROPPROPERTIES, "TOK_ALTERVIEW_DROPPROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableProperties.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1335:55: ( ifExists )?
						if ( stream_ifExists.hasNext() ) {
							adaptor.addChild(root_1, stream_ifExists.nextTree());
						}
						stream_ifExists.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterViewSuffixProperties"


	public static class alterStatementSuffixSerdeProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixSerdeProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1338:1: alterStatementSuffixSerdeProperties : ( KW_SET KW_SERDE serdeName= StringLiteral ( KW_WITH KW_SERDEPROPERTIES tableProperties )? -> ^( TOK_ALTERTABLE_SERIALIZER $serdeName ( tableProperties )? ) | KW_SET KW_SERDEPROPERTIES tableProperties -> ^( TOK_ALTERTABLE_SERDEPROPERTIES tableProperties ) );
	public final HiveParser.alterStatementSuffixSerdeProperties_return alterStatementSuffixSerdeProperties() throws RecognitionException {
		HiveParser.alterStatementSuffixSerdeProperties_return retval = new HiveParser.alterStatementSuffixSerdeProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token serdeName=null;
		Token KW_SET342=null;
		Token KW_SERDE343=null;
		Token KW_WITH344=null;
		Token KW_SERDEPROPERTIES345=null;
		Token KW_SET347=null;
		Token KW_SERDEPROPERTIES348=null;
		ParserRuleReturnScope tableProperties346 =null;
		ParserRuleReturnScope tableProperties349 =null;

		ASTNode serdeName_tree=null;
		ASTNode KW_SET342_tree=null;
		ASTNode KW_SERDE343_tree=null;
		ASTNode KW_WITH344_tree=null;
		ASTNode KW_SERDEPROPERTIES345_tree=null;
		ASTNode KW_SET347_tree=null;
		ASTNode KW_SERDEPROPERTIES348_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_SERDEPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_SERDEPROPERTIES");
		RewriteRuleTokenStream stream_KW_SERDE=new RewriteRuleTokenStream(adaptor,"token KW_SERDE");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 pushMsg("alter serdes statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1341:5: ( KW_SET KW_SERDE serdeName= StringLiteral ( KW_WITH KW_SERDEPROPERTIES tableProperties )? -> ^( TOK_ALTERTABLE_SERIALIZER $serdeName ( tableProperties )? ) | KW_SET KW_SERDEPROPERTIES tableProperties -> ^( TOK_ALTERTABLE_SERDEPROPERTIES tableProperties ) )
			int alt101=2;
			int LA101_0 = input.LA(1);
			if ( (LA101_0==KW_SET) ) {
				int LA101_1 = input.LA(2);
				if ( (LA101_1==KW_SERDE) ) {
					alt101=1;
				}
				else if ( (LA101_1==KW_SERDEPROPERTIES) ) {
					alt101=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 101, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 101, 0, input);
				throw nvae;
			}

			switch (alt101) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1341:7: KW_SET KW_SERDE serdeName= StringLiteral ( KW_WITH KW_SERDEPROPERTIES tableProperties )?
					{
					KW_SET342=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixSerdeProperties6198); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET342);

					KW_SERDE343=(Token)match(input,KW_SERDE,FOLLOW_KW_SERDE_in_alterStatementSuffixSerdeProperties6200); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SERDE.add(KW_SERDE343);

					serdeName=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_alterStatementSuffixSerdeProperties6204); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(serdeName);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1341:47: ( KW_WITH KW_SERDEPROPERTIES tableProperties )?
					int alt100=2;
					int LA100_0 = input.LA(1);
					if ( (LA100_0==KW_WITH) ) {
						alt100=1;
					}
					switch (alt100) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1341:48: KW_WITH KW_SERDEPROPERTIES tableProperties
							{
							KW_WITH344=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_alterStatementSuffixSerdeProperties6207); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH344);

							KW_SERDEPROPERTIES345=(Token)match(input,KW_SERDEPROPERTIES,FOLLOW_KW_SERDEPROPERTIES_in_alterStatementSuffixSerdeProperties6209); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SERDEPROPERTIES.add(KW_SERDEPROPERTIES345);

							pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixSerdeProperties6211);
							tableProperties346=tableProperties();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties346.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: serdeName, tableProperties
					// token labels: serdeName
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_serdeName=new RewriteRuleTokenStream(adaptor,"token serdeName",serdeName);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1342:5: -> ^( TOK_ALTERTABLE_SERIALIZER $serdeName ( tableProperties )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1342:8: ^( TOK_ALTERTABLE_SERIALIZER $serdeName ( tableProperties )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_SERIALIZER, "TOK_ALTERTABLE_SERIALIZER"), root_1);
						adaptor.addChild(root_1, stream_serdeName.nextNode());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1342:47: ( tableProperties )?
						if ( stream_tableProperties.hasNext() ) {
							adaptor.addChild(root_1, stream_tableProperties.nextTree());
						}
						stream_tableProperties.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1343:7: KW_SET KW_SERDEPROPERTIES tableProperties
					{
					KW_SET347=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixSerdeProperties6237); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET347);

					KW_SERDEPROPERTIES348=(Token)match(input,KW_SERDEPROPERTIES,FOLLOW_KW_SERDEPROPERTIES_in_alterStatementSuffixSerdeProperties6239); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SERDEPROPERTIES.add(KW_SERDEPROPERTIES348);

					pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixSerdeProperties6241);
					tableProperties349=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties349.getTree());
					// AST REWRITE
					// elements: tableProperties
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1344:5: -> ^( TOK_ALTERTABLE_SERDEPROPERTIES tableProperties )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1344:8: ^( TOK_ALTERTABLE_SERDEPROPERTIES tableProperties )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_SERDEPROPERTIES, "TOK_ALTERTABLE_SERDEPROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableProperties.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixSerdeProperties"


	public static class tablePartitionPrefix_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tablePartitionPrefix"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1347:1: tablePartitionPrefix : tableName ( partitionSpec )? -> ^( TOK_TABLE_PARTITION tableName ( partitionSpec )? ) ;
	public final HiveParser.tablePartitionPrefix_return tablePartitionPrefix() throws RecognitionException {
		HiveParser.tablePartitionPrefix_return retval = new HiveParser.tablePartitionPrefix_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope tableName350 =null;
		ParserRuleReturnScope partitionSpec351 =null;

		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		pushMsg("table partition prefix", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1350:3: ( tableName ( partitionSpec )? -> ^( TOK_TABLE_PARTITION tableName ( partitionSpec )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1350:5: tableName ( partitionSpec )?
			{
			pushFollow(FOLLOW_tableName_in_tablePartitionPrefix6278);
			tableName350=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName350.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1350:15: ( partitionSpec )?
			int alt102=2;
			int LA102_0 = input.LA(1);
			if ( (LA102_0==KW_PARTITION) ) {
				alt102=1;
			}
			switch (alt102) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1350:15: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_tablePartitionPrefix6280);
					partitionSpec351=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec351.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tableName, partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1351:3: -> ^( TOK_TABLE_PARTITION tableName ( partitionSpec )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1351:5: ^( TOK_TABLE_PARTITION tableName ( partitionSpec )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLE_PARTITION, "TOK_TABLE_PARTITION"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1351:37: ( partitionSpec )?
				if ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tablePartitionPrefix"


	public static class alterStatementSuffixFileFormat_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixFileFormat"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1354:1: alterStatementSuffixFileFormat : KW_SET KW_FILEFORMAT fileFormat -> ^( TOK_ALTERTABLE_FILEFORMAT fileFormat ) ;
	public final HiveParser.alterStatementSuffixFileFormat_return alterStatementSuffixFileFormat() throws RecognitionException {
		HiveParser.alterStatementSuffixFileFormat_return retval = new HiveParser.alterStatementSuffixFileFormat_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET352=null;
		Token KW_FILEFORMAT353=null;
		ParserRuleReturnScope fileFormat354 =null;

		ASTNode KW_SET352_tree=null;
		ASTNode KW_FILEFORMAT353_tree=null;
		RewriteRuleTokenStream stream_KW_FILEFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_FILEFORMAT");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_fileFormat=new RewriteRuleSubtreeStream(adaptor,"rule fileFormat");

		pushMsg("alter fileformat statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1357:2: ( KW_SET KW_FILEFORMAT fileFormat -> ^( TOK_ALTERTABLE_FILEFORMAT fileFormat ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1357:4: KW_SET KW_FILEFORMAT fileFormat
			{
			KW_SET352=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixFileFormat6315); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET352);

			KW_FILEFORMAT353=(Token)match(input,KW_FILEFORMAT,FOLLOW_KW_FILEFORMAT_in_alterStatementSuffixFileFormat6317); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FILEFORMAT.add(KW_FILEFORMAT353);

			pushFollow(FOLLOW_fileFormat_in_alterStatementSuffixFileFormat6319);
			fileFormat354=fileFormat();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_fileFormat.add(fileFormat354.getTree());
			// AST REWRITE
			// elements: fileFormat
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1358:2: -> ^( TOK_ALTERTABLE_FILEFORMAT fileFormat )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1358:5: ^( TOK_ALTERTABLE_FILEFORMAT fileFormat )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_FILEFORMAT, "TOK_ALTERTABLE_FILEFORMAT"), root_1);
				adaptor.addChild(root_1, stream_fileFormat.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixFileFormat"


	public static class alterStatementSuffixClusterbySortby_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixClusterbySortby"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1361:1: alterStatementSuffixClusterbySortby : ( KW_NOT KW_CLUSTERED -> ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_CLUSTERED ) | KW_NOT KW_SORTED -> ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_SORTED ) | tableBuckets -> ^( TOK_ALTERTABLE_CLUSTER_SORT tableBuckets ) );
	public final HiveParser.alterStatementSuffixClusterbySortby_return alterStatementSuffixClusterbySortby() throws RecognitionException {
		HiveParser.alterStatementSuffixClusterbySortby_return retval = new HiveParser.alterStatementSuffixClusterbySortby_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_NOT355=null;
		Token KW_CLUSTERED356=null;
		Token KW_NOT357=null;
		Token KW_SORTED358=null;
		ParserRuleReturnScope tableBuckets359 =null;

		ASTNode KW_NOT355_tree=null;
		ASTNode KW_CLUSTERED356_tree=null;
		ASTNode KW_NOT357_tree=null;
		ASTNode KW_SORTED358_tree=null;
		RewriteRuleTokenStream stream_KW_NOT=new RewriteRuleTokenStream(adaptor,"token KW_NOT");
		RewriteRuleTokenStream stream_KW_SORTED=new RewriteRuleTokenStream(adaptor,"token KW_SORTED");
		RewriteRuleTokenStream stream_KW_CLUSTERED=new RewriteRuleTokenStream(adaptor,"token KW_CLUSTERED");
		RewriteRuleSubtreeStream stream_tableBuckets=new RewriteRuleSubtreeStream(adaptor,"rule tableBuckets");

		pushMsg("alter partition cluster by sort by statement", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1364:3: ( KW_NOT KW_CLUSTERED -> ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_CLUSTERED ) | KW_NOT KW_SORTED -> ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_SORTED ) | tableBuckets -> ^( TOK_ALTERTABLE_CLUSTER_SORT tableBuckets ) )
			int alt103=3;
			int LA103_0 = input.LA(1);
			if ( (LA103_0==KW_NOT) ) {
				int LA103_1 = input.LA(2);
				if ( (LA103_1==KW_CLUSTERED) ) {
					alt103=1;
				}
				else if ( (LA103_1==KW_SORTED) ) {
					alt103=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 103, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}
			else if ( (LA103_0==KW_CLUSTERED) ) {
				alt103=3;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 103, 0, input);
				throw nvae;
			}

			switch (alt103) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1364:5: KW_NOT KW_CLUSTERED
					{
					KW_NOT355=(Token)match(input,KW_NOT,FOLLOW_KW_NOT_in_alterStatementSuffixClusterbySortby6350); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NOT.add(KW_NOT355);

					KW_CLUSTERED356=(Token)match(input,KW_CLUSTERED,FOLLOW_KW_CLUSTERED_in_alterStatementSuffixClusterbySortby6352); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CLUSTERED.add(KW_CLUSTERED356);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1364:25: -> ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_CLUSTERED )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1364:28: ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_CLUSTERED )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_CLUSTER_SORT, "TOK_ALTERTABLE_CLUSTER_SORT"), root_1);
						adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_NOT_CLUSTERED, "TOK_NOT_CLUSTERED"));
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1365:5: KW_NOT KW_SORTED
					{
					KW_NOT357=(Token)match(input,KW_NOT,FOLLOW_KW_NOT_in_alterStatementSuffixClusterbySortby6366); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NOT.add(KW_NOT357);

					KW_SORTED358=(Token)match(input,KW_SORTED,FOLLOW_KW_SORTED_in_alterStatementSuffixClusterbySortby6368); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SORTED.add(KW_SORTED358);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1365:22: -> ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_SORTED )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1365:25: ^( TOK_ALTERTABLE_CLUSTER_SORT TOK_NOT_SORTED )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_CLUSTER_SORT, "TOK_ALTERTABLE_CLUSTER_SORT"), root_1);
						adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_NOT_SORTED, "TOK_NOT_SORTED"));
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1366:5: tableBuckets
					{
					pushFollow(FOLLOW_tableBuckets_in_alterStatementSuffixClusterbySortby6382);
					tableBuckets359=tableBuckets();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableBuckets.add(tableBuckets359.getTree());
					// AST REWRITE
					// elements: tableBuckets
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1366:18: -> ^( TOK_ALTERTABLE_CLUSTER_SORT tableBuckets )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1366:21: ^( TOK_ALTERTABLE_CLUSTER_SORT tableBuckets )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_CLUSTER_SORT, "TOK_ALTERTABLE_CLUSTER_SORT"), root_1);
						adaptor.addChild(root_1, stream_tableBuckets.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixClusterbySortby"


	public static class alterTblPartitionStatementSuffixSkewedLocation_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterTblPartitionStatementSuffixSkewedLocation"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1369:1: alterTblPartitionStatementSuffixSkewedLocation : KW_SET KW_SKEWED KW_LOCATION skewedLocations -> ^( TOK_ALTERTABLE_SKEWED_LOCATION skewedLocations ) ;
	public final HiveParser.alterTblPartitionStatementSuffixSkewedLocation_return alterTblPartitionStatementSuffixSkewedLocation() throws RecognitionException {
		HiveParser.alterTblPartitionStatementSuffixSkewedLocation_return retval = new HiveParser.alterTblPartitionStatementSuffixSkewedLocation_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET360=null;
		Token KW_SKEWED361=null;
		Token KW_LOCATION362=null;
		ParserRuleReturnScope skewedLocations363 =null;

		ASTNode KW_SET360_tree=null;
		ASTNode KW_SKEWED361_tree=null;
		ASTNode KW_LOCATION362_tree=null;
		RewriteRuleTokenStream stream_KW_LOCATION=new RewriteRuleTokenStream(adaptor,"token KW_LOCATION");
		RewriteRuleTokenStream stream_KW_SKEWED=new RewriteRuleTokenStream(adaptor,"token KW_SKEWED");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_skewedLocations=new RewriteRuleSubtreeStream(adaptor,"rule skewedLocations");

		pushMsg("alter partition skewed location", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1372:3: ( KW_SET KW_SKEWED KW_LOCATION skewedLocations -> ^( TOK_ALTERTABLE_SKEWED_LOCATION skewedLocations ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1372:5: KW_SET KW_SKEWED KW_LOCATION skewedLocations
			{
			KW_SET360=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterTblPartitionStatementSuffixSkewedLocation6413); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET360);

			KW_SKEWED361=(Token)match(input,KW_SKEWED,FOLLOW_KW_SKEWED_in_alterTblPartitionStatementSuffixSkewedLocation6415); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SKEWED.add(KW_SKEWED361);

			KW_LOCATION362=(Token)match(input,KW_LOCATION,FOLLOW_KW_LOCATION_in_alterTblPartitionStatementSuffixSkewedLocation6417); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCATION.add(KW_LOCATION362);

			pushFollow(FOLLOW_skewedLocations_in_alterTblPartitionStatementSuffixSkewedLocation6419);
			skewedLocations363=skewedLocations();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedLocations.add(skewedLocations363.getTree());
			// AST REWRITE
			// elements: skewedLocations
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1373:3: -> ^( TOK_ALTERTABLE_SKEWED_LOCATION skewedLocations )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1373:6: ^( TOK_ALTERTABLE_SKEWED_LOCATION skewedLocations )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_SKEWED_LOCATION, "TOK_ALTERTABLE_SKEWED_LOCATION"), root_1);
				adaptor.addChild(root_1, stream_skewedLocations.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterTblPartitionStatementSuffixSkewedLocation"


	public static class skewedLocations_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedLocations"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1376:1: skewedLocations : LPAREN skewedLocationsList RPAREN -> ^( TOK_SKEWED_LOCATIONS skewedLocationsList ) ;
	public final HiveParser.skewedLocations_return skewedLocations() throws RecognitionException {
		HiveParser.skewedLocations_return retval = new HiveParser.skewedLocations_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN364=null;
		Token RPAREN366=null;
		ParserRuleReturnScope skewedLocationsList365 =null;

		ASTNode LPAREN364_tree=null;
		ASTNode RPAREN366_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_skewedLocationsList=new RewriteRuleSubtreeStream(adaptor,"rule skewedLocationsList");

		 pushMsg("skewed locations", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1379:5: ( LPAREN skewedLocationsList RPAREN -> ^( TOK_SKEWED_LOCATIONS skewedLocationsList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1380:7: LPAREN skewedLocationsList RPAREN
			{
			LPAREN364=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_skewedLocations6462); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN364);

			pushFollow(FOLLOW_skewedLocationsList_in_skewedLocations6464);
			skewedLocationsList365=skewedLocationsList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedLocationsList.add(skewedLocationsList365.getTree());
			RPAREN366=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_skewedLocations6466); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN366);

			// AST REWRITE
			// elements: skewedLocationsList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1380:41: -> ^( TOK_SKEWED_LOCATIONS skewedLocationsList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1380:44: ^( TOK_SKEWED_LOCATIONS skewedLocationsList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SKEWED_LOCATIONS, "TOK_SKEWED_LOCATIONS"), root_1);
				adaptor.addChild(root_1, stream_skewedLocationsList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedLocations"


	public static class skewedLocationsList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedLocationsList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1383:1: skewedLocationsList : skewedLocationMap ( COMMA skewedLocationMap )* -> ^( TOK_SKEWED_LOCATION_LIST ( skewedLocationMap )+ ) ;
	public final HiveParser.skewedLocationsList_return skewedLocationsList() throws RecognitionException {
		HiveParser.skewedLocationsList_return retval = new HiveParser.skewedLocationsList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA368=null;
		ParserRuleReturnScope skewedLocationMap367 =null;
		ParserRuleReturnScope skewedLocationMap369 =null;

		ASTNode COMMA368_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_skewedLocationMap=new RewriteRuleSubtreeStream(adaptor,"rule skewedLocationMap");

		 pushMsg("skewed locations list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1386:5: ( skewedLocationMap ( COMMA skewedLocationMap )* -> ^( TOK_SKEWED_LOCATION_LIST ( skewedLocationMap )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1387:7: skewedLocationMap ( COMMA skewedLocationMap )*
			{
			pushFollow(FOLLOW_skewedLocationMap_in_skewedLocationsList6507);
			skewedLocationMap367=skewedLocationMap();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedLocationMap.add(skewedLocationMap367.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1387:25: ( COMMA skewedLocationMap )*
			loop104:
			while (true) {
				int alt104=2;
				int LA104_0 = input.LA(1);
				if ( (LA104_0==COMMA) ) {
					alt104=1;
				}

				switch (alt104) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1387:26: COMMA skewedLocationMap
					{
					COMMA368=(Token)match(input,COMMA,FOLLOW_COMMA_in_skewedLocationsList6510); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA368);

					pushFollow(FOLLOW_skewedLocationMap_in_skewedLocationsList6512);
					skewedLocationMap369=skewedLocationMap();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_skewedLocationMap.add(skewedLocationMap369.getTree());
					}
					break;

				default :
					break loop104;
				}
			}

			// AST REWRITE
			// elements: skewedLocationMap
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1387:52: -> ^( TOK_SKEWED_LOCATION_LIST ( skewedLocationMap )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1387:55: ^( TOK_SKEWED_LOCATION_LIST ( skewedLocationMap )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SKEWED_LOCATION_LIST, "TOK_SKEWED_LOCATION_LIST"), root_1);
				if ( !(stream_skewedLocationMap.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_skewedLocationMap.hasNext() ) {
					adaptor.addChild(root_1, stream_skewedLocationMap.nextTree());
				}
				stream_skewedLocationMap.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedLocationsList"


	public static class skewedLocationMap_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedLocationMap"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1390:1: skewedLocationMap : key= skewedValueLocationElement EQUAL value= StringLiteral -> ^( TOK_SKEWED_LOCATION_MAP $key $value) ;
	public final HiveParser.skewedLocationMap_return skewedLocationMap() throws RecognitionException {
		HiveParser.skewedLocationMap_return retval = new HiveParser.skewedLocationMap_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token value=null;
		Token EQUAL370=null;
		ParserRuleReturnScope key =null;

		ASTNode value_tree=null;
		ASTNode EQUAL370_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_EQUAL=new RewriteRuleTokenStream(adaptor,"token EQUAL");
		RewriteRuleSubtreeStream stream_skewedValueLocationElement=new RewriteRuleSubtreeStream(adaptor,"rule skewedValueLocationElement");

		 pushMsg("specifying skewed location map", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1393:5: (key= skewedValueLocationElement EQUAL value= StringLiteral -> ^( TOK_SKEWED_LOCATION_MAP $key $value) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1394:7: key= skewedValueLocationElement EQUAL value= StringLiteral
			{
			pushFollow(FOLLOW_skewedValueLocationElement_in_skewedLocationMap6558);
			key=skewedValueLocationElement();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedValueLocationElement.add(key.getTree());
			EQUAL370=(Token)match(input,EQUAL,FOLLOW_EQUAL_in_skewedLocationMap6560); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_EQUAL.add(EQUAL370);

			value=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_skewedLocationMap6564); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(value);

			// AST REWRITE
			// elements: value, key
			// token labels: value
			// rule labels: key, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_value=new RewriteRuleTokenStream(adaptor,"token value",value);
			RewriteRuleSubtreeStream stream_key=new RewriteRuleSubtreeStream(adaptor,"rule key",key!=null?key.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1394:64: -> ^( TOK_SKEWED_LOCATION_MAP $key $value)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1394:67: ^( TOK_SKEWED_LOCATION_MAP $key $value)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SKEWED_LOCATION_MAP, "TOK_SKEWED_LOCATION_MAP"), root_1);
				adaptor.addChild(root_1, stream_key.nextTree());
				adaptor.addChild(root_1, stream_value.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedLocationMap"


	public static class alterStatementSuffixLocation_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixLocation"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1397:1: alterStatementSuffixLocation : KW_SET KW_LOCATION newLoc= StringLiteral -> ^( TOK_ALTERTABLE_LOCATION $newLoc) ;
	public final HiveParser.alterStatementSuffixLocation_return alterStatementSuffixLocation() throws RecognitionException {
		HiveParser.alterStatementSuffixLocation_return retval = new HiveParser.alterStatementSuffixLocation_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token newLoc=null;
		Token KW_SET371=null;
		Token KW_LOCATION372=null;

		ASTNode newLoc_tree=null;
		ASTNode KW_SET371_tree=null;
		ASTNode KW_LOCATION372_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_LOCATION=new RewriteRuleTokenStream(adaptor,"token KW_LOCATION");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");

		pushMsg("alter location", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1400:3: ( KW_SET KW_LOCATION newLoc= StringLiteral -> ^( TOK_ALTERTABLE_LOCATION $newLoc) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1400:5: KW_SET KW_LOCATION newLoc= StringLiteral
			{
			KW_SET371=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixLocation6601); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET371);

			KW_LOCATION372=(Token)match(input,KW_LOCATION,FOLLOW_KW_LOCATION_in_alterStatementSuffixLocation6603); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCATION.add(KW_LOCATION372);

			newLoc=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_alterStatementSuffixLocation6607); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(newLoc);

			// AST REWRITE
			// elements: newLoc
			// token labels: newLoc
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_newLoc=new RewriteRuleTokenStream(adaptor,"token newLoc",newLoc);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1401:3: -> ^( TOK_ALTERTABLE_LOCATION $newLoc)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1401:6: ^( TOK_ALTERTABLE_LOCATION $newLoc)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_LOCATION, "TOK_ALTERTABLE_LOCATION"), root_1);
				adaptor.addChild(root_1, stream_newLoc.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixLocation"


	public static class alterStatementSuffixSkewedby_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixSkewedby"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1405:1: alterStatementSuffixSkewedby : ( tableSkewed -> ^( TOK_ALTERTABLE_SKEWED tableSkewed ) | KW_NOT KW_SKEWED -> ^( TOK_ALTERTABLE_SKEWED ) | KW_NOT storedAsDirs -> ^( TOK_ALTERTABLE_SKEWED storedAsDirs ) );
	public final HiveParser.alterStatementSuffixSkewedby_return alterStatementSuffixSkewedby() throws RecognitionException {
		HiveParser.alterStatementSuffixSkewedby_return retval = new HiveParser.alterStatementSuffixSkewedby_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_NOT374=null;
		Token KW_SKEWED375=null;
		Token KW_NOT376=null;
		ParserRuleReturnScope tableSkewed373 =null;
		ParserRuleReturnScope storedAsDirs377 =null;

		ASTNode KW_NOT374_tree=null;
		ASTNode KW_SKEWED375_tree=null;
		ASTNode KW_NOT376_tree=null;
		RewriteRuleTokenStream stream_KW_NOT=new RewriteRuleTokenStream(adaptor,"token KW_NOT");
		RewriteRuleTokenStream stream_KW_SKEWED=new RewriteRuleTokenStream(adaptor,"token KW_SKEWED");
		RewriteRuleSubtreeStream stream_tableSkewed=new RewriteRuleSubtreeStream(adaptor,"rule tableSkewed");
		RewriteRuleSubtreeStream stream_storedAsDirs=new RewriteRuleSubtreeStream(adaptor,"rule storedAsDirs");

		pushMsg("alter skewed by statement", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1408:2: ( tableSkewed -> ^( TOK_ALTERTABLE_SKEWED tableSkewed ) | KW_NOT KW_SKEWED -> ^( TOK_ALTERTABLE_SKEWED ) | KW_NOT storedAsDirs -> ^( TOK_ALTERTABLE_SKEWED storedAsDirs ) )
			int alt105=3;
			int LA105_0 = input.LA(1);
			if ( (LA105_0==KW_SKEWED) ) {
				alt105=1;
			}
			else if ( (LA105_0==KW_NOT) ) {
				int LA105_2 = input.LA(2);
				if ( (LA105_2==KW_SKEWED) ) {
					alt105=2;
				}
				else if ( (LA105_2==KW_STORED) ) {
					alt105=3;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 105, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 105, 0, input);
				throw nvae;
			}

			switch (alt105) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1408:4: tableSkewed
					{
					pushFollow(FOLLOW_tableSkewed_in_alterStatementSuffixSkewedby6641);
					tableSkewed373=tableSkewed();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableSkewed.add(tableSkewed373.getTree());
					// AST REWRITE
					// elements: tableSkewed
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1409:2: -> ^( TOK_ALTERTABLE_SKEWED tableSkewed )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1409:4: ^( TOK_ALTERTABLE_SKEWED tableSkewed )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_SKEWED, "TOK_ALTERTABLE_SKEWED"), root_1);
						adaptor.addChild(root_1, stream_tableSkewed.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1411:3: KW_NOT KW_SKEWED
					{
					KW_NOT374=(Token)match(input,KW_NOT,FOLLOW_KW_NOT_in_alterStatementSuffixSkewedby6656); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NOT.add(KW_NOT374);

					KW_SKEWED375=(Token)match(input,KW_SKEWED,FOLLOW_KW_SKEWED_in_alterStatementSuffixSkewedby6658); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SKEWED.add(KW_SKEWED375);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1412:2: -> ^( TOK_ALTERTABLE_SKEWED )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1412:4: ^( TOK_ALTERTABLE_SKEWED )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_SKEWED, "TOK_ALTERTABLE_SKEWED"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1414:3: KW_NOT storedAsDirs
					{
					KW_NOT376=(Token)match(input,KW_NOT,FOLLOW_KW_NOT_in_alterStatementSuffixSkewedby6671); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NOT.add(KW_NOT376);

					pushFollow(FOLLOW_storedAsDirs_in_alterStatementSuffixSkewedby6673);
					storedAsDirs377=storedAsDirs();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_storedAsDirs.add(storedAsDirs377.getTree());
					// AST REWRITE
					// elements: storedAsDirs
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1415:2: -> ^( TOK_ALTERTABLE_SKEWED storedAsDirs )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1415:4: ^( TOK_ALTERTABLE_SKEWED storedAsDirs )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_SKEWED, "TOK_ALTERTABLE_SKEWED"), root_1);
						adaptor.addChild(root_1, stream_storedAsDirs.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixSkewedby"


	public static class alterStatementSuffixExchangePartition_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixExchangePartition"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1418:1: alterStatementSuffixExchangePartition : KW_EXCHANGE partitionSpec KW_WITH KW_TABLE exchangename= tableName -> ^( TOK_ALTERTABLE_EXCHANGEPARTITION partitionSpec $exchangename) ;
	public final HiveParser.alterStatementSuffixExchangePartition_return alterStatementSuffixExchangePartition() throws RecognitionException {
		HiveParser.alterStatementSuffixExchangePartition_return retval = new HiveParser.alterStatementSuffixExchangePartition_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_EXCHANGE378=null;
		Token KW_WITH380=null;
		Token KW_TABLE381=null;
		ParserRuleReturnScope exchangename =null;
		ParserRuleReturnScope partitionSpec379 =null;

		ASTNode KW_EXCHANGE378_tree=null;
		ASTNode KW_WITH380_tree=null;
		ASTNode KW_TABLE381_tree=null;
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_EXCHANGE=new RewriteRuleTokenStream(adaptor,"token KW_EXCHANGE");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		pushMsg("alter exchange partition", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1421:5: ( KW_EXCHANGE partitionSpec KW_WITH KW_TABLE exchangename= tableName -> ^( TOK_ALTERTABLE_EXCHANGEPARTITION partitionSpec $exchangename) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1421:7: KW_EXCHANGE partitionSpec KW_WITH KW_TABLE exchangename= tableName
			{
			KW_EXCHANGE378=(Token)match(input,KW_EXCHANGE,FOLLOW_KW_EXCHANGE_in_alterStatementSuffixExchangePartition6704); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_EXCHANGE.add(KW_EXCHANGE378);

			pushFollow(FOLLOW_partitionSpec_in_alterStatementSuffixExchangePartition6706);
			partitionSpec379=partitionSpec();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec379.getTree());
			KW_WITH380=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_alterStatementSuffixExchangePartition6708); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH380);

			KW_TABLE381=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_alterStatementSuffixExchangePartition6710); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE381);

			pushFollow(FOLLOW_tableName_in_alterStatementSuffixExchangePartition6714);
			exchangename=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(exchangename.getTree());
			// AST REWRITE
			// elements: partitionSpec, exchangename
			// token labels: 
			// rule labels: exchangename, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_exchangename=new RewriteRuleSubtreeStream(adaptor,"rule exchangename",exchangename!=null?exchangename.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1422:5: -> ^( TOK_ALTERTABLE_EXCHANGEPARTITION partitionSpec $exchangename)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1422:8: ^( TOK_ALTERTABLE_EXCHANGEPARTITION partitionSpec $exchangename)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_EXCHANGEPARTITION, "TOK_ALTERTABLE_EXCHANGEPARTITION"), root_1);
				adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				adaptor.addChild(root_1, stream_exchangename.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixExchangePartition"


	public static class alterStatementSuffixRenamePart_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixRenamePart"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1425:1: alterStatementSuffixRenamePart : KW_RENAME KW_TO partitionSpec -> ^( TOK_ALTERTABLE_RENAMEPART partitionSpec ) ;
	public final HiveParser.alterStatementSuffixRenamePart_return alterStatementSuffixRenamePart() throws RecognitionException {
		HiveParser.alterStatementSuffixRenamePart_return retval = new HiveParser.alterStatementSuffixRenamePart_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RENAME382=null;
		Token KW_TO383=null;
		ParserRuleReturnScope partitionSpec384 =null;

		ASTNode KW_RENAME382_tree=null;
		ASTNode KW_TO383_tree=null;
		RewriteRuleTokenStream stream_KW_RENAME=new RewriteRuleTokenStream(adaptor,"token KW_RENAME");
		RewriteRuleTokenStream stream_KW_TO=new RewriteRuleTokenStream(adaptor,"token KW_TO");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");

		 pushMsg("alter table rename partition statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1428:5: ( KW_RENAME KW_TO partitionSpec -> ^( TOK_ALTERTABLE_RENAMEPART partitionSpec ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1428:7: KW_RENAME KW_TO partitionSpec
			{
			KW_RENAME382=(Token)match(input,KW_RENAME,FOLLOW_KW_RENAME_in_alterStatementSuffixRenamePart6756); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_RENAME.add(KW_RENAME382);

			KW_TO383=(Token)match(input,KW_TO,FOLLOW_KW_TO_in_alterStatementSuffixRenamePart6758); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TO.add(KW_TO383);

			pushFollow(FOLLOW_partitionSpec_in_alterStatementSuffixRenamePart6760);
			partitionSpec384=partitionSpec();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec384.getTree());
			// AST REWRITE
			// elements: partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1429:5: -> ^( TOK_ALTERTABLE_RENAMEPART partitionSpec )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1429:7: ^( TOK_ALTERTABLE_RENAMEPART partitionSpec )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_RENAMEPART, "TOK_ALTERTABLE_RENAMEPART"), root_1);
				adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixRenamePart"


	public static class alterStatementSuffixStatsPart_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixStatsPart"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1432:1: alterStatementSuffixStatsPart : KW_UPDATE KW_STATISTICS KW_FOR ( KW_COLUMN )? colName= identifier KW_SET tableProperties ( KW_COMMENT comment= StringLiteral )? -> ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? ) ;
	public final HiveParser.alterStatementSuffixStatsPart_return alterStatementSuffixStatsPart() throws RecognitionException {
		HiveParser.alterStatementSuffixStatsPart_return retval = new HiveParser.alterStatementSuffixStatsPart_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_UPDATE385=null;
		Token KW_STATISTICS386=null;
		Token KW_FOR387=null;
		Token KW_COLUMN388=null;
		Token KW_SET389=null;
		Token KW_COMMENT391=null;
		ParserRuleReturnScope colName =null;
		ParserRuleReturnScope tableProperties390 =null;

		ASTNode comment_tree=null;
		ASTNode KW_UPDATE385_tree=null;
		ASTNode KW_STATISTICS386_tree=null;
		ASTNode KW_FOR387_tree=null;
		ASTNode KW_COLUMN388_tree=null;
		ASTNode KW_SET389_tree=null;
		ASTNode KW_COMMENT391_tree=null;
		RewriteRuleTokenStream stream_KW_STATISTICS=new RewriteRuleTokenStream(adaptor,"token KW_STATISTICS");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,"token KW_FOR");
		RewriteRuleTokenStream stream_KW_UPDATE=new RewriteRuleTokenStream(adaptor,"token KW_UPDATE");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");
		RewriteRuleTokenStream stream_KW_COLUMN=new RewriteRuleTokenStream(adaptor,"token KW_COLUMN");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 pushMsg("alter table stats partition statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1435:5: ( KW_UPDATE KW_STATISTICS KW_FOR ( KW_COLUMN )? colName= identifier KW_SET tableProperties ( KW_COMMENT comment= StringLiteral )? -> ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1435:7: KW_UPDATE KW_STATISTICS KW_FOR ( KW_COLUMN )? colName= identifier KW_SET tableProperties ( KW_COMMENT comment= StringLiteral )?
			{
			KW_UPDATE385=(Token)match(input,KW_UPDATE,FOLLOW_KW_UPDATE_in_alterStatementSuffixStatsPart6798); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UPDATE.add(KW_UPDATE385);

			KW_STATISTICS386=(Token)match(input,KW_STATISTICS,FOLLOW_KW_STATISTICS_in_alterStatementSuffixStatsPart6800); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_STATISTICS.add(KW_STATISTICS386);

			KW_FOR387=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_alterStatementSuffixStatsPart6802); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOR.add(KW_FOR387);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1435:38: ( KW_COLUMN )?
			int alt106=2;
			int LA106_0 = input.LA(1);
			if ( (LA106_0==KW_COLUMN) ) {
				alt106=1;
			}
			switch (alt106) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1435:38: KW_COLUMN
					{
					KW_COLUMN388=(Token)match(input,KW_COLUMN,FOLLOW_KW_COLUMN_in_alterStatementSuffixStatsPart6804); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COLUMN.add(KW_COLUMN388);

					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_alterStatementSuffixStatsPart6809);
			colName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(colName.getTree());
			KW_SET389=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_alterStatementSuffixStatsPart6811); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET389);

			pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixStatsPart6813);
			tableProperties390=tableProperties();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties390.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1435:91: ( KW_COMMENT comment= StringLiteral )?
			int alt107=2;
			int LA107_0 = input.LA(1);
			if ( (LA107_0==KW_COMMENT) ) {
				alt107=1;
			}
			switch (alt107) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1435:92: KW_COMMENT comment= StringLiteral
					{
					KW_COMMENT391=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_alterStatementSuffixStatsPart6816); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT391);

					comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_alterStatementSuffixStatsPart6820); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

					}
					break;

			}

			// AST REWRITE
			// elements: colName, comment, tableProperties
			// token labels: comment
			// rule labels: colName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_colName=new RewriteRuleSubtreeStream(adaptor,"rule colName",colName!=null?colName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1436:5: -> ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1436:7: ^( TOK_ALTERTABLE_UPDATECOLSTATS $colName tableProperties ( $comment)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_UPDATECOLSTATS, "TOK_ALTERTABLE_UPDATECOLSTATS"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, stream_tableProperties.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1436:65: ( $comment)?
				if ( stream_comment.hasNext() ) {
					adaptor.addChild(root_1, stream_comment.nextNode());
				}
				stream_comment.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixStatsPart"


	public static class alterStatementSuffixMergeFiles_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixMergeFiles"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1439:1: alterStatementSuffixMergeFiles : KW_CONCATENATE -> ^( TOK_ALTERTABLE_MERGEFILES ) ;
	public final HiveParser.alterStatementSuffixMergeFiles_return alterStatementSuffixMergeFiles() throws RecognitionException {
		HiveParser.alterStatementSuffixMergeFiles_return retval = new HiveParser.alterStatementSuffixMergeFiles_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CONCATENATE392=null;

		ASTNode KW_CONCATENATE392_tree=null;
		RewriteRuleTokenStream stream_KW_CONCATENATE=new RewriteRuleTokenStream(adaptor,"token KW_CONCATENATE");

		 pushMsg("", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1442:5: ( KW_CONCATENATE -> ^( TOK_ALTERTABLE_MERGEFILES ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1442:7: KW_CONCATENATE
			{
			KW_CONCATENATE392=(Token)match(input,KW_CONCATENATE,FOLLOW_KW_CONCATENATE_in_alterStatementSuffixMergeFiles6867); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CONCATENATE.add(KW_CONCATENATE392);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1443:5: -> ^( TOK_ALTERTABLE_MERGEFILES )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1443:8: ^( TOK_ALTERTABLE_MERGEFILES )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_MERGEFILES, "TOK_ALTERTABLE_MERGEFILES"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixMergeFiles"


	public static class alterStatementSuffixBucketNum_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixBucketNum"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1446:1: alterStatementSuffixBucketNum : KW_INTO num= Number KW_BUCKETS -> ^( TOK_ALTERTABLE_BUCKETS $num) ;
	public final HiveParser.alterStatementSuffixBucketNum_return alterStatementSuffixBucketNum() throws RecognitionException {
		HiveParser.alterStatementSuffixBucketNum_return retval = new HiveParser.alterStatementSuffixBucketNum_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token num=null;
		Token KW_INTO393=null;
		Token KW_BUCKETS394=null;

		ASTNode num_tree=null;
		ASTNode KW_INTO393_tree=null;
		ASTNode KW_BUCKETS394_tree=null;
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_INTO=new RewriteRuleTokenStream(adaptor,"token KW_INTO");
		RewriteRuleTokenStream stream_KW_BUCKETS=new RewriteRuleTokenStream(adaptor,"token KW_BUCKETS");

		 pushMsg("", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1449:5: ( KW_INTO num= Number KW_BUCKETS -> ^( TOK_ALTERTABLE_BUCKETS $num) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1449:7: KW_INTO num= Number KW_BUCKETS
			{
			KW_INTO393=(Token)match(input,KW_INTO,FOLLOW_KW_INTO_in_alterStatementSuffixBucketNum6904); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INTO.add(KW_INTO393);

			num=(Token)match(input,Number,FOLLOW_Number_in_alterStatementSuffixBucketNum6908); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_Number.add(num);

			KW_BUCKETS394=(Token)match(input,KW_BUCKETS,FOLLOW_KW_BUCKETS_in_alterStatementSuffixBucketNum6910); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BUCKETS.add(KW_BUCKETS394);

			// AST REWRITE
			// elements: num
			// token labels: num
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_num=new RewriteRuleTokenStream(adaptor,"token num",num);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1450:5: -> ^( TOK_ALTERTABLE_BUCKETS $num)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1450:8: ^( TOK_ALTERTABLE_BUCKETS $num)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_BUCKETS, "TOK_ALTERTABLE_BUCKETS"), root_1);
				adaptor.addChild(root_1, stream_num.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixBucketNum"


	public static class blocking_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "blocking"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1453:1: blocking : KW_AND KW_WAIT -> TOK_BLOCKING ;
	public final HiveParser.blocking_return blocking() throws RecognitionException {
		HiveParser.blocking_return retval = new HiveParser.blocking_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_AND395=null;
		Token KW_WAIT396=null;

		ASTNode KW_AND395_tree=null;
		ASTNode KW_WAIT396_tree=null;
		RewriteRuleTokenStream stream_KW_WAIT=new RewriteRuleTokenStream(adaptor,"token KW_WAIT");
		RewriteRuleTokenStream stream_KW_AND=new RewriteRuleTokenStream(adaptor,"token KW_AND");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1454:3: ( KW_AND KW_WAIT -> TOK_BLOCKING )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1454:5: KW_AND KW_WAIT
			{
			KW_AND395=(Token)match(input,KW_AND,FOLLOW_KW_AND_in_blocking6938); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AND.add(KW_AND395);

			KW_WAIT396=(Token)match(input,KW_WAIT,FOLLOW_KW_WAIT_in_blocking6940); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WAIT.add(KW_WAIT396);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1455:3: -> TOK_BLOCKING
			{
				adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_BLOCKING, "TOK_BLOCKING"));
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "blocking"


	public static class alterStatementSuffixCompact_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "alterStatementSuffixCompact"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1458:1: alterStatementSuffixCompact : KW_COMPACT compactType= StringLiteral ( blocking )? ( KW_WITH KW_OVERWRITE KW_TBLPROPERTIES tableProperties )? -> ^( TOK_ALTERTABLE_COMPACT $compactType ( blocking )? ( tableProperties )? ) ;
	public final HiveParser.alterStatementSuffixCompact_return alterStatementSuffixCompact() throws RecognitionException {
		HiveParser.alterStatementSuffixCompact_return retval = new HiveParser.alterStatementSuffixCompact_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token compactType=null;
		Token KW_COMPACT397=null;
		Token KW_WITH399=null;
		Token KW_OVERWRITE400=null;
		Token KW_TBLPROPERTIES401=null;
		ParserRuleReturnScope blocking398 =null;
		ParserRuleReturnScope tableProperties402 =null;

		ASTNode compactType_tree=null;
		ASTNode KW_COMPACT397_tree=null;
		ASTNode KW_WITH399_tree=null;
		ASTNode KW_OVERWRITE400_tree=null;
		ASTNode KW_TBLPROPERTIES401_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_COMPACT=new RewriteRuleTokenStream(adaptor,"token KW_COMPACT");
		RewriteRuleTokenStream stream_KW_OVERWRITE=new RewriteRuleTokenStream(adaptor,"token KW_OVERWRITE");
		RewriteRuleTokenStream stream_KW_TBLPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_TBLPROPERTIES");
		RewriteRuleSubtreeStream stream_blocking=new RewriteRuleSubtreeStream(adaptor,"rule blocking");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 msgs.push("compaction request"); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1461:5: ( KW_COMPACT compactType= StringLiteral ( blocking )? ( KW_WITH KW_OVERWRITE KW_TBLPROPERTIES tableProperties )? -> ^( TOK_ALTERTABLE_COMPACT $compactType ( blocking )? ( tableProperties )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1461:7: KW_COMPACT compactType= StringLiteral ( blocking )? ( KW_WITH KW_OVERWRITE KW_TBLPROPERTIES tableProperties )?
			{
			KW_COMPACT397=(Token)match(input,KW_COMPACT,FOLLOW_KW_COMPACT_in_alterStatementSuffixCompact6971); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COMPACT.add(KW_COMPACT397);

			compactType=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_alterStatementSuffixCompact6975); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(compactType);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1461:44: ( blocking )?
			int alt108=2;
			int LA108_0 = input.LA(1);
			if ( (LA108_0==KW_AND) ) {
				alt108=1;
			}
			switch (alt108) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1461:44: blocking
					{
					pushFollow(FOLLOW_blocking_in_alterStatementSuffixCompact6977);
					blocking398=blocking();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_blocking.add(blocking398.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1461:54: ( KW_WITH KW_OVERWRITE KW_TBLPROPERTIES tableProperties )?
			int alt109=2;
			int LA109_0 = input.LA(1);
			if ( (LA109_0==KW_WITH) ) {
				alt109=1;
			}
			switch (alt109) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1461:55: KW_WITH KW_OVERWRITE KW_TBLPROPERTIES tableProperties
					{
					KW_WITH399=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_alterStatementSuffixCompact6981); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH399);

					KW_OVERWRITE400=(Token)match(input,KW_OVERWRITE,FOLLOW_KW_OVERWRITE_in_alterStatementSuffixCompact6983); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OVERWRITE.add(KW_OVERWRITE400);

					KW_TBLPROPERTIES401=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_alterStatementSuffixCompact6985); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TBLPROPERTIES.add(KW_TBLPROPERTIES401);

					pushFollow(FOLLOW_tableProperties_in_alterStatementSuffixCompact6987);
					tableProperties402=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(tableProperties402.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tableProperties, blocking, compactType
			// token labels: compactType
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_compactType=new RewriteRuleTokenStream(adaptor,"token compactType",compactType);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1462:5: -> ^( TOK_ALTERTABLE_COMPACT $compactType ( blocking )? ( tableProperties )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1462:8: ^( TOK_ALTERTABLE_COMPACT $compactType ( blocking )? ( tableProperties )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_COMPACT, "TOK_ALTERTABLE_COMPACT"), root_1);
				adaptor.addChild(root_1, stream_compactType.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1462:46: ( blocking )?
				if ( stream_blocking.hasNext() ) {
					adaptor.addChild(root_1, stream_blocking.nextTree());
				}
				stream_blocking.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1462:56: ( tableProperties )?
				if ( stream_tableProperties.hasNext() ) {
					adaptor.addChild(root_1, stream_tableProperties.nextTree());
				}
				stream_tableProperties.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { msgs.pop(); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "alterStatementSuffixCompact"


	public static class fileFormat_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "fileFormat"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1466:1: fileFormat : ( KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral KW_SERDE serdeCls= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )? -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt $serdeCls ( $inDriver)? ( $outDriver)? ) |genericSpec= identifier -> ^( TOK_FILEFORMAT_GENERIC $genericSpec) );
	public final HiveParser.fileFormat_return fileFormat() throws RecognitionException {
		HiveParser.fileFormat_return retval = new HiveParser.fileFormat_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token inFmt=null;
		Token outFmt=null;
		Token serdeCls=null;
		Token inDriver=null;
		Token outDriver=null;
		Token KW_INPUTFORMAT403=null;
		Token KW_OUTPUTFORMAT404=null;
		Token KW_SERDE405=null;
		Token KW_INPUTDRIVER406=null;
		Token KW_OUTPUTDRIVER407=null;
		ParserRuleReturnScope genericSpec =null;

		ASTNode inFmt_tree=null;
		ASTNode outFmt_tree=null;
		ASTNode serdeCls_tree=null;
		ASTNode inDriver_tree=null;
		ASTNode outDriver_tree=null;
		ASTNode KW_INPUTFORMAT403_tree=null;
		ASTNode KW_OUTPUTFORMAT404_tree=null;
		ASTNode KW_SERDE405_tree=null;
		ASTNode KW_INPUTDRIVER406_tree=null;
		ASTNode KW_OUTPUTDRIVER407_tree=null;
		RewriteRuleTokenStream stream_KW_INPUTFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_INPUTFORMAT");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_INPUTDRIVER=new RewriteRuleTokenStream(adaptor,"token KW_INPUTDRIVER");
		RewriteRuleTokenStream stream_KW_SERDE=new RewriteRuleTokenStream(adaptor,"token KW_SERDE");
		RewriteRuleTokenStream stream_KW_OUTPUTFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_OUTPUTFORMAT");
		RewriteRuleTokenStream stream_KW_OUTPUTDRIVER=new RewriteRuleTokenStream(adaptor,"token KW_OUTPUTDRIVER");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("file format specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1469:5: ( KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral KW_SERDE serdeCls= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )? -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt $serdeCls ( $inDriver)? ( $outDriver)? ) |genericSpec= identifier -> ^( TOK_FILEFORMAT_GENERIC $genericSpec) )
			int alt111=2;
			int LA111_0 = input.LA(1);
			if ( (LA111_0==KW_INPUTFORMAT) ) {
				int LA111_1 = input.LA(2);
				if ( (LA111_1==StringLiteral) ) {
					alt111=1;
				}
				else if ( (LA111_1==EOF) ) {
					alt111=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 111, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}
			else if ( (LA111_0==Identifier||(LA111_0 >= KW_ABORT && LA111_0 <= KW_AFTER)||LA111_0==KW_ANALYZE||LA111_0==KW_ARCHIVE||LA111_0==KW_ASC||(LA111_0 >= KW_AUTOCOMMIT && LA111_0 <= KW_BEFORE)||(LA111_0 >= KW_BUCKET && LA111_0 <= KW_BUCKETS)||(LA111_0 >= KW_CACHE && LA111_0 <= KW_CASCADE)||LA111_0==KW_CHANGE||(LA111_0 >= KW_CLUSTER && LA111_0 <= KW_COLLECTION)||(LA111_0 >= KW_COLUMNS && LA111_0 <= KW_COMMENT)||(LA111_0 >= KW_COMPACT && LA111_0 <= KW_CONCATENATE)||LA111_0==KW_CONTINUE||LA111_0==KW_DATA||LA111_0==KW_DATABASES||(LA111_0 >= KW_DATETIME && LA111_0 <= KW_DBPROPERTIES)||(LA111_0 >= KW_DEFERRED && LA111_0 <= KW_DEFINED)||(LA111_0 >= KW_DELIMITED && LA111_0 <= KW_DESC)||(LA111_0 >= KW_DETAIL && LA111_0 <= KW_DISABLE)||LA111_0==KW_DISTRIBUTE||LA111_0==KW_DOW||(LA111_0 >= KW_DUMP && LA111_0 <= KW_ELEM_TYPE)||LA111_0==KW_ENABLE||LA111_0==KW_ESCAPED||LA111_0==KW_EXCLUSIVE||(LA111_0 >= KW_EXPLAIN && LA111_0 <= KW_EXPRESSION)||(LA111_0 >= KW_FIELDS && LA111_0 <= KW_FIRST)||(LA111_0 >= KW_FORMAT && LA111_0 <= KW_FORMATTED)||LA111_0==KW_FUNCTIONS||(LA111_0 >= KW_HOUR && LA111_0 <= KW_IDXPROPERTIES)||(LA111_0 >= KW_INDEX && LA111_0 <= KW_INDEXES)||(LA111_0 >= KW_INPATH && LA111_0 <= KW_INPUTDRIVER)||(LA111_0 >= KW_ISOLATION && LA111_0 <= KW_JAR)||(LA111_0 >= KW_KEY && LA111_0 <= KW_LAST)||LA111_0==KW_LEVEL||(LA111_0 >= KW_LIMIT && LA111_0 <= KW_LOAD)||(LA111_0 >= KW_LOCATION && LA111_0 <= KW_LONG)||(LA111_0 >= KW_MAPJOIN && LA111_0 <= KW_MATERIALIZED)||LA111_0==KW_METADATA||(LA111_0 >= KW_MINUTE && LA111_0 <= KW_MONTH)||LA111_0==KW_MSCK||(LA111_0 >= KW_NORELY && LA111_0 <= KW_NOSCAN)||LA111_0==KW_NOVALIDATE||LA111_0==KW_NULLS||LA111_0==KW_OFFSET||(LA111_0 >= KW_OPERATOR && LA111_0 <= KW_OPTION)||(LA111_0 >= KW_OUTPUTDRIVER && LA111_0 <= KW_OUTPUTFORMAT)||(LA111_0 >= KW_OVERWRITE && LA111_0 <= KW_OWNER)||(LA111_0 >= KW_PARTITIONED && LA111_0 <= KW_PARTITIONS)||LA111_0==KW_PLUS||LA111_0==KW_PRETTY||LA111_0==KW_PRINCIPALS||(LA111_0 >= KW_PURGE && LA111_0 <= KW_QUARTER)||LA111_0==KW_READ||(LA111_0 >= KW_REBUILD && LA111_0 <= KW_RECORDWRITER)||(LA111_0 >= KW_RELOAD && LA111_0 <= KW_RESTRICT)||LA111_0==KW_REWRITE||(LA111_0 >= KW_ROLE && LA111_0 <= KW_ROLES)||(LA111_0 >= KW_SCHEMA && LA111_0 <= KW_SECOND)||(LA111_0 >= KW_SEMI && LA111_0 <= KW_SERVER)||(LA111_0 >= KW_SETS && LA111_0 <= KW_SKEWED)||(LA111_0 >= KW_SNAPSHOT && LA111_0 <= KW_SSL)||(LA111_0 >= KW_STATISTICS && LA111_0 <= KW_SUMMARY)||LA111_0==KW_TABLES||(LA111_0 >= KW_TBLPROPERTIES && LA111_0 <= KW_TERMINATED)||LA111_0==KW_TINYINT||(LA111_0 >= KW_TOUCH && LA111_0 <= KW_TRANSACTIONS)||LA111_0==KW_UNARCHIVE||LA111_0==KW_UNDO||LA111_0==KW_UNIONTYPE||(LA111_0 >= KW_UNLOCK && LA111_0 <= KW_UNSIGNED)||(LA111_0 >= KW_URI && LA111_0 <= KW_USE)||(LA111_0 >= KW_UTC && LA111_0 <= KW_VALIDATE)||LA111_0==KW_VALUE_TYPE||(LA111_0 >= KW_VECTORIZATION && LA111_0 <= KW_WEEK)||LA111_0==KW_WHILE||(LA111_0 >= KW_WORK && LA111_0 <= KW_YEAR)||LA111_0==KW_BATCH||LA111_0==KW_DAYOFWEEK||LA111_0==KW_HOLD_DDLTIME||LA111_0==KW_IGNORE||LA111_0==KW_NO_DROP||LA111_0==KW_OFFLINE||LA111_0==KW_PROTECTION||LA111_0==KW_READONLY) ) {
				alt111=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 111, 0, input);
				throw nvae;
			}

			switch (alt111) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1469:7: KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral KW_SERDE serdeCls= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )?
					{
					KW_INPUTFORMAT403=(Token)match(input,KW_INPUTFORMAT,FOLLOW_KW_INPUTFORMAT_in_fileFormat7036); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INPUTFORMAT.add(KW_INPUTFORMAT403);

					inFmt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_fileFormat7040); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(inFmt);

					KW_OUTPUTFORMAT404=(Token)match(input,KW_OUTPUTFORMAT,FOLLOW_KW_OUTPUTFORMAT_in_fileFormat7042); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OUTPUTFORMAT.add(KW_OUTPUTFORMAT404);

					outFmt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_fileFormat7046); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(outFmt);

					KW_SERDE405=(Token)match(input,KW_SERDE,FOLLOW_KW_SERDE_in_fileFormat7048); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SERDE.add(KW_SERDE405);

					serdeCls=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_fileFormat7052); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(serdeCls);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1469:111: ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )?
					int alt110=2;
					int LA110_0 = input.LA(1);
					if ( (LA110_0==KW_INPUTDRIVER) ) {
						alt110=1;
					}
					switch (alt110) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1469:112: KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral
							{
							KW_INPUTDRIVER406=(Token)match(input,KW_INPUTDRIVER,FOLLOW_KW_INPUTDRIVER_in_fileFormat7055); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_INPUTDRIVER.add(KW_INPUTDRIVER406);

							inDriver=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_fileFormat7059); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_StringLiteral.add(inDriver);

							KW_OUTPUTDRIVER407=(Token)match(input,KW_OUTPUTDRIVER,FOLLOW_KW_OUTPUTDRIVER_in_fileFormat7061); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_OUTPUTDRIVER.add(KW_OUTPUTDRIVER407);

							outDriver=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_fileFormat7065); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_StringLiteral.add(outDriver);

							}
							break;

					}

					// AST REWRITE
					// elements: outFmt, inFmt, inDriver, outDriver, serdeCls
					// token labels: inFmt, inDriver, outDriver, serdeCls, outFmt
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_inFmt=new RewriteRuleTokenStream(adaptor,"token inFmt",inFmt);
					RewriteRuleTokenStream stream_inDriver=new RewriteRuleTokenStream(adaptor,"token inDriver",inDriver);
					RewriteRuleTokenStream stream_outDriver=new RewriteRuleTokenStream(adaptor,"token outDriver",outDriver);
					RewriteRuleTokenStream stream_serdeCls=new RewriteRuleTokenStream(adaptor,"token serdeCls",serdeCls);
					RewriteRuleTokenStream stream_outFmt=new RewriteRuleTokenStream(adaptor,"token outFmt",outFmt);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1470:7: -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt $serdeCls ( $inDriver)? ( $outDriver)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1470:10: ^( TOK_TABLEFILEFORMAT $inFmt $outFmt $serdeCls ( $inDriver)? ( $outDriver)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEFILEFORMAT, "TOK_TABLEFILEFORMAT"), root_1);
						adaptor.addChild(root_1, stream_inFmt.nextNode());
						adaptor.addChild(root_1, stream_outFmt.nextNode());
						adaptor.addChild(root_1, stream_serdeCls.nextNode());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1470:58: ( $inDriver)?
						if ( stream_inDriver.hasNext() ) {
							adaptor.addChild(root_1, stream_inDriver.nextNode());
						}
						stream_inDriver.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1470:69: ( $outDriver)?
						if ( stream_outDriver.hasNext() ) {
							adaptor.addChild(root_1, stream_outDriver.nextNode());
						}
						stream_outDriver.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1471:7: genericSpec= identifier
					{
					pushFollow(FOLLOW_identifier_in_fileFormat7106);
					genericSpec=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(genericSpec.getTree());
					// AST REWRITE
					// elements: genericSpec
					// token labels: 
					// rule labels: genericSpec, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_genericSpec=new RewriteRuleSubtreeStream(adaptor,"rule genericSpec",genericSpec!=null?genericSpec.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1471:30: -> ^( TOK_FILEFORMAT_GENERIC $genericSpec)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1471:33: ^( TOK_FILEFORMAT_GENERIC $genericSpec)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FILEFORMAT_GENERIC, "TOK_FILEFORMAT_GENERIC"), root_1);
						adaptor.addChild(root_1, stream_genericSpec.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "fileFormat"


	public static class tabTypeExpr_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tabTypeExpr"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1474:1: tabTypeExpr : identifier ( DOT ^ identifier )? ( identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )* )? ;
	public final HiveParser.tabTypeExpr_return tabTypeExpr() throws RecognitionException {
		HiveParser.tabTypeExpr_return retval = new HiveParser.tabTypeExpr_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token DOT409=null;
		Token DOT412=null;
		Token KW_ELEM_TYPE413=null;
		Token KW_KEY_TYPE414=null;
		Token KW_VALUE_TYPE415=null;
		ParserRuleReturnScope identifier408 =null;
		ParserRuleReturnScope identifier410 =null;
		ParserRuleReturnScope identifier411 =null;
		ParserRuleReturnScope identifier416 =null;

		ASTNode DOT409_tree=null;
		ASTNode DOT412_tree=null;
		ASTNode KW_ELEM_TYPE413_tree=null;
		ASTNode KW_KEY_TYPE414_tree=null;
		ASTNode KW_VALUE_TYPE415_tree=null;

		 pushMsg("specifying table types", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1477:4: ( identifier ( DOT ^ identifier )? ( identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )* )? )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1477:6: identifier ( DOT ^ identifier )? ( identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )* )?
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_identifier_in_tabTypeExpr7141);
			identifier408=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier408.getTree());

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1477:17: ( DOT ^ identifier )?
			int alt112=2;
			int LA112_0 = input.LA(1);
			if ( (LA112_0==DOT) ) {
				alt112=1;
			}
			switch (alt112) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1477:18: DOT ^ identifier
					{
					DOT409=(Token)match(input,DOT,FOLLOW_DOT_in_tabTypeExpr7144); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					DOT409_tree = (ASTNode)adaptor.create(DOT409);
					root_0 = (ASTNode)adaptor.becomeRoot(DOT409_tree, root_0);
					}

					pushFollow(FOLLOW_identifier_in_tabTypeExpr7147);
					identifier410=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier410.getTree());

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1478:4: ( identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )* )?
			int alt115=2;
			int LA115_0 = input.LA(1);
			if ( (LA115_0==Identifier||(LA115_0 >= KW_ABORT && LA115_0 <= KW_AFTER)||LA115_0==KW_ANALYZE||LA115_0==KW_ARCHIVE||LA115_0==KW_ASC||(LA115_0 >= KW_AUTOCOMMIT && LA115_0 <= KW_BEFORE)||(LA115_0 >= KW_BUCKET && LA115_0 <= KW_BUCKETS)||(LA115_0 >= KW_CACHE && LA115_0 <= KW_CASCADE)||LA115_0==KW_CHANGE||(LA115_0 >= KW_CLUSTER && LA115_0 <= KW_COLLECTION)||(LA115_0 >= KW_COLUMNS && LA115_0 <= KW_COMMENT)||(LA115_0 >= KW_COMPACT && LA115_0 <= KW_CONCATENATE)||LA115_0==KW_CONTINUE||LA115_0==KW_DATA||LA115_0==KW_DATABASES||(LA115_0 >= KW_DATETIME && LA115_0 <= KW_DBPROPERTIES)||(LA115_0 >= KW_DEFERRED && LA115_0 <= KW_DEFINED)||(LA115_0 >= KW_DELIMITED && LA115_0 <= KW_DESC)||(LA115_0 >= KW_DETAIL && LA115_0 <= KW_DISABLE)||LA115_0==KW_DISTRIBUTE||LA115_0==KW_DOW||(LA115_0 >= KW_DUMP && LA115_0 <= KW_ELEM_TYPE)||LA115_0==KW_ENABLE||LA115_0==KW_ESCAPED||LA115_0==KW_EXCLUSIVE||(LA115_0 >= KW_EXPLAIN && LA115_0 <= KW_EXPRESSION)||(LA115_0 >= KW_FIELDS && LA115_0 <= KW_FIRST)||(LA115_0 >= KW_FORMAT && LA115_0 <= KW_FORMATTED)||LA115_0==KW_FUNCTIONS||(LA115_0 >= KW_HOUR && LA115_0 <= KW_IDXPROPERTIES)||(LA115_0 >= KW_INDEX && LA115_0 <= KW_INDEXES)||(LA115_0 >= KW_INPATH && LA115_0 <= KW_INPUTFORMAT)||(LA115_0 >= KW_ISOLATION && LA115_0 <= KW_JAR)||(LA115_0 >= KW_KEY && LA115_0 <= KW_LAST)||LA115_0==KW_LEVEL||(LA115_0 >= KW_LIMIT && LA115_0 <= KW_LOAD)||(LA115_0 >= KW_LOCATION && LA115_0 <= KW_LONG)||(LA115_0 >= KW_MAPJOIN && LA115_0 <= KW_MATERIALIZED)||LA115_0==KW_METADATA||(LA115_0 >= KW_MINUTE && LA115_0 <= KW_MONTH)||LA115_0==KW_MSCK||(LA115_0 >= KW_NORELY && LA115_0 <= KW_NOSCAN)||LA115_0==KW_NOVALIDATE||LA115_0==KW_NULLS||LA115_0==KW_OFFSET||(LA115_0 >= KW_OPERATOR && LA115_0 <= KW_OPTION)||(LA115_0 >= KW_OUTPUTDRIVER && LA115_0 <= KW_OUTPUTFORMAT)||(LA115_0 >= KW_OVERWRITE && LA115_0 <= KW_OWNER)||(LA115_0 >= KW_PARTITIONED && LA115_0 <= KW_PARTITIONS)||LA115_0==KW_PLUS||LA115_0==KW_PRETTY||LA115_0==KW_PRINCIPALS||(LA115_0 >= KW_PURGE && LA115_0 <= KW_QUARTER)||LA115_0==KW_READ||(LA115_0 >= KW_REBUILD && LA115_0 <= KW_RECORDWRITER)||(LA115_0 >= KW_RELOAD && LA115_0 <= KW_RESTRICT)||LA115_0==KW_REWRITE||(LA115_0 >= KW_ROLE && LA115_0 <= KW_ROLES)||(LA115_0 >= KW_SCHEMA && LA115_0 <= KW_SECOND)||(LA115_0 >= KW_SEMI && LA115_0 <= KW_SERVER)||(LA115_0 >= KW_SETS && LA115_0 <= KW_SKEWED)||(LA115_0 >= KW_SNAPSHOT && LA115_0 <= KW_SSL)||(LA115_0 >= KW_STATISTICS && LA115_0 <= KW_SUMMARY)||LA115_0==KW_TABLES||(LA115_0 >= KW_TBLPROPERTIES && LA115_0 <= KW_TERMINATED)||LA115_0==KW_TINYINT||(LA115_0 >= KW_TOUCH && LA115_0 <= KW_TRANSACTIONS)||LA115_0==KW_UNARCHIVE||LA115_0==KW_UNDO||LA115_0==KW_UNIONTYPE||(LA115_0 >= KW_UNLOCK && LA115_0 <= KW_UNSIGNED)||(LA115_0 >= KW_URI && LA115_0 <= KW_USE)||(LA115_0 >= KW_UTC && LA115_0 <= KW_VALIDATE)||LA115_0==KW_VALUE_TYPE||(LA115_0 >= KW_VECTORIZATION && LA115_0 <= KW_WEEK)||LA115_0==KW_WHILE||(LA115_0 >= KW_WORK && LA115_0 <= KW_YEAR)||LA115_0==KW_BATCH||LA115_0==KW_DAYOFWEEK||LA115_0==KW_HOLD_DDLTIME||LA115_0==KW_IGNORE||LA115_0==KW_NO_DROP||LA115_0==KW_OFFLINE||LA115_0==KW_PROTECTION||LA115_0==KW_READONLY) ) {
				alt115=1;
			}
			switch (alt115) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1478:5: identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )*
					{
					pushFollow(FOLLOW_identifier_in_tabTypeExpr7155);
					identifier411=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier411.getTree());

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1478:16: ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )*
					loop114:
					while (true) {
						int alt114=2;
						int LA114_0 = input.LA(1);
						if ( (LA114_0==DOT) ) {
							alt114=1;
						}

						switch (alt114) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1478:17: DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier )
							{
							DOT412=(Token)match(input,DOT,FOLLOW_DOT_in_tabTypeExpr7158); if (state.failed) return retval;
							if ( state.backtracking==0 ) {
							DOT412_tree = (ASTNode)adaptor.create(DOT412);
							root_0 = (ASTNode)adaptor.becomeRoot(DOT412_tree, root_0);
							}

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1479:4: ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier )
							int alt113=4;
							switch ( input.LA(1) ) {
							case KW_ELEM_TYPE:
								{
								int LA113_1 = input.LA(2);
								if ( (synpred4_HiveParser()) ) {
									alt113=1;
								}
								else if ( (true) ) {
									alt113=4;
								}

								}
								break;
							case KW_KEY_TYPE:
								{
								int LA113_2 = input.LA(2);
								if ( (synpred5_HiveParser()) ) {
									alt113=2;
								}
								else if ( (true) ) {
									alt113=4;
								}

								}
								break;
							case KW_VALUE_TYPE:
								{
								int LA113_3 = input.LA(2);
								if ( (synpred6_HiveParser()) ) {
									alt113=3;
								}
								else if ( (true) ) {
									alt113=4;
								}

								}
								break;
							case Identifier:
							case KW_ABORT:
							case KW_ADD:
							case KW_ADMIN:
							case KW_AFTER:
							case KW_ANALYZE:
							case KW_ARCHIVE:
							case KW_ASC:
							case KW_AUTOCOMMIT:
							case KW_BEFORE:
							case KW_BUCKET:
							case KW_BUCKETS:
							case KW_CACHE:
							case KW_CASCADE:
							case KW_CHANGE:
							case KW_CLUSTER:
							case KW_CLUSTERED:
							case KW_CLUSTERSTATUS:
							case KW_COLLECTION:
							case KW_COLUMNS:
							case KW_COMMENT:
							case KW_COMPACT:
							case KW_COMPACTIONS:
							case KW_COMPUTE:
							case KW_CONCATENATE:
							case KW_CONTINUE:
							case KW_DATA:
							case KW_DATABASES:
							case KW_DATETIME:
							case KW_DAY:
							case KW_DBPROPERTIES:
							case KW_DEFERRED:
							case KW_DEFINED:
							case KW_DELIMITED:
							case KW_DEPENDENCY:
							case KW_DESC:
							case KW_DETAIL:
							case KW_DIRECTORIES:
							case KW_DIRECTORY:
							case KW_DISABLE:
							case KW_DISTRIBUTE:
							case KW_DOW:
							case KW_DUMP:
							case KW_ENABLE:
							case KW_ESCAPED:
							case KW_EXCLUSIVE:
							case KW_EXPLAIN:
							case KW_EXPORT:
							case KW_EXPRESSION:
							case KW_FIELDS:
							case KW_FILE:
							case KW_FILEFORMAT:
							case KW_FIRST:
							case KW_FORMAT:
							case KW_FORMATTED:
							case KW_FUNCTIONS:
							case KW_HOUR:
							case KW_IDXPROPERTIES:
							case KW_INDEX:
							case KW_INDEXES:
							case KW_INPATH:
							case KW_INPUTDRIVER:
							case KW_INPUTFORMAT:
							case KW_ISOLATION:
							case KW_ITEMS:
							case KW_JAR:
							case KW_KEY:
							case KW_KEYS:
							case KW_LAST:
							case KW_LEVEL:
							case KW_LIMIT:
							case KW_LINES:
							case KW_LOAD:
							case KW_LOCATION:
							case KW_LOCK:
							case KW_LOCKS:
							case KW_LOGICAL:
							case KW_LONG:
							case KW_MAPJOIN:
							case KW_MATCHED:
							case KW_MATERIALIZED:
							case KW_METADATA:
							case KW_MINUTE:
							case KW_MONTH:
							case KW_MSCK:
							case KW_NORELY:
							case KW_NOSCAN:
							case KW_NOVALIDATE:
							case KW_NULLS:
							case KW_OFFSET:
							case KW_OPERATOR:
							case KW_OPTION:
							case KW_OUTPUTDRIVER:
							case KW_OUTPUTFORMAT:
							case KW_OVERWRITE:
							case KW_OWNER:
							case KW_PARTITIONED:
							case KW_PARTITIONS:
							case KW_PLUS:
							case KW_PRETTY:
							case KW_PRINCIPALS:
							case KW_PURGE:
							case KW_QUARTER:
							case KW_READ:
							case KW_REBUILD:
							case KW_RECORDREADER:
							case KW_RECORDWRITER:
							case KW_RELOAD:
							case KW_RELY:
							case KW_RENAME:
							case KW_REPAIR:
							case KW_REPL:
							case KW_REPLACE:
							case KW_REPLICATION:
							case KW_RESTRICT:
							case KW_REWRITE:
							case KW_ROLE:
							case KW_ROLES:
							case KW_SCHEMA:
							case KW_SCHEMAS:
							case KW_SECOND:
							case KW_SEMI:
							case KW_SERDE:
							case KW_SERDEPROPERTIES:
							case KW_SERVER:
							case KW_SETS:
							case KW_SHARED:
							case KW_SHOW:
							case KW_SHOW_DATABASE:
							case KW_SKEWED:
							case KW_SNAPSHOT:
							case KW_SORT:
							case KW_SORTED:
							case KW_SSL:
							case KW_STATISTICS:
							case KW_STATUS:
							case KW_STORED:
							case KW_STREAMTABLE:
							case KW_STRING:
							case KW_STRUCT:
							case KW_SUMMARY:
							case KW_TABLES:
							case KW_TBLPROPERTIES:
							case KW_TEMPORARY:
							case KW_TERMINATED:
							case KW_TINYINT:
							case KW_TOUCH:
							case KW_TRANSACTION:
							case KW_TRANSACTIONS:
							case KW_UNARCHIVE:
							case KW_UNDO:
							case KW_UNIONTYPE:
							case KW_UNLOCK:
							case KW_UNSET:
							case KW_UNSIGNED:
							case KW_URI:
							case KW_USE:
							case KW_UTC:
							case KW_UTCTIMESTAMP:
							case KW_VALIDATE:
							case KW_VECTORIZATION:
							case KW_VIEW:
							case KW_VIEWS:
							case KW_WAIT:
							case KW_WEEK:
							case KW_WHILE:
							case KW_WORK:
							case KW_WRITE:
							case KW_YEAR:
							case KW_BATCH:
							case KW_DAYOFWEEK:
							case KW_HOLD_DDLTIME:
							case KW_IGNORE:
							case KW_NO_DROP:
							case KW_OFFLINE:
							case KW_PROTECTION:
							case KW_READONLY:
								{
								alt113=4;
								}
								break;
							default:
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 113, 0, input);
								throw nvae;
							}
							switch (alt113) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1480:4: ( KW_ELEM_TYPE )=> KW_ELEM_TYPE
									{
									KW_ELEM_TYPE413=(Token)match(input,KW_ELEM_TYPE,FOLLOW_KW_ELEM_TYPE_in_tabTypeExpr7175); if (state.failed) return retval;
									if ( state.backtracking==0 ) {
									KW_ELEM_TYPE413_tree = (ASTNode)adaptor.create(KW_ELEM_TYPE413);
									adaptor.addChild(root_0, KW_ELEM_TYPE413_tree);
									}

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1482:4: ( KW_KEY_TYPE )=> KW_KEY_TYPE
									{
									KW_KEY_TYPE414=(Token)match(input,KW_KEY_TYPE,FOLLOW_KW_KEY_TYPE_in_tabTypeExpr7192); if (state.failed) return retval;
									if ( state.backtracking==0 ) {
									KW_KEY_TYPE414_tree = (ASTNode)adaptor.create(KW_KEY_TYPE414);
									adaptor.addChild(root_0, KW_KEY_TYPE414_tree);
									}

									}
									break;
								case 3 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1484:4: ( KW_VALUE_TYPE )=> KW_VALUE_TYPE
									{
									KW_VALUE_TYPE415=(Token)match(input,KW_VALUE_TYPE,FOLLOW_KW_VALUE_TYPE_in_tabTypeExpr7209); if (state.failed) return retval;
									if ( state.backtracking==0 ) {
									KW_VALUE_TYPE415_tree = (ASTNode)adaptor.create(KW_VALUE_TYPE415);
									adaptor.addChild(root_0, KW_VALUE_TYPE415_tree);
									}

									}
									break;
								case 4 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1485:6: identifier
									{
									pushFollow(FOLLOW_identifier_in_tabTypeExpr7217);
									identifier416=identifier();
									state._fsp--;
									if (state.failed) return retval;
									if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier416.getTree());

									}
									break;

							}

							}
							break;

						default :
							break loop114;
						}
					}

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tabTypeExpr"


	public static class partTypeExpr_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "partTypeExpr"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1490:1: partTypeExpr : tabTypeExpr ( partitionSpec )? -> ^( TOK_TABTYPE tabTypeExpr ( partitionSpec )? ) ;
	public final HiveParser.partTypeExpr_return partTypeExpr() throws RecognitionException {
		HiveParser.partTypeExpr_return retval = new HiveParser.partTypeExpr_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope tabTypeExpr417 =null;
		ParserRuleReturnScope partitionSpec418 =null;

		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tabTypeExpr=new RewriteRuleSubtreeStream(adaptor,"rule tabTypeExpr");

		 pushMsg("specifying table partitions", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1493:5: ( tabTypeExpr ( partitionSpec )? -> ^( TOK_TABTYPE tabTypeExpr ( partitionSpec )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1493:8: tabTypeExpr ( partitionSpec )?
			{
			pushFollow(FOLLOW_tabTypeExpr_in_partTypeExpr7257);
			tabTypeExpr417=tabTypeExpr();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tabTypeExpr.add(tabTypeExpr417.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1493:20: ( partitionSpec )?
			int alt116=2;
			int LA116_0 = input.LA(1);
			if ( (LA116_0==KW_PARTITION) ) {
				alt116=1;
			}
			switch (alt116) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1493:20: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_partTypeExpr7259);
					partitionSpec418=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec418.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tabTypeExpr, partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1493:35: -> ^( TOK_TABTYPE tabTypeExpr ( partitionSpec )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1493:38: ^( TOK_TABTYPE tabTypeExpr ( partitionSpec )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABTYPE, "TOK_TABTYPE"), root_1);
				adaptor.addChild(root_1, stream_tabTypeExpr.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1493:64: ( partitionSpec )?
				if ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "partTypeExpr"


	public static class tabPartColTypeExpr_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tabPartColTypeExpr"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1496:1: tabPartColTypeExpr : tableName ( partitionSpec )? ( extColumnName )? -> ^( TOK_TABTYPE tableName ( partitionSpec )? ( extColumnName )? ) ;
	public final HiveParser.tabPartColTypeExpr_return tabPartColTypeExpr() throws RecognitionException {
		HiveParser.tabPartColTypeExpr_return retval = new HiveParser.tabPartColTypeExpr_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope tableName419 =null;
		ParserRuleReturnScope partitionSpec420 =null;
		ParserRuleReturnScope extColumnName421 =null;

		RewriteRuleSubtreeStream stream_extColumnName=new RewriteRuleSubtreeStream(adaptor,"rule extColumnName");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("specifying table partitions columnName", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:5: ( tableName ( partitionSpec )? ( extColumnName )? -> ^( TOK_TABTYPE tableName ( partitionSpec )? ( extColumnName )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:8: tableName ( partitionSpec )? ( extColumnName )?
			{
			pushFollow(FOLLOW_tableName_in_tabPartColTypeExpr7299);
			tableName419=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName419.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:18: ( partitionSpec )?
			int alt117=2;
			int LA117_0 = input.LA(1);
			if ( (LA117_0==KW_PARTITION) ) {
				alt117=1;
			}
			switch (alt117) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:18: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_tabPartColTypeExpr7301);
					partitionSpec420=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec420.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:33: ( extColumnName )?
			int alt118=2;
			int LA118_0 = input.LA(1);
			if ( (LA118_0==Identifier||(LA118_0 >= KW_ABORT && LA118_0 <= KW_AFTER)||LA118_0==KW_ANALYZE||LA118_0==KW_ARCHIVE||LA118_0==KW_ASC||(LA118_0 >= KW_AUTOCOMMIT && LA118_0 <= KW_BEFORE)||(LA118_0 >= KW_BUCKET && LA118_0 <= KW_BUCKETS)||(LA118_0 >= KW_CACHE && LA118_0 <= KW_CASCADE)||LA118_0==KW_CHANGE||(LA118_0 >= KW_CLUSTER && LA118_0 <= KW_COLLECTION)||(LA118_0 >= KW_COLUMNS && LA118_0 <= KW_COMMENT)||(LA118_0 >= KW_COMPACT && LA118_0 <= KW_CONCATENATE)||LA118_0==KW_CONTINUE||LA118_0==KW_DATA||LA118_0==KW_DATABASES||(LA118_0 >= KW_DATETIME && LA118_0 <= KW_DBPROPERTIES)||(LA118_0 >= KW_DEFERRED && LA118_0 <= KW_DEFINED)||(LA118_0 >= KW_DELIMITED && LA118_0 <= KW_DESC)||(LA118_0 >= KW_DETAIL && LA118_0 <= KW_DISABLE)||LA118_0==KW_DISTRIBUTE||LA118_0==KW_DOW||(LA118_0 >= KW_DUMP && LA118_0 <= KW_ELEM_TYPE)||LA118_0==KW_ENABLE||LA118_0==KW_ESCAPED||LA118_0==KW_EXCLUSIVE||(LA118_0 >= KW_EXPLAIN && LA118_0 <= KW_EXPRESSION)||(LA118_0 >= KW_FIELDS && LA118_0 <= KW_FIRST)||(LA118_0 >= KW_FORMAT && LA118_0 <= KW_FORMATTED)||LA118_0==KW_FUNCTIONS||(LA118_0 >= KW_HOUR && LA118_0 <= KW_IDXPROPERTIES)||(LA118_0 >= KW_INDEX && LA118_0 <= KW_INDEXES)||(LA118_0 >= KW_INPATH && LA118_0 <= KW_INPUTFORMAT)||(LA118_0 >= KW_ISOLATION && LA118_0 <= KW_JAR)||(LA118_0 >= KW_KEY && LA118_0 <= KW_LAST)||LA118_0==KW_LEVEL||(LA118_0 >= KW_LIMIT && LA118_0 <= KW_LOAD)||(LA118_0 >= KW_LOCATION && LA118_0 <= KW_LONG)||(LA118_0 >= KW_MAPJOIN && LA118_0 <= KW_MATERIALIZED)||LA118_0==KW_METADATA||(LA118_0 >= KW_MINUTE && LA118_0 <= KW_MONTH)||LA118_0==KW_MSCK||(LA118_0 >= KW_NORELY && LA118_0 <= KW_NOSCAN)||LA118_0==KW_NOVALIDATE||LA118_0==KW_NULLS||LA118_0==KW_OFFSET||(LA118_0 >= KW_OPERATOR && LA118_0 <= KW_OPTION)||(LA118_0 >= KW_OUTPUTDRIVER && LA118_0 <= KW_OUTPUTFORMAT)||(LA118_0 >= KW_OVERWRITE && LA118_0 <= KW_OWNER)||(LA118_0 >= KW_PARTITIONED && LA118_0 <= KW_PARTITIONS)||LA118_0==KW_PLUS||LA118_0==KW_PRETTY||LA118_0==KW_PRINCIPALS||(LA118_0 >= KW_PURGE && LA118_0 <= KW_QUARTER)||LA118_0==KW_READ||(LA118_0 >= KW_REBUILD && LA118_0 <= KW_RECORDWRITER)||(LA118_0 >= KW_RELOAD && LA118_0 <= KW_RESTRICT)||LA118_0==KW_REWRITE||(LA118_0 >= KW_ROLE && LA118_0 <= KW_ROLES)||(LA118_0 >= KW_SCHEMA && LA118_0 <= KW_SECOND)||(LA118_0 >= KW_SEMI && LA118_0 <= KW_SERVER)||(LA118_0 >= KW_SETS && LA118_0 <= KW_SKEWED)||(LA118_0 >= KW_SNAPSHOT && LA118_0 <= KW_SSL)||(LA118_0 >= KW_STATISTICS && LA118_0 <= KW_SUMMARY)||LA118_0==KW_TABLES||(LA118_0 >= KW_TBLPROPERTIES && LA118_0 <= KW_TERMINATED)||LA118_0==KW_TINYINT||(LA118_0 >= KW_TOUCH && LA118_0 <= KW_TRANSACTIONS)||LA118_0==KW_UNARCHIVE||LA118_0==KW_UNDO||LA118_0==KW_UNIONTYPE||(LA118_0 >= KW_UNLOCK && LA118_0 <= KW_UNSIGNED)||(LA118_0 >= KW_URI && LA118_0 <= KW_USE)||(LA118_0 >= KW_UTC && LA118_0 <= KW_VALIDATE)||LA118_0==KW_VALUE_TYPE||(LA118_0 >= KW_VECTORIZATION && LA118_0 <= KW_WEEK)||LA118_0==KW_WHILE||(LA118_0 >= KW_WORK && LA118_0 <= KW_YEAR)||LA118_0==KW_BATCH||LA118_0==KW_DAYOFWEEK||LA118_0==KW_HOLD_DDLTIME||LA118_0==KW_IGNORE||LA118_0==KW_NO_DROP||LA118_0==KW_OFFLINE||LA118_0==KW_PROTECTION||LA118_0==KW_READONLY) ) {
				alt118=1;
			}
			switch (alt118) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:33: extColumnName
					{
					pushFollow(FOLLOW_extColumnName_in_tabPartColTypeExpr7304);
					extColumnName421=extColumnName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_extColumnName.add(extColumnName421.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tableName, extColumnName, partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1499:48: -> ^( TOK_TABTYPE tableName ( partitionSpec )? ( extColumnName )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:51: ^( TOK_TABTYPE tableName ( partitionSpec )? ( extColumnName )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABTYPE, "TOK_TABTYPE"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:75: ( partitionSpec )?
				if ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1499:90: ( extColumnName )?
				if ( stream_extColumnName.hasNext() ) {
					adaptor.addChild(root_1, stream_extColumnName.nextTree());
				}
				stream_extColumnName.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tabPartColTypeExpr"


	public static class descStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "descStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1502:1: descStatement : ( KW_DESCRIBE | KW_DESC ) ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) ( KW_EXTENDED )? (dbName= identifier ) -> ^( TOK_DESCDATABASE $dbName ( KW_EXTENDED )? ) | ( KW_FUNCTION )=> KW_FUNCTION ( KW_EXTENDED )? (name= descFuncNames ) -> ^( TOK_DESCFUNCTION $name ( KW_EXTENDED )? ) | ( KW_FORMATTED | KW_EXTENDED | KW_PRETTY )=> ( (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr ) -> ^( TOK_DESCTABLE $parttype $descOptions) |parttype= tabPartColTypeExpr -> ^( TOK_DESCTABLE $parttype) ) ;
	public final HiveParser.descStatement_return descStatement() throws RecognitionException {
		HiveParser.descStatement_return retval = new HiveParser.descStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token descOptions=null;
		Token KW_DESCRIBE422=null;
		Token KW_DESC423=null;
		Token KW_DATABASE424=null;
		Token KW_SCHEMA425=null;
		Token KW_EXTENDED426=null;
		Token KW_FUNCTION427=null;
		Token KW_EXTENDED428=null;
		ParserRuleReturnScope dbName =null;
		ParserRuleReturnScope name =null;
		ParserRuleReturnScope parttype =null;

		ASTNode descOptions_tree=null;
		ASTNode KW_DESCRIBE422_tree=null;
		ASTNode KW_DESC423_tree=null;
		ASTNode KW_DATABASE424_tree=null;
		ASTNode KW_SCHEMA425_tree=null;
		ASTNode KW_EXTENDED426_tree=null;
		ASTNode KW_FUNCTION427_tree=null;
		ASTNode KW_EXTENDED428_tree=null;
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_PRETTY=new RewriteRuleTokenStream(adaptor,"token KW_PRETTY");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_KW_EXTENDED=new RewriteRuleTokenStream(adaptor,"token KW_EXTENDED");
		RewriteRuleTokenStream stream_KW_DESC=new RewriteRuleTokenStream(adaptor,"token KW_DESC");
		RewriteRuleTokenStream stream_KW_FUNCTION=new RewriteRuleTokenStream(adaptor,"token KW_FUNCTION");
		RewriteRuleTokenStream stream_KW_FORMATTED=new RewriteRuleTokenStream(adaptor,"token KW_FORMATTED");
		RewriteRuleTokenStream stream_KW_DESCRIBE=new RewriteRuleTokenStream(adaptor,"token KW_DESCRIBE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_tabPartColTypeExpr=new RewriteRuleSubtreeStream(adaptor,"rule tabPartColTypeExpr");
		RewriteRuleSubtreeStream stream_descFuncNames=new RewriteRuleSubtreeStream(adaptor,"rule descFuncNames");

		 pushMsg("describe statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1505:5: ( ( KW_DESCRIBE | KW_DESC ) ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) ( KW_EXTENDED )? (dbName= identifier ) -> ^( TOK_DESCDATABASE $dbName ( KW_EXTENDED )? ) | ( KW_FUNCTION )=> KW_FUNCTION ( KW_EXTENDED )? (name= descFuncNames ) -> ^( TOK_DESCFUNCTION $name ( KW_EXTENDED )? ) | ( KW_FORMATTED | KW_EXTENDED | KW_PRETTY )=> ( (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr ) -> ^( TOK_DESCTABLE $parttype $descOptions) |parttype= tabPartColTypeExpr -> ^( TOK_DESCTABLE $parttype) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1506:5: ( KW_DESCRIBE | KW_DESC ) ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) ( KW_EXTENDED )? (dbName= identifier ) -> ^( TOK_DESCDATABASE $dbName ( KW_EXTENDED )? ) | ( KW_FUNCTION )=> KW_FUNCTION ( KW_EXTENDED )? (name= descFuncNames ) -> ^( TOK_DESCFUNCTION $name ( KW_EXTENDED )? ) | ( KW_FORMATTED | KW_EXTENDED | KW_PRETTY )=> ( (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr ) -> ^( TOK_DESCTABLE $parttype $descOptions) |parttype= tabPartColTypeExpr -> ^( TOK_DESCTABLE $parttype) )
			{
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1506:5: ( KW_DESCRIBE | KW_DESC )
			int alt119=2;
			int LA119_0 = input.LA(1);
			if ( (LA119_0==KW_DESCRIBE) ) {
				alt119=1;
			}
			else if ( (LA119_0==KW_DESC) ) {
				alt119=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 119, 0, input);
				throw nvae;
			}

			switch (alt119) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1506:6: KW_DESCRIBE
					{
					KW_DESCRIBE422=(Token)match(input,KW_DESCRIBE,FOLLOW_KW_DESCRIBE_in_descStatement7351); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DESCRIBE.add(KW_DESCRIBE422);

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1506:18: KW_DESC
					{
					KW_DESC423=(Token)match(input,KW_DESC,FOLLOW_KW_DESC_in_descStatement7353); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DESC.add(KW_DESC423);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1507:5: ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) ( KW_EXTENDED )? (dbName= identifier ) -> ^( TOK_DESCDATABASE $dbName ( KW_EXTENDED )? ) | ( KW_FUNCTION )=> KW_FUNCTION ( KW_EXTENDED )? (name= descFuncNames ) -> ^( TOK_DESCFUNCTION $name ( KW_EXTENDED )? ) | ( KW_FORMATTED | KW_EXTENDED | KW_PRETTY )=> ( (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr ) -> ^( TOK_DESCTABLE $parttype $descOptions) |parttype= tabPartColTypeExpr -> ^( TOK_DESCTABLE $parttype) )
			int alt124=4;
			int LA124_0 = input.LA(1);
			if ( (LA124_0==KW_DATABASE) && (synpred7_HiveParser())) {
				alt124=1;
			}
			else if ( (LA124_0==KW_SCHEMA) ) {
				int LA124_2 = input.LA(2);
				if ( (LA124_2==KW_EXTENDED) && (synpred7_HiveParser())) {
					alt124=1;
				}
				else if ( (LA124_2==Identifier) ) {
					int LA124_10 = input.LA(3);
					if ( (synpred7_HiveParser()) ) {
						alt124=1;
					}
					else if ( (true) ) {
						alt124=4;
					}

				}
				else if ( ((LA124_2 >= KW_ABORT && LA124_2 <= KW_AFTER)||LA124_2==KW_ANALYZE||LA124_2==KW_ARCHIVE||LA124_2==KW_ASC||(LA124_2 >= KW_AUTOCOMMIT && LA124_2 <= KW_BEFORE)||(LA124_2 >= KW_BUCKET && LA124_2 <= KW_BUCKETS)||(LA124_2 >= KW_CACHE && LA124_2 <= KW_CASCADE)||LA124_2==KW_CHANGE||(LA124_2 >= KW_CLUSTER && LA124_2 <= KW_COLLECTION)||(LA124_2 >= KW_COLUMNS && LA124_2 <= KW_COMMENT)||(LA124_2 >= KW_COMPACT && LA124_2 <= KW_CONCATENATE)||LA124_2==KW_CONTINUE||LA124_2==KW_DATA||LA124_2==KW_DATABASES||(LA124_2 >= KW_DATETIME && LA124_2 <= KW_DBPROPERTIES)||(LA124_2 >= KW_DEFERRED && LA124_2 <= KW_DEFINED)||(LA124_2 >= KW_DELIMITED && LA124_2 <= KW_DESC)||(LA124_2 >= KW_DETAIL && LA124_2 <= KW_DISABLE)||LA124_2==KW_DISTRIBUTE||LA124_2==KW_DOW||(LA124_2 >= KW_DUMP && LA124_2 <= KW_ELEM_TYPE)||LA124_2==KW_ENABLE||LA124_2==KW_ESCAPED||LA124_2==KW_EXCLUSIVE||(LA124_2 >= KW_EXPLAIN && LA124_2 <= KW_EXPRESSION)||(LA124_2 >= KW_FIELDS && LA124_2 <= KW_FIRST)||(LA124_2 >= KW_FORMAT && LA124_2 <= KW_FORMATTED)||LA124_2==KW_FUNCTIONS||(LA124_2 >= KW_HOUR && LA124_2 <= KW_IDXPROPERTIES)||(LA124_2 >= KW_INDEX && LA124_2 <= KW_INDEXES)||(LA124_2 >= KW_INPATH && LA124_2 <= KW_INPUTFORMAT)||(LA124_2 >= KW_ISOLATION && LA124_2 <= KW_JAR)||(LA124_2 >= KW_KEY && LA124_2 <= KW_LAST)||LA124_2==KW_LEVEL||(LA124_2 >= KW_LIMIT && LA124_2 <= KW_LOAD)||(LA124_2 >= KW_LOCATION && LA124_2 <= KW_LONG)||(LA124_2 >= KW_MAPJOIN && LA124_2 <= KW_MATERIALIZED)||LA124_2==KW_METADATA||(LA124_2 >= KW_MINUTE && LA124_2 <= KW_MONTH)||LA124_2==KW_MSCK||(LA124_2 >= KW_NORELY && LA124_2 <= KW_NOSCAN)||LA124_2==KW_NOVALIDATE||LA124_2==KW_NULLS||LA124_2==KW_OFFSET||(LA124_2 >= KW_OPERATOR && LA124_2 <= KW_OPTION)||(LA124_2 >= KW_OUTPUTDRIVER && LA124_2 <= KW_OUTPUTFORMAT)||(LA124_2 >= KW_OVERWRITE && LA124_2 <= KW_OWNER)||(LA124_2 >= KW_PARTITIONED && LA124_2 <= KW_PARTITIONS)||LA124_2==KW_PLUS||LA124_2==KW_PRETTY||LA124_2==KW_PRINCIPALS||(LA124_2 >= KW_PURGE && LA124_2 <= KW_QUARTER)||LA124_2==KW_READ||(LA124_2 >= KW_REBUILD && LA124_2 <= KW_RECORDWRITER)||(LA124_2 >= KW_RELOAD && LA124_2 <= KW_RESTRICT)||LA124_2==KW_REWRITE||(LA124_2 >= KW_ROLE && LA124_2 <= KW_ROLES)||(LA124_2 >= KW_SCHEMA && LA124_2 <= KW_SECOND)||(LA124_2 >= KW_SEMI && LA124_2 <= KW_SERVER)||(LA124_2 >= KW_SETS && LA124_2 <= KW_SKEWED)||(LA124_2 >= KW_SNAPSHOT && LA124_2 <= KW_SSL)||(LA124_2 >= KW_STATISTICS && LA124_2 <= KW_SUMMARY)||LA124_2==KW_TABLES||(LA124_2 >= KW_TBLPROPERTIES && LA124_2 <= KW_TERMINATED)||LA124_2==KW_TINYINT||(LA124_2 >= KW_TOUCH && LA124_2 <= KW_TRANSACTIONS)||LA124_2==KW_UNARCHIVE||LA124_2==KW_UNDO||LA124_2==KW_UNIONTYPE||(LA124_2 >= KW_UNLOCK && LA124_2 <= KW_UNSIGNED)||(LA124_2 >= KW_URI && LA124_2 <= KW_USE)||(LA124_2 >= KW_UTC && LA124_2 <= KW_VALIDATE)||LA124_2==KW_VALUE_TYPE||(LA124_2 >= KW_VECTORIZATION && LA124_2 <= KW_WEEK)||LA124_2==KW_WHILE||(LA124_2 >= KW_WORK && LA124_2 <= KW_YEAR)||LA124_2==KW_BATCH||LA124_2==KW_DAYOFWEEK||LA124_2==KW_HOLD_DDLTIME||LA124_2==KW_IGNORE||LA124_2==KW_NO_DROP||LA124_2==KW_OFFLINE||LA124_2==KW_PROTECTION||LA124_2==KW_READONLY) ) {
					int LA124_11 = input.LA(3);
					if ( (synpred7_HiveParser()) ) {
						alt124=1;
					}
					else if ( (true) ) {
						alt124=4;
					}

				}
				else if ( (LA124_2==EOF||LA124_2==DOT||LA124_2==KW_PARTITION) ) {
					alt124=4;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 124, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}
			else if ( (LA124_0==KW_FUNCTION) && (synpred8_HiveParser())) {
				alt124=2;
			}
			else if ( (LA124_0==KW_FORMATTED) ) {
				switch ( input.LA(2) ) {
				case Identifier:
					{
					int LA124_15 = input.LA(3);
					if ( (synpred9_HiveParser()) ) {
						alt124=3;
					}
					else if ( (true) ) {
						alt124=4;
					}

					}
					break;
				case KW_ABORT:
				case KW_ADD:
				case KW_ADMIN:
				case KW_AFTER:
				case KW_ANALYZE:
				case KW_ARCHIVE:
				case KW_ASC:
				case KW_AUTOCOMMIT:
				case KW_BEFORE:
				case KW_BUCKET:
				case KW_BUCKETS:
				case KW_CACHE:
				case KW_CASCADE:
				case KW_CHANGE:
				case KW_CLUSTER:
				case KW_CLUSTERED:
				case KW_CLUSTERSTATUS:
				case KW_COLLECTION:
				case KW_COLUMNS:
				case KW_COMMENT:
				case KW_COMPACT:
				case KW_COMPACTIONS:
				case KW_COMPUTE:
				case KW_CONCATENATE:
				case KW_CONTINUE:
				case KW_DATA:
				case KW_DATABASES:
				case KW_DATETIME:
				case KW_DAY:
				case KW_DBPROPERTIES:
				case KW_DEFERRED:
				case KW_DEFINED:
				case KW_DELIMITED:
				case KW_DEPENDENCY:
				case KW_DESC:
				case KW_DETAIL:
				case KW_DIRECTORIES:
				case KW_DIRECTORY:
				case KW_DISABLE:
				case KW_DISTRIBUTE:
				case KW_DOW:
				case KW_DUMP:
				case KW_ELEM_TYPE:
				case KW_ENABLE:
				case KW_ESCAPED:
				case KW_EXCLUSIVE:
				case KW_EXPLAIN:
				case KW_EXPORT:
				case KW_EXPRESSION:
				case KW_FIELDS:
				case KW_FILE:
				case KW_FILEFORMAT:
				case KW_FIRST:
				case KW_FORMAT:
				case KW_FORMATTED:
				case KW_FUNCTIONS:
				case KW_HOUR:
				case KW_IDXPROPERTIES:
				case KW_INDEX:
				case KW_INDEXES:
				case KW_INPATH:
				case KW_INPUTDRIVER:
				case KW_INPUTFORMAT:
				case KW_ISOLATION:
				case KW_ITEMS:
				case KW_JAR:
				case KW_KEY:
				case KW_KEYS:
				case KW_KEY_TYPE:
				case KW_LAST:
				case KW_LEVEL:
				case KW_LIMIT:
				case KW_LINES:
				case KW_LOAD:
				case KW_LOCATION:
				case KW_LOCK:
				case KW_LOCKS:
				case KW_LOGICAL:
				case KW_LONG:
				case KW_MAPJOIN:
				case KW_MATCHED:
				case KW_MATERIALIZED:
				case KW_METADATA:
				case KW_MINUTE:
				case KW_MONTH:
				case KW_MSCK:
				case KW_NORELY:
				case KW_NOSCAN:
				case KW_NOVALIDATE:
				case KW_NULLS:
				case KW_OFFSET:
				case KW_OPERATOR:
				case KW_OPTION:
				case KW_OUTPUTDRIVER:
				case KW_OUTPUTFORMAT:
				case KW_OVERWRITE:
				case KW_OWNER:
				case KW_PARTITIONED:
				case KW_PARTITIONS:
				case KW_PLUS:
				case KW_PRETTY:
				case KW_PRINCIPALS:
				case KW_PURGE:
				case KW_QUARTER:
				case KW_READ:
				case KW_REBUILD:
				case KW_RECORDREADER:
				case KW_RECORDWRITER:
				case KW_RELOAD:
				case KW_RELY:
				case KW_RENAME:
				case KW_REPAIR:
				case KW_REPL:
				case KW_REPLACE:
				case KW_REPLICATION:
				case KW_RESTRICT:
				case KW_REWRITE:
				case KW_ROLE:
				case KW_ROLES:
				case KW_SCHEMA:
				case KW_SCHEMAS:
				case KW_SECOND:
				case KW_SEMI:
				case KW_SERDE:
				case KW_SERDEPROPERTIES:
				case KW_SERVER:
				case KW_SETS:
				case KW_SHARED:
				case KW_SHOW:
				case KW_SHOW_DATABASE:
				case KW_SKEWED:
				case KW_SNAPSHOT:
				case KW_SORT:
				case KW_SORTED:
				case KW_SSL:
				case KW_STATISTICS:
				case KW_STATUS:
				case KW_STORED:
				case KW_STREAMTABLE:
				case KW_STRING:
				case KW_STRUCT:
				case KW_SUMMARY:
				case KW_TABLES:
				case KW_TBLPROPERTIES:
				case KW_TEMPORARY:
				case KW_TERMINATED:
				case KW_TINYINT:
				case KW_TOUCH:
				case KW_TRANSACTION:
				case KW_TRANSACTIONS:
				case KW_UNARCHIVE:
				case KW_UNDO:
				case KW_UNIONTYPE:
				case KW_UNLOCK:
				case KW_UNSET:
				case KW_UNSIGNED:
				case KW_URI:
				case KW_USE:
				case KW_UTC:
				case KW_UTCTIMESTAMP:
				case KW_VALIDATE:
				case KW_VALUE_TYPE:
				case KW_VECTORIZATION:
				case KW_VIEW:
				case KW_VIEWS:
				case KW_WAIT:
				case KW_WEEK:
				case KW_WHILE:
				case KW_WORK:
				case KW_WRITE:
				case KW_YEAR:
				case KW_BATCH:
				case KW_DAYOFWEEK:
				case KW_HOLD_DDLTIME:
				case KW_IGNORE:
				case KW_NO_DROP:
				case KW_OFFLINE:
				case KW_PROTECTION:
				case KW_READONLY:
					{
					int LA124_16 = input.LA(3);
					if ( (synpred9_HiveParser()) ) {
						alt124=3;
					}
					else if ( (true) ) {
						alt124=4;
					}

					}
					break;
				case EOF:
				case DOT:
				case KW_PARTITION:
					{
					alt124=4;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 124, 4, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
			}
			else if ( (LA124_0==KW_EXTENDED) && (synpred9_HiveParser())) {
				alt124=3;
			}
			else if ( (LA124_0==KW_PRETTY) ) {
				switch ( input.LA(2) ) {
				case Identifier:
					{
					int LA124_20 = input.LA(3);
					if ( (synpred9_HiveParser()) ) {
						alt124=3;
					}
					else if ( (true) ) {
						alt124=4;
					}

					}
					break;
				case KW_ABORT:
				case KW_ADD:
				case KW_ADMIN:
				case KW_AFTER:
				case KW_ANALYZE:
				case KW_ARCHIVE:
				case KW_ASC:
				case KW_AUTOCOMMIT:
				case KW_BEFORE:
				case KW_BUCKET:
				case KW_BUCKETS:
				case KW_CACHE:
				case KW_CASCADE:
				case KW_CHANGE:
				case KW_CLUSTER:
				case KW_CLUSTERED:
				case KW_CLUSTERSTATUS:
				case KW_COLLECTION:
				case KW_COLUMNS:
				case KW_COMMENT:
				case KW_COMPACT:
				case KW_COMPACTIONS:
				case KW_COMPUTE:
				case KW_CONCATENATE:
				case KW_CONTINUE:
				case KW_DATA:
				case KW_DATABASES:
				case KW_DATETIME:
				case KW_DAY:
				case KW_DBPROPERTIES:
				case KW_DEFERRED:
				case KW_DEFINED:
				case KW_DELIMITED:
				case KW_DEPENDENCY:
				case KW_DESC:
				case KW_DETAIL:
				case KW_DIRECTORIES:
				case KW_DIRECTORY:
				case KW_DISABLE:
				case KW_DISTRIBUTE:
				case KW_DOW:
				case KW_DUMP:
				case KW_ELEM_TYPE:
				case KW_ENABLE:
				case KW_ESCAPED:
				case KW_EXCLUSIVE:
				case KW_EXPLAIN:
				case KW_EXPORT:
				case KW_EXPRESSION:
				case KW_FIELDS:
				case KW_FILE:
				case KW_FILEFORMAT:
				case KW_FIRST:
				case KW_FORMAT:
				case KW_FORMATTED:
				case KW_FUNCTIONS:
				case KW_HOUR:
				case KW_IDXPROPERTIES:
				case KW_INDEX:
				case KW_INDEXES:
				case KW_INPATH:
				case KW_INPUTDRIVER:
				case KW_INPUTFORMAT:
				case KW_ISOLATION:
				case KW_ITEMS:
				case KW_JAR:
				case KW_KEY:
				case KW_KEYS:
				case KW_KEY_TYPE:
				case KW_LAST:
				case KW_LEVEL:
				case KW_LIMIT:
				case KW_LINES:
				case KW_LOAD:
				case KW_LOCATION:
				case KW_LOCK:
				case KW_LOCKS:
				case KW_LOGICAL:
				case KW_LONG:
				case KW_MAPJOIN:
				case KW_MATCHED:
				case KW_MATERIALIZED:
				case KW_METADATA:
				case KW_MINUTE:
				case KW_MONTH:
				case KW_MSCK:
				case KW_NORELY:
				case KW_NOSCAN:
				case KW_NOVALIDATE:
				case KW_NULLS:
				case KW_OFFSET:
				case KW_OPERATOR:
				case KW_OPTION:
				case KW_OUTPUTDRIVER:
				case KW_OUTPUTFORMAT:
				case KW_OVERWRITE:
				case KW_OWNER:
				case KW_PARTITIONED:
				case KW_PARTITIONS:
				case KW_PLUS:
				case KW_PRETTY:
				case KW_PRINCIPALS:
				case KW_PURGE:
				case KW_QUARTER:
				case KW_READ:
				case KW_REBUILD:
				case KW_RECORDREADER:
				case KW_RECORDWRITER:
				case KW_RELOAD:
				case KW_RELY:
				case KW_RENAME:
				case KW_REPAIR:
				case KW_REPL:
				case KW_REPLACE:
				case KW_REPLICATION:
				case KW_RESTRICT:
				case KW_REWRITE:
				case KW_ROLE:
				case KW_ROLES:
				case KW_SCHEMA:
				case KW_SCHEMAS:
				case KW_SECOND:
				case KW_SEMI:
				case KW_SERDE:
				case KW_SERDEPROPERTIES:
				case KW_SERVER:
				case KW_SETS:
				case KW_SHARED:
				case KW_SHOW:
				case KW_SHOW_DATABASE:
				case KW_SKEWED:
				case KW_SNAPSHOT:
				case KW_SORT:
				case KW_SORTED:
				case KW_SSL:
				case KW_STATISTICS:
				case KW_STATUS:
				case KW_STORED:
				case KW_STREAMTABLE:
				case KW_STRING:
				case KW_STRUCT:
				case KW_SUMMARY:
				case KW_TABLES:
				case KW_TBLPROPERTIES:
				case KW_TEMPORARY:
				case KW_TERMINATED:
				case KW_TINYINT:
				case KW_TOUCH:
				case KW_TRANSACTION:
				case KW_TRANSACTIONS:
				case KW_UNARCHIVE:
				case KW_UNDO:
				case KW_UNIONTYPE:
				case KW_UNLOCK:
				case KW_UNSET:
				case KW_UNSIGNED:
				case KW_URI:
				case KW_USE:
				case KW_UTC:
				case KW_UTCTIMESTAMP:
				case KW_VALIDATE:
				case KW_VALUE_TYPE:
				case KW_VECTORIZATION:
				case KW_VIEW:
				case KW_VIEWS:
				case KW_WAIT:
				case KW_WEEK:
				case KW_WHILE:
				case KW_WORK:
				case KW_WRITE:
				case KW_YEAR:
				case KW_BATCH:
				case KW_DAYOFWEEK:
				case KW_HOLD_DDLTIME:
				case KW_IGNORE:
				case KW_NO_DROP:
				case KW_OFFLINE:
				case KW_PROTECTION:
				case KW_READONLY:
					{
					int LA124_21 = input.LA(3);
					if ( (synpred9_HiveParser()) ) {
						alt124=3;
					}
					else if ( (true) ) {
						alt124=4;
					}

					}
					break;
				case EOF:
				case DOT:
				case KW_PARTITION:
					{
					alt124=4;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 124, 6, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
			}
			else if ( (LA124_0==Identifier||(LA124_0 >= KW_ABORT && LA124_0 <= KW_AFTER)||LA124_0==KW_ANALYZE||LA124_0==KW_ARCHIVE||LA124_0==KW_ASC||(LA124_0 >= KW_AUTOCOMMIT && LA124_0 <= KW_BEFORE)||(LA124_0 >= KW_BUCKET && LA124_0 <= KW_BUCKETS)||(LA124_0 >= KW_CACHE && LA124_0 <= KW_CASCADE)||LA124_0==KW_CHANGE||(LA124_0 >= KW_CLUSTER && LA124_0 <= KW_COLLECTION)||(LA124_0 >= KW_COLUMNS && LA124_0 <= KW_COMMENT)||(LA124_0 >= KW_COMPACT && LA124_0 <= KW_CONCATENATE)||LA124_0==KW_CONTINUE||LA124_0==KW_DATA||LA124_0==KW_DATABASES||(LA124_0 >= KW_DATETIME && LA124_0 <= KW_DBPROPERTIES)||(LA124_0 >= KW_DEFERRED && LA124_0 <= KW_DEFINED)||(LA124_0 >= KW_DELIMITED && LA124_0 <= KW_DESC)||(LA124_0 >= KW_DETAIL && LA124_0 <= KW_DISABLE)||LA124_0==KW_DISTRIBUTE||LA124_0==KW_DOW||(LA124_0 >= KW_DUMP && LA124_0 <= KW_ELEM_TYPE)||LA124_0==KW_ENABLE||LA124_0==KW_ESCAPED||LA124_0==KW_EXCLUSIVE||(LA124_0 >= KW_EXPLAIN && LA124_0 <= KW_EXPRESSION)||(LA124_0 >= KW_FIELDS && LA124_0 <= KW_FIRST)||LA124_0==KW_FORMAT||LA124_0==KW_FUNCTIONS||(LA124_0 >= KW_HOUR && LA124_0 <= KW_IDXPROPERTIES)||(LA124_0 >= KW_INDEX && LA124_0 <= KW_INDEXES)||(LA124_0 >= KW_INPATH && LA124_0 <= KW_INPUTFORMAT)||(LA124_0 >= KW_ISOLATION && LA124_0 <= KW_JAR)||(LA124_0 >= KW_KEY && LA124_0 <= KW_LAST)||LA124_0==KW_LEVEL||(LA124_0 >= KW_LIMIT && LA124_0 <= KW_LOAD)||(LA124_0 >= KW_LOCATION && LA124_0 <= KW_LONG)||(LA124_0 >= KW_MAPJOIN && LA124_0 <= KW_MATERIALIZED)||LA124_0==KW_METADATA||(LA124_0 >= KW_MINUTE && LA124_0 <= KW_MONTH)||LA124_0==KW_MSCK||(LA124_0 >= KW_NORELY && LA124_0 <= KW_NOSCAN)||LA124_0==KW_NOVALIDATE||LA124_0==KW_NULLS||LA124_0==KW_OFFSET||(LA124_0 >= KW_OPERATOR && LA124_0 <= KW_OPTION)||(LA124_0 >= KW_OUTPUTDRIVER && LA124_0 <= KW_OUTPUTFORMAT)||(LA124_0 >= KW_OVERWRITE && LA124_0 <= KW_OWNER)||(LA124_0 >= KW_PARTITIONED && LA124_0 <= KW_PARTITIONS)||LA124_0==KW_PLUS||LA124_0==KW_PRINCIPALS||(LA124_0 >= KW_PURGE && LA124_0 <= KW_QUARTER)||LA124_0==KW_READ||(LA124_0 >= KW_REBUILD && LA124_0 <= KW_RECORDWRITER)||(LA124_0 >= KW_RELOAD && LA124_0 <= KW_RESTRICT)||LA124_0==KW_REWRITE||(LA124_0 >= KW_ROLE && LA124_0 <= KW_ROLES)||(LA124_0 >= KW_SCHEMAS && LA124_0 <= KW_SECOND)||(LA124_0 >= KW_SEMI && LA124_0 <= KW_SERVER)||(LA124_0 >= KW_SETS && LA124_0 <= KW_SKEWED)||(LA124_0 >= KW_SNAPSHOT && LA124_0 <= KW_SSL)||(LA124_0 >= KW_STATISTICS && LA124_0 <= KW_SUMMARY)||LA124_0==KW_TABLES||(LA124_0 >= KW_TBLPROPERTIES && LA124_0 <= KW_TERMINATED)||LA124_0==KW_TINYINT||(LA124_0 >= KW_TOUCH && LA124_0 <= KW_TRANSACTIONS)||LA124_0==KW_UNARCHIVE||LA124_0==KW_UNDO||LA124_0==KW_UNIONTYPE||(LA124_0 >= KW_UNLOCK && LA124_0 <= KW_UNSIGNED)||(LA124_0 >= KW_URI && LA124_0 <= KW_USE)||(LA124_0 >= KW_UTC && LA124_0 <= KW_VALIDATE)||LA124_0==KW_VALUE_TYPE||(LA124_0 >= KW_VECTORIZATION && LA124_0 <= KW_WEEK)||LA124_0==KW_WHILE||(LA124_0 >= KW_WORK && LA124_0 <= KW_YEAR)||LA124_0==KW_BATCH||LA124_0==KW_DAYOFWEEK||LA124_0==KW_HOLD_DDLTIME||LA124_0==KW_IGNORE||LA124_0==KW_NO_DROP||LA124_0==KW_OFFLINE||LA124_0==KW_PROTECTION||LA124_0==KW_READONLY) ) {
				alt124=4;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 124, 0, input);
				throw nvae;
			}

			switch (alt124) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:5: ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) ( KW_EXTENDED )? (dbName= identifier )
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:32: ( KW_DATABASE | KW_SCHEMA )
					int alt120=2;
					int LA120_0 = input.LA(1);
					if ( (LA120_0==KW_DATABASE) ) {
						alt120=1;
					}
					else if ( (LA120_0==KW_SCHEMA) ) {
						alt120=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 120, 0, input);
						throw nvae;
					}

					switch (alt120) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:33: KW_DATABASE
							{
							KW_DATABASE424=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_descStatement7375); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE424);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:45: KW_SCHEMA
							{
							KW_SCHEMA425=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_descStatement7377); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA425);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:56: ( KW_EXTENDED )?
					int alt121=2;
					int LA121_0 = input.LA(1);
					if ( (LA121_0==KW_EXTENDED) ) {
						alt121=1;
					}
					switch (alt121) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:56: KW_EXTENDED
							{
							KW_EXTENDED426=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_descStatement7380); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_EXTENDED.add(KW_EXTENDED426);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:69: (dbName= identifier )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:70: dbName= identifier
					{
					pushFollow(FOLLOW_identifier_in_descStatement7386);
					dbName=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(dbName.getTree());
					}

					// AST REWRITE
					// elements: KW_EXTENDED, dbName
					// token labels: 
					// rule labels: dbName, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_dbName=new RewriteRuleSubtreeStream(adaptor,"rule dbName",dbName!=null?dbName.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1508:89: -> ^( TOK_DESCDATABASE $dbName ( KW_EXTENDED )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:92: ^( TOK_DESCDATABASE $dbName ( KW_EXTENDED )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESCDATABASE, "TOK_DESCDATABASE"), root_1);
						adaptor.addChild(root_1, stream_dbName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:119: ( KW_EXTENDED )?
						if ( stream_KW_EXTENDED.hasNext() ) {
							adaptor.addChild(root_1, stream_KW_EXTENDED.nextNode());
						}
						stream_KW_EXTENDED.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:5: ( KW_FUNCTION )=> KW_FUNCTION ( KW_EXTENDED )? (name= descFuncNames )
					{
					KW_FUNCTION427=(Token)match(input,KW_FUNCTION,FOLLOW_KW_FUNCTION_in_descStatement7417); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_FUNCTION.add(KW_FUNCTION427);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:34: ( KW_EXTENDED )?
					int alt122=2;
					int LA122_0 = input.LA(1);
					if ( (LA122_0==KW_EXTENDED) ) {
						alt122=1;
					}
					switch (alt122) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:34: KW_EXTENDED
							{
							KW_EXTENDED428=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_descStatement7419); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_EXTENDED.add(KW_EXTENDED428);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:47: (name= descFuncNames )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:48: name= descFuncNames
					{
					pushFollow(FOLLOW_descFuncNames_in_descStatement7425);
					name=descFuncNames();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_descFuncNames.add(name.getTree());
					}

					// AST REWRITE
					// elements: name, KW_EXTENDED
					// token labels: 
					// rule labels: name, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name",name!=null?name.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1510:68: -> ^( TOK_DESCFUNCTION $name ( KW_EXTENDED )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:71: ^( TOK_DESCFUNCTION $name ( KW_EXTENDED )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESCFUNCTION, "TOK_DESCFUNCTION"), root_1);
						adaptor.addChild(root_1, stream_name.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:96: ( KW_EXTENDED )?
						if ( stream_KW_EXTENDED.hasNext() ) {
							adaptor.addChild(root_1, stream_KW_EXTENDED.nextNode());
						}
						stream_KW_EXTENDED.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:5: ( KW_FORMATTED | KW_EXTENDED | KW_PRETTY )=> ( (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr )
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:45: ( (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:46: (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY ) parttype= tabPartColTypeExpr
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:46: (descOptions= KW_FORMATTED |descOptions= KW_EXTENDED |descOptions= KW_PRETTY )
					int alt123=3;
					switch ( input.LA(1) ) {
					case KW_FORMATTED:
						{
						alt123=1;
						}
						break;
					case KW_EXTENDED:
						{
						alt123=2;
						}
						break;
					case KW_PRETTY:
						{
						alt123=3;
						}
						break;
					default:
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 123, 0, input);
						throw nvae;
					}
					switch (alt123) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:47: descOptions= KW_FORMATTED
							{
							descOptions=(Token)match(input,KW_FORMATTED,FOLLOW_KW_FORMATTED_in_descStatement7464); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_FORMATTED.add(descOptions);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:72: descOptions= KW_EXTENDED
							{
							descOptions=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_descStatement7468); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_EXTENDED.add(descOptions);

							}
							break;
						case 3 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:96: descOptions= KW_PRETTY
							{
							descOptions=(Token)match(input,KW_PRETTY,FOLLOW_KW_PRETTY_in_descStatement7472); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_PRETTY.add(descOptions);

							}
							break;

					}

					pushFollow(FOLLOW_tabPartColTypeExpr_in_descStatement7477);
					parttype=tabPartColTypeExpr();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tabPartColTypeExpr.add(parttype.getTree());
					}

					// AST REWRITE
					// elements: descOptions, parttype
					// token labels: descOptions
					// rule labels: parttype, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_descOptions=new RewriteRuleTokenStream(adaptor,"token descOptions",descOptions);
					RewriteRuleSubtreeStream stream_parttype=new RewriteRuleSubtreeStream(adaptor,"rule parttype",parttype!=null?parttype.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1512:148: -> ^( TOK_DESCTABLE $parttype $descOptions)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:151: ^( TOK_DESCTABLE $parttype $descOptions)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESCTABLE, "TOK_DESCTABLE"), root_1);
						adaptor.addChild(root_1, stream_parttype.nextTree());
						adaptor.addChild(root_1, stream_descOptions.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1514:5: parttype= tabPartColTypeExpr
					{
					pushFollow(FOLLOW_tabPartColTypeExpr_in_descStatement7504);
					parttype=tabPartColTypeExpr();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tabPartColTypeExpr.add(parttype.getTree());
					// AST REWRITE
					// elements: parttype
					// token labels: 
					// rule labels: parttype, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_parttype=new RewriteRuleSubtreeStream(adaptor,"rule parttype",parttype!=null?parttype.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1514:33: -> ^( TOK_DESCTABLE $parttype)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1514:36: ^( TOK_DESCTABLE $parttype)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESCTABLE, "TOK_DESCTABLE"), root_1);
						adaptor.addChild(root_1, stream_parttype.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "descStatement"


	public static class analyzeStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "analyzeStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1518:1: analyzeStatement : KW_ANALYZE KW_TABLE (parttype= tableOrPartition ) ( ( KW_COMPUTE )=> KW_COMPUTE KW_STATISTICS ( (noscan= KW_NOSCAN ) | (partialscan= KW_PARTIALSCAN ) | ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? ) )? -> ^( TOK_ANALYZE $parttype ( $noscan)? ( $partialscan)? ( KW_COLUMNS )? ( $statsColumnName)? ) | ( KW_CACHE )=> KW_CACHE KW_METADATA -> ^( TOK_CACHE_METADATA $parttype) ) ;
	public final HiveParser.analyzeStatement_return analyzeStatement() throws RecognitionException {
		HiveParser.analyzeStatement_return retval = new HiveParser.analyzeStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token noscan=null;
		Token partialscan=null;
		Token KW_ANALYZE429=null;
		Token KW_TABLE430=null;
		Token KW_COMPUTE431=null;
		Token KW_STATISTICS432=null;
		Token KW_FOR433=null;
		Token KW_COLUMNS434=null;
		Token KW_CACHE435=null;
		Token KW_METADATA436=null;
		ParserRuleReturnScope parttype =null;
		ParserRuleReturnScope statsColumnName =null;

		ASTNode noscan_tree=null;
		ASTNode partialscan_tree=null;
		ASTNode KW_ANALYZE429_tree=null;
		ASTNode KW_TABLE430_tree=null;
		ASTNode KW_COMPUTE431_tree=null;
		ASTNode KW_STATISTICS432_tree=null;
		ASTNode KW_FOR433_tree=null;
		ASTNode KW_COLUMNS434_tree=null;
		ASTNode KW_CACHE435_tree=null;
		ASTNode KW_METADATA436_tree=null;
		RewriteRuleTokenStream stream_KW_STATISTICS=new RewriteRuleTokenStream(adaptor,"token KW_STATISTICS");
		RewriteRuleTokenStream stream_KW_ANALYZE=new RewriteRuleTokenStream(adaptor,"token KW_ANALYZE");
		RewriteRuleTokenStream stream_KW_COLUMNS=new RewriteRuleTokenStream(adaptor,"token KW_COLUMNS");
		RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,"token KW_FOR");
		RewriteRuleTokenStream stream_KW_PARTIALSCAN=new RewriteRuleTokenStream(adaptor,"token KW_PARTIALSCAN");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_COMPUTE=new RewriteRuleTokenStream(adaptor,"token KW_COMPUTE");
		RewriteRuleTokenStream stream_KW_METADATA=new RewriteRuleTokenStream(adaptor,"token KW_METADATA");
		RewriteRuleTokenStream stream_KW_NOSCAN=new RewriteRuleTokenStream(adaptor,"token KW_NOSCAN");
		RewriteRuleTokenStream stream_KW_CACHE=new RewriteRuleTokenStream(adaptor,"token KW_CACHE");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");

		 pushMsg("analyze statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1521:5: ( KW_ANALYZE KW_TABLE (parttype= tableOrPartition ) ( ( KW_COMPUTE )=> KW_COMPUTE KW_STATISTICS ( (noscan= KW_NOSCAN ) | (partialscan= KW_PARTIALSCAN ) | ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? ) )? -> ^( TOK_ANALYZE $parttype ( $noscan)? ( $partialscan)? ( KW_COLUMNS )? ( $statsColumnName)? ) | ( KW_CACHE )=> KW_CACHE KW_METADATA -> ^( TOK_CACHE_METADATA $parttype) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1521:7: KW_ANALYZE KW_TABLE (parttype= tableOrPartition ) ( ( KW_COMPUTE )=> KW_COMPUTE KW_STATISTICS ( (noscan= KW_NOSCAN ) | (partialscan= KW_PARTIALSCAN ) | ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? ) )? -> ^( TOK_ANALYZE $parttype ( $noscan)? ( $partialscan)? ( KW_COLUMNS )? ( $statsColumnName)? ) | ( KW_CACHE )=> KW_CACHE KW_METADATA -> ^( TOK_CACHE_METADATA $parttype) )
			{
			KW_ANALYZE429=(Token)match(input,KW_ANALYZE,FOLLOW_KW_ANALYZE_in_analyzeStatement7546); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ANALYZE.add(KW_ANALYZE429);

			KW_TABLE430=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_analyzeStatement7548); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE430);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1521:27: (parttype= tableOrPartition )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1521:28: parttype= tableOrPartition
			{
			pushFollow(FOLLOW_tableOrPartition_in_analyzeStatement7553);
			parttype=tableOrPartition();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableOrPartition.add(parttype.getTree());
			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1522:7: ( ( KW_COMPUTE )=> KW_COMPUTE KW_STATISTICS ( (noscan= KW_NOSCAN ) | (partialscan= KW_PARTIALSCAN ) | ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? ) )? -> ^( TOK_ANALYZE $parttype ( $noscan)? ( $partialscan)? ( KW_COLUMNS )? ( $statsColumnName)? ) | ( KW_CACHE )=> KW_CACHE KW_METADATA -> ^( TOK_CACHE_METADATA $parttype) )
			int alt127=2;
			int LA127_0 = input.LA(1);
			if ( (LA127_0==KW_COMPUTE) && (synpred10_HiveParser())) {
				alt127=1;
			}
			else if ( (LA127_0==KW_CACHE) && (synpred11_HiveParser())) {
				alt127=2;
			}

			switch (alt127) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:7: ( KW_COMPUTE )=> KW_COMPUTE KW_STATISTICS ( (noscan= KW_NOSCAN ) | (partialscan= KW_PARTIALSCAN ) | ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? ) )?
					{
					KW_COMPUTE431=(Token)match(input,KW_COMPUTE,FOLLOW_KW_COMPUTE_in_analyzeStatement7576); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMPUTE.add(KW_COMPUTE431);

					KW_STATISTICS432=(Token)match(input,KW_STATISTICS,FOLLOW_KW_STATISTICS_in_analyzeStatement7578); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_STATISTICS.add(KW_STATISTICS432);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:48: ( (noscan= KW_NOSCAN ) | (partialscan= KW_PARTIALSCAN ) | ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? ) )?
					int alt126=4;
					switch ( input.LA(1) ) {
						case KW_NOSCAN:
							{
							alt126=1;
							}
							break;
						case KW_PARTIALSCAN:
							{
							alt126=2;
							}
							break;
						case KW_FOR:
							{
							alt126=3;
							}
							break;
					}
					switch (alt126) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:49: (noscan= KW_NOSCAN )
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:49: (noscan= KW_NOSCAN )
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:50: noscan= KW_NOSCAN
							{
							noscan=(Token)match(input,KW_NOSCAN,FOLLOW_KW_NOSCAN_in_analyzeStatement7584); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_NOSCAN.add(noscan);

							}

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:70: (partialscan= KW_PARTIALSCAN )
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:70: (partialscan= KW_PARTIALSCAN )
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:71: partialscan= KW_PARTIALSCAN
							{
							partialscan=(Token)match(input,KW_PARTIALSCAN,FOLLOW_KW_PARTIALSCAN_in_analyzeStatement7592); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_PARTIALSCAN.add(partialscan);

							}

							}
							break;
						case 3 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1524:57: ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? )
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1524:57: ( KW_FOR KW_COLUMNS (statsColumnName= columnNameList )? )
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1524:58: KW_FOR KW_COLUMNS (statsColumnName= columnNameList )?
							{
							KW_FOR433=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_analyzeStatement7652); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_FOR.add(KW_FOR433);

							KW_COLUMNS434=(Token)match(input,KW_COLUMNS,FOLLOW_KW_COLUMNS_in_analyzeStatement7654); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_COLUMNS.add(KW_COLUMNS434);

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1524:76: (statsColumnName= columnNameList )?
							int alt125=2;
							int LA125_0 = input.LA(1);
							if ( (LA125_0==Identifier||(LA125_0 >= KW_ABORT && LA125_0 <= KW_AFTER)||LA125_0==KW_ANALYZE||LA125_0==KW_ARCHIVE||LA125_0==KW_ASC||(LA125_0 >= KW_AUTOCOMMIT && LA125_0 <= KW_BEFORE)||(LA125_0 >= KW_BUCKET && LA125_0 <= KW_BUCKETS)||(LA125_0 >= KW_CACHE && LA125_0 <= KW_CASCADE)||LA125_0==KW_CHANGE||(LA125_0 >= KW_CLUSTER && LA125_0 <= KW_COLLECTION)||(LA125_0 >= KW_COLUMNS && LA125_0 <= KW_COMMENT)||(LA125_0 >= KW_COMPACT && LA125_0 <= KW_CONCATENATE)||LA125_0==KW_CONTINUE||LA125_0==KW_DATA||LA125_0==KW_DATABASES||(LA125_0 >= KW_DATETIME && LA125_0 <= KW_DBPROPERTIES)||(LA125_0 >= KW_DEFERRED && LA125_0 <= KW_DEFINED)||(LA125_0 >= KW_DELIMITED && LA125_0 <= KW_DESC)||(LA125_0 >= KW_DETAIL && LA125_0 <= KW_DISABLE)||LA125_0==KW_DISTRIBUTE||LA125_0==KW_DOW||(LA125_0 >= KW_DUMP && LA125_0 <= KW_ELEM_TYPE)||LA125_0==KW_ENABLE||LA125_0==KW_ESCAPED||LA125_0==KW_EXCLUSIVE||(LA125_0 >= KW_EXPLAIN && LA125_0 <= KW_EXPRESSION)||(LA125_0 >= KW_FIELDS && LA125_0 <= KW_FIRST)||(LA125_0 >= KW_FORMAT && LA125_0 <= KW_FORMATTED)||LA125_0==KW_FUNCTIONS||(LA125_0 >= KW_HOUR && LA125_0 <= KW_IDXPROPERTIES)||(LA125_0 >= KW_INDEX && LA125_0 <= KW_INDEXES)||(LA125_0 >= KW_INPATH && LA125_0 <= KW_INPUTFORMAT)||(LA125_0 >= KW_ISOLATION && LA125_0 <= KW_JAR)||(LA125_0 >= KW_KEY && LA125_0 <= KW_LAST)||LA125_0==KW_LEVEL||(LA125_0 >= KW_LIMIT && LA125_0 <= KW_LOAD)||(LA125_0 >= KW_LOCATION && LA125_0 <= KW_LONG)||(LA125_0 >= KW_MAPJOIN && LA125_0 <= KW_MATERIALIZED)||LA125_0==KW_METADATA||(LA125_0 >= KW_MINUTE && LA125_0 <= KW_MONTH)||LA125_0==KW_MSCK||(LA125_0 >= KW_NORELY && LA125_0 <= KW_NOSCAN)||LA125_0==KW_NOVALIDATE||LA125_0==KW_NULLS||LA125_0==KW_OFFSET||(LA125_0 >= KW_OPERATOR && LA125_0 <= KW_OPTION)||(LA125_0 >= KW_OUTPUTDRIVER && LA125_0 <= KW_OUTPUTFORMAT)||(LA125_0 >= KW_OVERWRITE && LA125_0 <= KW_OWNER)||(LA125_0 >= KW_PARTITIONED && LA125_0 <= KW_PARTITIONS)||LA125_0==KW_PLUS||LA125_0==KW_PRETTY||LA125_0==KW_PRINCIPALS||(LA125_0 >= KW_PURGE && LA125_0 <= KW_QUARTER)||LA125_0==KW_READ||(LA125_0 >= KW_REBUILD && LA125_0 <= KW_RECORDWRITER)||(LA125_0 >= KW_RELOAD && LA125_0 <= KW_RESTRICT)||LA125_0==KW_REWRITE||(LA125_0 >= KW_ROLE && LA125_0 <= KW_ROLES)||(LA125_0 >= KW_SCHEMA && LA125_0 <= KW_SECOND)||(LA125_0 >= KW_SEMI && LA125_0 <= KW_SERVER)||(LA125_0 >= KW_SETS && LA125_0 <= KW_SKEWED)||(LA125_0 >= KW_SNAPSHOT && LA125_0 <= KW_SSL)||(LA125_0 >= KW_STATISTICS && LA125_0 <= KW_SUMMARY)||LA125_0==KW_TABLES||(LA125_0 >= KW_TBLPROPERTIES && LA125_0 <= KW_TERMINATED)||LA125_0==KW_TINYINT||(LA125_0 >= KW_TOUCH && LA125_0 <= KW_TRANSACTIONS)||LA125_0==KW_UNARCHIVE||LA125_0==KW_UNDO||LA125_0==KW_UNIONTYPE||(LA125_0 >= KW_UNLOCK && LA125_0 <= KW_UNSIGNED)||(LA125_0 >= KW_URI && LA125_0 <= KW_USE)||(LA125_0 >= KW_UTC && LA125_0 <= KW_VALIDATE)||LA125_0==KW_VALUE_TYPE||(LA125_0 >= KW_VECTORIZATION && LA125_0 <= KW_WEEK)||LA125_0==KW_WHILE||(LA125_0 >= KW_WORK && LA125_0 <= KW_YEAR)||LA125_0==KW_BATCH||LA125_0==KW_DAYOFWEEK||LA125_0==KW_HOLD_DDLTIME||LA125_0==KW_IGNORE||LA125_0==KW_NO_DROP||LA125_0==KW_OFFLINE||LA125_0==KW_PROTECTION||LA125_0==KW_READONLY) ) {
								alt125=1;
							}
							switch (alt125) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1524:77: statsColumnName= columnNameList
									{
									pushFollow(FOLLOW_columnNameList_in_analyzeStatement7659);
									statsColumnName=columnNameList();
									state._fsp--;
									if (state.failed) return retval;
									if ( state.backtracking==0 ) stream_columnNameList.add(statsColumnName.getTree());
									}
									break;

							}

							}

							}
							break;

					}

					// AST REWRITE
					// elements: KW_COLUMNS, partialscan, noscan, parttype, statsColumnName
					// token labels: partialscan, noscan
					// rule labels: statsColumnName, parttype, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_partialscan=new RewriteRuleTokenStream(adaptor,"token partialscan",partialscan);
					RewriteRuleTokenStream stream_noscan=new RewriteRuleTokenStream(adaptor,"token noscan",noscan);
					RewriteRuleSubtreeStream stream_statsColumnName=new RewriteRuleSubtreeStream(adaptor,"rule statsColumnName",statsColumnName!=null?statsColumnName.getTree():null);
					RewriteRuleSubtreeStream stream_parttype=new RewriteRuleSubtreeStream(adaptor,"rule parttype",parttype!=null?parttype.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1525:7: -> ^( TOK_ANALYZE $parttype ( $noscan)? ( $partialscan)? ( KW_COLUMNS )? ( $statsColumnName)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1525:10: ^( TOK_ANALYZE $parttype ( $noscan)? ( $partialscan)? ( KW_COLUMNS )? ( $statsColumnName)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ANALYZE, "TOK_ANALYZE"), root_1);
						adaptor.addChild(root_1, stream_parttype.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1525:35: ( $noscan)?
						if ( stream_noscan.hasNext() ) {
							adaptor.addChild(root_1, stream_noscan.nextNode());
						}
						stream_noscan.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1525:44: ( $partialscan)?
						if ( stream_partialscan.hasNext() ) {
							adaptor.addChild(root_1, stream_partialscan.nextNode());
						}
						stream_partialscan.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1525:57: ( KW_COLUMNS )?
						if ( stream_KW_COLUMNS.hasNext() ) {
							adaptor.addChild(root_1, stream_KW_COLUMNS.nextNode());
						}
						stream_KW_COLUMNS.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1525:70: ( $statsColumnName)?
						if ( stream_statsColumnName.hasNext() ) {
							adaptor.addChild(root_1, stream_statsColumnName.nextTree());
						}
						stream_statsColumnName.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1527:7: ( KW_CACHE )=> KW_CACHE KW_METADATA
					{
					KW_CACHE435=(Token)match(input,KW_CACHE,FOLLOW_KW_CACHE_in_analyzeStatement7716); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CACHE.add(KW_CACHE435);

					KW_METADATA436=(Token)match(input,KW_METADATA,FOLLOW_KW_METADATA_in_analyzeStatement7718); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_METADATA.add(KW_METADATA436);

					// AST REWRITE
					// elements: parttype
					// token labels: 
					// rule labels: parttype, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_parttype=new RewriteRuleSubtreeStream(adaptor,"rule parttype",parttype!=null?parttype.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1527:42: -> ^( TOK_CACHE_METADATA $parttype)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1527:45: ^( TOK_CACHE_METADATA $parttype)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CACHE_METADATA, "TOK_CACHE_METADATA"), root_1);
						adaptor.addChild(root_1, stream_parttype.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "analyzeStatement"


	public static class showStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1531:1: showStatement : ( KW_SHOW ( KW_DATABASES | KW_SCHEMAS ) ( KW_LIKE showStmtIdentifier )? -> ^( TOK_SHOWDATABASES ( showStmtIdentifier )? ) | KW_SHOW KW_TABLES ( ( KW_FROM | KW_IN ) db_name= identifier )? ( KW_LIKE showStmtIdentifier | showStmtIdentifier )? -> ^( TOK_SHOWTABLES ( TOK_FROM $db_name)? ( showStmtIdentifier )? ) | KW_SHOW KW_VIEWS ( ( KW_FROM | KW_IN ) db_name= identifier )? ( KW_LIKE showStmtIdentifier | showStmtIdentifier )? -> ^( TOK_SHOWVIEWS ( TOK_FROM $db_name)? ( showStmtIdentifier )? ) | KW_SHOW KW_COLUMNS ( KW_FROM | KW_IN ) tableName ( ( KW_FROM | KW_IN ) db_name= identifier )? -> ^( TOK_SHOWCOLUMNS tableName ( $db_name)? ) | KW_SHOW KW_FUNCTIONS ( KW_LIKE showFunctionIdentifier | showFunctionIdentifier )? -> ^( TOK_SHOWFUNCTIONS ( KW_LIKE )? ( showFunctionIdentifier )? ) | KW_SHOW KW_PARTITIONS tabName= tableName ( partitionSpec )? -> ^( TOK_SHOWPARTITIONS $tabName ( partitionSpec )? ) | KW_SHOW KW_CREATE ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) db_name= identifier -> ^( TOK_SHOW_CREATEDATABASE $db_name) | KW_TABLE tabName= tableName -> ^( TOK_SHOW_CREATETABLE $tabName) ) | KW_SHOW KW_TABLE KW_EXTENDED ( ( KW_FROM | KW_IN ) db_name= identifier )? KW_LIKE showStmtIdentifier ( partitionSpec )? -> ^( TOK_SHOW_TABLESTATUS showStmtIdentifier ( $db_name)? ( partitionSpec )? ) | KW_SHOW KW_TBLPROPERTIES tableName ( LPAREN prptyName= StringLiteral RPAREN )? -> ^( TOK_SHOW_TBLPROPERTIES tableName ( $prptyName)? ) | KW_SHOW KW_LOCKS ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWDBLOCKS $dbName ( $isExtended)? ) | (parttype= partTypeExpr )? (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWLOCKS ( $parttype)? ( $isExtended)? ) ) | KW_SHOW (showOptions= KW_FORMATTED )? ( KW_INDEX | KW_INDEXES ) KW_ON showStmtIdentifier ( ( KW_FROM | KW_IN ) db_name= identifier )? -> ^( TOK_SHOWINDEXES showStmtIdentifier ( $showOptions)? ( $db_name)? ) | KW_SHOW KW_COMPACTIONS -> ^( TOK_SHOW_COMPACTIONS ) | KW_SHOW KW_TRANSACTIONS -> ^( TOK_SHOW_TRANSACTIONS ) | KW_SHOW KW_CONF StringLiteral -> ^( TOK_SHOWCONF StringLiteral ) );
	public final HiveParser.showStatement_return showStatement() throws RecognitionException {
		HiveParser.showStatement_return retval = new HiveParser.showStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token prptyName=null;
		Token dbName=null;
		Token isExtended=null;
		Token showOptions=null;
		Token KW_SHOW437=null;
		Token KW_DATABASES438=null;
		Token KW_SCHEMAS439=null;
		Token KW_LIKE440=null;
		Token KW_SHOW442=null;
		Token KW_TABLES443=null;
		Token KW_FROM444=null;
		Token KW_IN445=null;
		Token KW_LIKE446=null;
		Token KW_SHOW449=null;
		Token KW_VIEWS450=null;
		Token KW_FROM451=null;
		Token KW_IN452=null;
		Token KW_LIKE453=null;
		Token KW_SHOW456=null;
		Token KW_COLUMNS457=null;
		Token KW_FROM458=null;
		Token KW_IN459=null;
		Token KW_FROM461=null;
		Token KW_IN462=null;
		Token KW_SHOW463=null;
		Token KW_FUNCTIONS464=null;
		Token KW_LIKE465=null;
		Token KW_SHOW468=null;
		Token KW_PARTITIONS469=null;
		Token KW_SHOW471=null;
		Token KW_CREATE472=null;
		Token KW_DATABASE473=null;
		Token KW_SCHEMA474=null;
		Token KW_TABLE475=null;
		Token KW_SHOW476=null;
		Token KW_TABLE477=null;
		Token KW_EXTENDED478=null;
		Token KW_FROM479=null;
		Token KW_IN480=null;
		Token KW_LIKE481=null;
		Token KW_SHOW484=null;
		Token KW_TBLPROPERTIES485=null;
		Token LPAREN487=null;
		Token RPAREN488=null;
		Token KW_SHOW489=null;
		Token KW_LOCKS490=null;
		Token KW_DATABASE491=null;
		Token KW_SCHEMA492=null;
		Token KW_SHOW493=null;
		Token KW_INDEX494=null;
		Token KW_INDEXES495=null;
		Token KW_ON496=null;
		Token KW_FROM498=null;
		Token KW_IN499=null;
		Token KW_SHOW500=null;
		Token KW_COMPACTIONS501=null;
		Token KW_SHOW502=null;
		Token KW_TRANSACTIONS503=null;
		Token KW_SHOW504=null;
		Token KW_CONF505=null;
		Token StringLiteral506=null;
		ParserRuleReturnScope db_name =null;
		ParserRuleReturnScope tabName =null;
		ParserRuleReturnScope parttype =null;
		ParserRuleReturnScope showStmtIdentifier441 =null;
		ParserRuleReturnScope showStmtIdentifier447 =null;
		ParserRuleReturnScope showStmtIdentifier448 =null;
		ParserRuleReturnScope showStmtIdentifier454 =null;
		ParserRuleReturnScope showStmtIdentifier455 =null;
		ParserRuleReturnScope tableName460 =null;
		ParserRuleReturnScope showFunctionIdentifier466 =null;
		ParserRuleReturnScope showFunctionIdentifier467 =null;
		ParserRuleReturnScope partitionSpec470 =null;
		ParserRuleReturnScope showStmtIdentifier482 =null;
		ParserRuleReturnScope partitionSpec483 =null;
		ParserRuleReturnScope tableName486 =null;
		ParserRuleReturnScope showStmtIdentifier497 =null;

		ASTNode prptyName_tree=null;
		ASTNode dbName_tree=null;
		ASTNode isExtended_tree=null;
		ASTNode showOptions_tree=null;
		ASTNode KW_SHOW437_tree=null;
		ASTNode KW_DATABASES438_tree=null;
		ASTNode KW_SCHEMAS439_tree=null;
		ASTNode KW_LIKE440_tree=null;
		ASTNode KW_SHOW442_tree=null;
		ASTNode KW_TABLES443_tree=null;
		ASTNode KW_FROM444_tree=null;
		ASTNode KW_IN445_tree=null;
		ASTNode KW_LIKE446_tree=null;
		ASTNode KW_SHOW449_tree=null;
		ASTNode KW_VIEWS450_tree=null;
		ASTNode KW_FROM451_tree=null;
		ASTNode KW_IN452_tree=null;
		ASTNode KW_LIKE453_tree=null;
		ASTNode KW_SHOW456_tree=null;
		ASTNode KW_COLUMNS457_tree=null;
		ASTNode KW_FROM458_tree=null;
		ASTNode KW_IN459_tree=null;
		ASTNode KW_FROM461_tree=null;
		ASTNode KW_IN462_tree=null;
		ASTNode KW_SHOW463_tree=null;
		ASTNode KW_FUNCTIONS464_tree=null;
		ASTNode KW_LIKE465_tree=null;
		ASTNode KW_SHOW468_tree=null;
		ASTNode KW_PARTITIONS469_tree=null;
		ASTNode KW_SHOW471_tree=null;
		ASTNode KW_CREATE472_tree=null;
		ASTNode KW_DATABASE473_tree=null;
		ASTNode KW_SCHEMA474_tree=null;
		ASTNode KW_TABLE475_tree=null;
		ASTNode KW_SHOW476_tree=null;
		ASTNode KW_TABLE477_tree=null;
		ASTNode KW_EXTENDED478_tree=null;
		ASTNode KW_FROM479_tree=null;
		ASTNode KW_IN480_tree=null;
		ASTNode KW_LIKE481_tree=null;
		ASTNode KW_SHOW484_tree=null;
		ASTNode KW_TBLPROPERTIES485_tree=null;
		ASTNode LPAREN487_tree=null;
		ASTNode RPAREN488_tree=null;
		ASTNode KW_SHOW489_tree=null;
		ASTNode KW_LOCKS490_tree=null;
		ASTNode KW_DATABASE491_tree=null;
		ASTNode KW_SCHEMA492_tree=null;
		ASTNode KW_SHOW493_tree=null;
		ASTNode KW_INDEX494_tree=null;
		ASTNode KW_INDEXES495_tree=null;
		ASTNode KW_ON496_tree=null;
		ASTNode KW_FROM498_tree=null;
		ASTNode KW_IN499_tree=null;
		ASTNode KW_SHOW500_tree=null;
		ASTNode KW_COMPACTIONS501_tree=null;
		ASTNode KW_SHOW502_tree=null;
		ASTNode KW_TRANSACTIONS503_tree=null;
		ASTNode KW_SHOW504_tree=null;
		ASTNode KW_CONF505_tree=null;
		ASTNode StringLiteral506_tree=null;
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_KW_VIEWS=new RewriteRuleTokenStream(adaptor,"token KW_VIEWS");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_LIKE=new RewriteRuleTokenStream(adaptor,"token KW_LIKE");
		RewriteRuleTokenStream stream_KW_PARTITIONS=new RewriteRuleTokenStream(adaptor,"token KW_PARTITIONS");
		RewriteRuleTokenStream stream_KW_IN=new RewriteRuleTokenStream(adaptor,"token KW_IN");
		RewriteRuleTokenStream stream_KW_LOCKS=new RewriteRuleTokenStream(adaptor,"token KW_LOCKS");
		RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,"token Identifier");
		RewriteRuleTokenStream stream_KW_TABLES=new RewriteRuleTokenStream(adaptor,"token KW_TABLES");
		RewriteRuleTokenStream stream_KW_FUNCTIONS=new RewriteRuleTokenStream(adaptor,"token KW_FUNCTIONS");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_EXTENDED=new RewriteRuleTokenStream(adaptor,"token KW_EXTENDED");
		RewriteRuleTokenStream stream_KW_CONF=new RewriteRuleTokenStream(adaptor,"token KW_CONF");
		RewriteRuleTokenStream stream_KW_COLUMNS=new RewriteRuleTokenStream(adaptor,"token KW_COLUMNS");
		RewriteRuleTokenStream stream_KW_TRANSACTIONS=new RewriteRuleTokenStream(adaptor,"token KW_TRANSACTIONS");
		RewriteRuleTokenStream stream_KW_SCHEMAS=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMAS");
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleTokenStream stream_KW_FORMATTED=new RewriteRuleTokenStream(adaptor,"token KW_FORMATTED");
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_INDEX=new RewriteRuleTokenStream(adaptor,"token KW_INDEX");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_COMPACTIONS=new RewriteRuleTokenStream(adaptor,"token KW_COMPACTIONS");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_DATABASES=new RewriteRuleTokenStream(adaptor,"token KW_DATABASES");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_INDEXES=new RewriteRuleTokenStream(adaptor,"token KW_INDEXES");
		RewriteRuleTokenStream stream_KW_SHOW=new RewriteRuleTokenStream(adaptor,"token KW_SHOW");
		RewriteRuleTokenStream stream_KW_TBLPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_TBLPROPERTIES");
		RewriteRuleSubtreeStream stream_showStmtIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule showStmtIdentifier");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_showFunctionIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule showFunctionIdentifier");
		RewriteRuleSubtreeStream stream_partTypeExpr=new RewriteRuleSubtreeStream(adaptor,"rule partTypeExpr");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("show statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:5: ( KW_SHOW ( KW_DATABASES | KW_SCHEMAS ) ( KW_LIKE showStmtIdentifier )? -> ^( TOK_SHOWDATABASES ( showStmtIdentifier )? ) | KW_SHOW KW_TABLES ( ( KW_FROM | KW_IN ) db_name= identifier )? ( KW_LIKE showStmtIdentifier | showStmtIdentifier )? -> ^( TOK_SHOWTABLES ( TOK_FROM $db_name)? ( showStmtIdentifier )? ) | KW_SHOW KW_VIEWS ( ( KW_FROM | KW_IN ) db_name= identifier )? ( KW_LIKE showStmtIdentifier | showStmtIdentifier )? -> ^( TOK_SHOWVIEWS ( TOK_FROM $db_name)? ( showStmtIdentifier )? ) | KW_SHOW KW_COLUMNS ( KW_FROM | KW_IN ) tableName ( ( KW_FROM | KW_IN ) db_name= identifier )? -> ^( TOK_SHOWCOLUMNS tableName ( $db_name)? ) | KW_SHOW KW_FUNCTIONS ( KW_LIKE showFunctionIdentifier | showFunctionIdentifier )? -> ^( TOK_SHOWFUNCTIONS ( KW_LIKE )? ( showFunctionIdentifier )? ) | KW_SHOW KW_PARTITIONS tabName= tableName ( partitionSpec )? -> ^( TOK_SHOWPARTITIONS $tabName ( partitionSpec )? ) | KW_SHOW KW_CREATE ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) db_name= identifier -> ^( TOK_SHOW_CREATEDATABASE $db_name) | KW_TABLE tabName= tableName -> ^( TOK_SHOW_CREATETABLE $tabName) ) | KW_SHOW KW_TABLE KW_EXTENDED ( ( KW_FROM | KW_IN ) db_name= identifier )? KW_LIKE showStmtIdentifier ( partitionSpec )? -> ^( TOK_SHOW_TABLESTATUS showStmtIdentifier ( $db_name)? ( partitionSpec )? ) | KW_SHOW KW_TBLPROPERTIES tableName ( LPAREN prptyName= StringLiteral RPAREN )? -> ^( TOK_SHOW_TBLPROPERTIES tableName ( $prptyName)? ) | KW_SHOW KW_LOCKS ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWDBLOCKS $dbName ( $isExtended)? ) | (parttype= partTypeExpr )? (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWLOCKS ( $parttype)? ( $isExtended)? ) ) | KW_SHOW (showOptions= KW_FORMATTED )? ( KW_INDEX | KW_INDEXES ) KW_ON showStmtIdentifier ( ( KW_FROM | KW_IN ) db_name= identifier )? -> ^( TOK_SHOWINDEXES showStmtIdentifier ( $showOptions)? ( $db_name)? ) | KW_SHOW KW_COMPACTIONS -> ^( TOK_SHOW_COMPACTIONS ) | KW_SHOW KW_TRANSACTIONS -> ^( TOK_SHOW_TRANSACTIONS ) | KW_SHOW KW_CONF StringLiteral -> ^( TOK_SHOWCONF StringLiteral ) )
			int alt156=14;
			int LA156_0 = input.LA(1);
			if ( (LA156_0==KW_SHOW) ) {
				switch ( input.LA(2) ) {
				case KW_TABLES:
					{
					alt156=2;
					}
					break;
				case KW_VIEWS:
					{
					alt156=3;
					}
					break;
				case KW_COLUMNS:
					{
					alt156=4;
					}
					break;
				case KW_FUNCTIONS:
					{
					alt156=5;
					}
					break;
				case KW_PARTITIONS:
					{
					alt156=6;
					}
					break;
				case KW_CREATE:
					{
					alt156=7;
					}
					break;
				case KW_TABLE:
					{
					alt156=8;
					}
					break;
				case KW_TBLPROPERTIES:
					{
					alt156=9;
					}
					break;
				case KW_LOCKS:
					{
					alt156=10;
					}
					break;
				case KW_COMPACTIONS:
					{
					alt156=12;
					}
					break;
				case KW_TRANSACTIONS:
					{
					alt156=13;
					}
					break;
				case KW_CONF:
					{
					alt156=14;
					}
					break;
				case KW_DATABASES:
				case KW_SCHEMAS:
					{
					alt156=1;
					}
					break;
				case KW_FORMATTED:
				case KW_INDEX:
				case KW_INDEXES:
					{
					alt156=11;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 156, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 156, 0, input);
				throw nvae;
			}

			switch (alt156) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:7: KW_SHOW ( KW_DATABASES | KW_SCHEMAS ) ( KW_LIKE showStmtIdentifier )?
					{
					KW_SHOW437=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement7762); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW437);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:15: ( KW_DATABASES | KW_SCHEMAS )
					int alt128=2;
					int LA128_0 = input.LA(1);
					if ( (LA128_0==KW_DATABASES) ) {
						alt128=1;
					}
					else if ( (LA128_0==KW_SCHEMAS) ) {
						alt128=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 128, 0, input);
						throw nvae;
					}

					switch (alt128) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:16: KW_DATABASES
							{
							KW_DATABASES438=(Token)match(input,KW_DATABASES,FOLLOW_KW_DATABASES_in_showStatement7765); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DATABASES.add(KW_DATABASES438);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:29: KW_SCHEMAS
							{
							KW_SCHEMAS439=(Token)match(input,KW_SCHEMAS,FOLLOW_KW_SCHEMAS_in_showStatement7767); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SCHEMAS.add(KW_SCHEMAS439);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:41: ( KW_LIKE showStmtIdentifier )?
					int alt129=2;
					int LA129_0 = input.LA(1);
					if ( (LA129_0==KW_LIKE) ) {
						alt129=1;
					}
					switch (alt129) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:42: KW_LIKE showStmtIdentifier
							{
							KW_LIKE440=(Token)match(input,KW_LIKE,FOLLOW_KW_LIKE_in_showStatement7771); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_LIKE.add(KW_LIKE440);

							pushFollow(FOLLOW_showStmtIdentifier_in_showStatement7773);
							showStmtIdentifier441=showStmtIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier441.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: showStmtIdentifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1534:71: -> ^( TOK_SHOWDATABASES ( showStmtIdentifier )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:74: ^( TOK_SHOWDATABASES ( showStmtIdentifier )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWDATABASES, "TOK_SHOWDATABASES"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1534:94: ( showStmtIdentifier )?
						if ( stream_showStmtIdentifier.hasNext() ) {
							adaptor.addChild(root_1, stream_showStmtIdentifier.nextTree());
						}
						stream_showStmtIdentifier.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:7: KW_SHOW KW_TABLES ( ( KW_FROM | KW_IN ) db_name= identifier )? ( KW_LIKE showStmtIdentifier | showStmtIdentifier )?
					{
					KW_SHOW442=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement7792); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW442);

					KW_TABLES443=(Token)match(input,KW_TABLES,FOLLOW_KW_TABLES_in_showStatement7794); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TABLES.add(KW_TABLES443);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:25: ( ( KW_FROM | KW_IN ) db_name= identifier )?
					int alt131=2;
					int LA131_0 = input.LA(1);
					if ( (LA131_0==KW_FROM||LA131_0==KW_IN) ) {
						alt131=1;
					}
					switch (alt131) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:26: ( KW_FROM | KW_IN ) db_name= identifier
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:26: ( KW_FROM | KW_IN )
							int alt130=2;
							int LA130_0 = input.LA(1);
							if ( (LA130_0==KW_FROM) ) {
								alt130=1;
							}
							else if ( (LA130_0==KW_IN) ) {
								alt130=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 130, 0, input);
								throw nvae;
							}

							switch (alt130) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:27: KW_FROM
									{
									KW_FROM444=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_showStatement7798); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM444);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:35: KW_IN
									{
									KW_IN445=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_showStatement7800); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN445);

									}
									break;

							}

							pushFollow(FOLLOW_identifier_in_showStatement7805);
							db_name=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(db_name.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:63: ( KW_LIKE showStmtIdentifier | showStmtIdentifier )?
					int alt132=3;
					int LA132_0 = input.LA(1);
					if ( (LA132_0==KW_LIKE) ) {
						alt132=1;
					}
					else if ( (LA132_0==Identifier||(LA132_0 >= KW_ABORT && LA132_0 <= KW_AFTER)||LA132_0==KW_ANALYZE||LA132_0==KW_ARCHIVE||LA132_0==KW_ASC||(LA132_0 >= KW_AUTOCOMMIT && LA132_0 <= KW_BEFORE)||(LA132_0 >= KW_BUCKET && LA132_0 <= KW_BUCKETS)||(LA132_0 >= KW_CACHE && LA132_0 <= KW_CASCADE)||LA132_0==KW_CHANGE||(LA132_0 >= KW_CLUSTER && LA132_0 <= KW_COLLECTION)||(LA132_0 >= KW_COLUMNS && LA132_0 <= KW_COMMENT)||(LA132_0 >= KW_COMPACT && LA132_0 <= KW_CONCATENATE)||LA132_0==KW_CONTINUE||LA132_0==KW_DATA||LA132_0==KW_DATABASES||(LA132_0 >= KW_DATETIME && LA132_0 <= KW_DBPROPERTIES)||(LA132_0 >= KW_DEFERRED && LA132_0 <= KW_DEFINED)||(LA132_0 >= KW_DELIMITED && LA132_0 <= KW_DESC)||(LA132_0 >= KW_DETAIL && LA132_0 <= KW_DISABLE)||LA132_0==KW_DISTRIBUTE||LA132_0==KW_DOW||(LA132_0 >= KW_DUMP && LA132_0 <= KW_ELEM_TYPE)||LA132_0==KW_ENABLE||LA132_0==KW_ESCAPED||LA132_0==KW_EXCLUSIVE||(LA132_0 >= KW_EXPLAIN && LA132_0 <= KW_EXPRESSION)||(LA132_0 >= KW_FIELDS && LA132_0 <= KW_FIRST)||(LA132_0 >= KW_FORMAT && LA132_0 <= KW_FORMATTED)||LA132_0==KW_FUNCTIONS||(LA132_0 >= KW_HOUR && LA132_0 <= KW_IDXPROPERTIES)||(LA132_0 >= KW_INDEX && LA132_0 <= KW_INDEXES)||(LA132_0 >= KW_INPATH && LA132_0 <= KW_INPUTFORMAT)||(LA132_0 >= KW_ISOLATION && LA132_0 <= KW_JAR)||(LA132_0 >= KW_KEY && LA132_0 <= KW_LAST)||LA132_0==KW_LEVEL||(LA132_0 >= KW_LIMIT && LA132_0 <= KW_LOAD)||(LA132_0 >= KW_LOCATION && LA132_0 <= KW_LONG)||(LA132_0 >= KW_MAPJOIN && LA132_0 <= KW_MATERIALIZED)||LA132_0==KW_METADATA||(LA132_0 >= KW_MINUTE && LA132_0 <= KW_MONTH)||LA132_0==KW_MSCK||(LA132_0 >= KW_NORELY && LA132_0 <= KW_NOSCAN)||LA132_0==KW_NOVALIDATE||LA132_0==KW_NULLS||LA132_0==KW_OFFSET||(LA132_0 >= KW_OPERATOR && LA132_0 <= KW_OPTION)||(LA132_0 >= KW_OUTPUTDRIVER && LA132_0 <= KW_OUTPUTFORMAT)||(LA132_0 >= KW_OVERWRITE && LA132_0 <= KW_OWNER)||(LA132_0 >= KW_PARTITIONED && LA132_0 <= KW_PARTITIONS)||LA132_0==KW_PLUS||LA132_0==KW_PRETTY||LA132_0==KW_PRINCIPALS||(LA132_0 >= KW_PURGE && LA132_0 <= KW_QUARTER)||LA132_0==KW_READ||(LA132_0 >= KW_REBUILD && LA132_0 <= KW_RECORDWRITER)||(LA132_0 >= KW_RELOAD && LA132_0 <= KW_RESTRICT)||LA132_0==KW_REWRITE||(LA132_0 >= KW_ROLE && LA132_0 <= KW_ROLES)||(LA132_0 >= KW_SCHEMA && LA132_0 <= KW_SECOND)||(LA132_0 >= KW_SEMI && LA132_0 <= KW_SERVER)||(LA132_0 >= KW_SETS && LA132_0 <= KW_SKEWED)||(LA132_0 >= KW_SNAPSHOT && LA132_0 <= KW_SSL)||(LA132_0 >= KW_STATISTICS && LA132_0 <= KW_SUMMARY)||LA132_0==KW_TABLES||(LA132_0 >= KW_TBLPROPERTIES && LA132_0 <= KW_TERMINATED)||LA132_0==KW_TINYINT||(LA132_0 >= KW_TOUCH && LA132_0 <= KW_TRANSACTIONS)||LA132_0==KW_UNARCHIVE||LA132_0==KW_UNDO||LA132_0==KW_UNIONTYPE||(LA132_0 >= KW_UNLOCK && LA132_0 <= KW_UNSIGNED)||(LA132_0 >= KW_URI && LA132_0 <= KW_USE)||(LA132_0 >= KW_UTC && LA132_0 <= KW_VALIDATE)||LA132_0==KW_VALUE_TYPE||(LA132_0 >= KW_VECTORIZATION && LA132_0 <= KW_WEEK)||LA132_0==KW_WHILE||(LA132_0 >= KW_WORK && LA132_0 <= KW_YEAR)||LA132_0==StringLiteral||LA132_0==KW_BATCH||LA132_0==KW_DAYOFWEEK||LA132_0==KW_HOLD_DDLTIME||LA132_0==KW_IGNORE||LA132_0==KW_NO_DROP||LA132_0==KW_OFFLINE||LA132_0==KW_PROTECTION||LA132_0==KW_READONLY) ) {
						alt132=2;
					}
					switch (alt132) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:64: KW_LIKE showStmtIdentifier
							{
							KW_LIKE446=(Token)match(input,KW_LIKE,FOLLOW_KW_LIKE_in_showStatement7810); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_LIKE.add(KW_LIKE446);

							pushFollow(FOLLOW_showStmtIdentifier_in_showStatement7812);
							showStmtIdentifier447=showStmtIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier447.getTree());
							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:91: showStmtIdentifier
							{
							pushFollow(FOLLOW_showStmtIdentifier_in_showStatement7814);
							showStmtIdentifier448=showStmtIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier448.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: showStmtIdentifier, db_name
					// token labels: 
					// rule labels: db_name, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_db_name=new RewriteRuleSubtreeStream(adaptor,"rule db_name",db_name!=null?db_name.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1535:113: -> ^( TOK_SHOWTABLES ( TOK_FROM $db_name)? ( showStmtIdentifier )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:116: ^( TOK_SHOWTABLES ( TOK_FROM $db_name)? ( showStmtIdentifier )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWTABLES, "TOK_SHOWTABLES"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:133: ( TOK_FROM $db_name)?
						if ( stream_db_name.hasNext() ) {
							adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"));
							adaptor.addChild(root_1, stream_db_name.nextTree());
						}
						stream_db_name.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1535:154: ( showStmtIdentifier )?
						if ( stream_showStmtIdentifier.hasNext() ) {
							adaptor.addChild(root_1, stream_showStmtIdentifier.nextTree());
						}
						stream_showStmtIdentifier.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:7: KW_SHOW KW_VIEWS ( ( KW_FROM | KW_IN ) db_name= identifier )? ( KW_LIKE showStmtIdentifier | showStmtIdentifier )?
					{
					KW_SHOW449=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement7842); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW449);

					KW_VIEWS450=(Token)match(input,KW_VIEWS,FOLLOW_KW_VIEWS_in_showStatement7844); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_VIEWS.add(KW_VIEWS450);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:24: ( ( KW_FROM | KW_IN ) db_name= identifier )?
					int alt134=2;
					int LA134_0 = input.LA(1);
					if ( (LA134_0==KW_FROM||LA134_0==KW_IN) ) {
						alt134=1;
					}
					switch (alt134) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:25: ( KW_FROM | KW_IN ) db_name= identifier
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:25: ( KW_FROM | KW_IN )
							int alt133=2;
							int LA133_0 = input.LA(1);
							if ( (LA133_0==KW_FROM) ) {
								alt133=1;
							}
							else if ( (LA133_0==KW_IN) ) {
								alt133=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 133, 0, input);
								throw nvae;
							}

							switch (alt133) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:26: KW_FROM
									{
									KW_FROM451=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_showStatement7848); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM451);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:34: KW_IN
									{
									KW_IN452=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_showStatement7850); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN452);

									}
									break;

							}

							pushFollow(FOLLOW_identifier_in_showStatement7855);
							db_name=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(db_name.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:62: ( KW_LIKE showStmtIdentifier | showStmtIdentifier )?
					int alt135=3;
					int LA135_0 = input.LA(1);
					if ( (LA135_0==KW_LIKE) ) {
						alt135=1;
					}
					else if ( (LA135_0==Identifier||(LA135_0 >= KW_ABORT && LA135_0 <= KW_AFTER)||LA135_0==KW_ANALYZE||LA135_0==KW_ARCHIVE||LA135_0==KW_ASC||(LA135_0 >= KW_AUTOCOMMIT && LA135_0 <= KW_BEFORE)||(LA135_0 >= KW_BUCKET && LA135_0 <= KW_BUCKETS)||(LA135_0 >= KW_CACHE && LA135_0 <= KW_CASCADE)||LA135_0==KW_CHANGE||(LA135_0 >= KW_CLUSTER && LA135_0 <= KW_COLLECTION)||(LA135_0 >= KW_COLUMNS && LA135_0 <= KW_COMMENT)||(LA135_0 >= KW_COMPACT && LA135_0 <= KW_CONCATENATE)||LA135_0==KW_CONTINUE||LA135_0==KW_DATA||LA135_0==KW_DATABASES||(LA135_0 >= KW_DATETIME && LA135_0 <= KW_DBPROPERTIES)||(LA135_0 >= KW_DEFERRED && LA135_0 <= KW_DEFINED)||(LA135_0 >= KW_DELIMITED && LA135_0 <= KW_DESC)||(LA135_0 >= KW_DETAIL && LA135_0 <= KW_DISABLE)||LA135_0==KW_DISTRIBUTE||LA135_0==KW_DOW||(LA135_0 >= KW_DUMP && LA135_0 <= KW_ELEM_TYPE)||LA135_0==KW_ENABLE||LA135_0==KW_ESCAPED||LA135_0==KW_EXCLUSIVE||(LA135_0 >= KW_EXPLAIN && LA135_0 <= KW_EXPRESSION)||(LA135_0 >= KW_FIELDS && LA135_0 <= KW_FIRST)||(LA135_0 >= KW_FORMAT && LA135_0 <= KW_FORMATTED)||LA135_0==KW_FUNCTIONS||(LA135_0 >= KW_HOUR && LA135_0 <= KW_IDXPROPERTIES)||(LA135_0 >= KW_INDEX && LA135_0 <= KW_INDEXES)||(LA135_0 >= KW_INPATH && LA135_0 <= KW_INPUTFORMAT)||(LA135_0 >= KW_ISOLATION && LA135_0 <= KW_JAR)||(LA135_0 >= KW_KEY && LA135_0 <= KW_LAST)||LA135_0==KW_LEVEL||(LA135_0 >= KW_LIMIT && LA135_0 <= KW_LOAD)||(LA135_0 >= KW_LOCATION && LA135_0 <= KW_LONG)||(LA135_0 >= KW_MAPJOIN && LA135_0 <= KW_MATERIALIZED)||LA135_0==KW_METADATA||(LA135_0 >= KW_MINUTE && LA135_0 <= KW_MONTH)||LA135_0==KW_MSCK||(LA135_0 >= KW_NORELY && LA135_0 <= KW_NOSCAN)||LA135_0==KW_NOVALIDATE||LA135_0==KW_NULLS||LA135_0==KW_OFFSET||(LA135_0 >= KW_OPERATOR && LA135_0 <= KW_OPTION)||(LA135_0 >= KW_OUTPUTDRIVER && LA135_0 <= KW_OUTPUTFORMAT)||(LA135_0 >= KW_OVERWRITE && LA135_0 <= KW_OWNER)||(LA135_0 >= KW_PARTITIONED && LA135_0 <= KW_PARTITIONS)||LA135_0==KW_PLUS||LA135_0==KW_PRETTY||LA135_0==KW_PRINCIPALS||(LA135_0 >= KW_PURGE && LA135_0 <= KW_QUARTER)||LA135_0==KW_READ||(LA135_0 >= KW_REBUILD && LA135_0 <= KW_RECORDWRITER)||(LA135_0 >= KW_RELOAD && LA135_0 <= KW_RESTRICT)||LA135_0==KW_REWRITE||(LA135_0 >= KW_ROLE && LA135_0 <= KW_ROLES)||(LA135_0 >= KW_SCHEMA && LA135_0 <= KW_SECOND)||(LA135_0 >= KW_SEMI && LA135_0 <= KW_SERVER)||(LA135_0 >= KW_SETS && LA135_0 <= KW_SKEWED)||(LA135_0 >= KW_SNAPSHOT && LA135_0 <= KW_SSL)||(LA135_0 >= KW_STATISTICS && LA135_0 <= KW_SUMMARY)||LA135_0==KW_TABLES||(LA135_0 >= KW_TBLPROPERTIES && LA135_0 <= KW_TERMINATED)||LA135_0==KW_TINYINT||(LA135_0 >= KW_TOUCH && LA135_0 <= KW_TRANSACTIONS)||LA135_0==KW_UNARCHIVE||LA135_0==KW_UNDO||LA135_0==KW_UNIONTYPE||(LA135_0 >= KW_UNLOCK && LA135_0 <= KW_UNSIGNED)||(LA135_0 >= KW_URI && LA135_0 <= KW_USE)||(LA135_0 >= KW_UTC && LA135_0 <= KW_VALIDATE)||LA135_0==KW_VALUE_TYPE||(LA135_0 >= KW_VECTORIZATION && LA135_0 <= KW_WEEK)||LA135_0==KW_WHILE||(LA135_0 >= KW_WORK && LA135_0 <= KW_YEAR)||LA135_0==StringLiteral||LA135_0==KW_BATCH||LA135_0==KW_DAYOFWEEK||LA135_0==KW_HOLD_DDLTIME||LA135_0==KW_IGNORE||LA135_0==KW_NO_DROP||LA135_0==KW_OFFLINE||LA135_0==KW_PROTECTION||LA135_0==KW_READONLY) ) {
						alt135=2;
					}
					switch (alt135) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:63: KW_LIKE showStmtIdentifier
							{
							KW_LIKE453=(Token)match(input,KW_LIKE,FOLLOW_KW_LIKE_in_showStatement7860); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_LIKE.add(KW_LIKE453);

							pushFollow(FOLLOW_showStmtIdentifier_in_showStatement7862);
							showStmtIdentifier454=showStmtIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier454.getTree());
							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:90: showStmtIdentifier
							{
							pushFollow(FOLLOW_showStmtIdentifier_in_showStatement7864);
							showStmtIdentifier455=showStmtIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier455.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: db_name, showStmtIdentifier
					// token labels: 
					// rule labels: db_name, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_db_name=new RewriteRuleSubtreeStream(adaptor,"rule db_name",db_name!=null?db_name.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1536:112: -> ^( TOK_SHOWVIEWS ( TOK_FROM $db_name)? ( showStmtIdentifier )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:115: ^( TOK_SHOWVIEWS ( TOK_FROM $db_name)? ( showStmtIdentifier )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWVIEWS, "TOK_SHOWVIEWS"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:131: ( TOK_FROM $db_name)?
						if ( stream_db_name.hasNext() ) {
							adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"));
							adaptor.addChild(root_1, stream_db_name.nextTree());
						}
						stream_db_name.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1536:152: ( showStmtIdentifier )?
						if ( stream_showStmtIdentifier.hasNext() ) {
							adaptor.addChild(root_1, stream_showStmtIdentifier.nextTree());
						}
						stream_showStmtIdentifier.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:7: KW_SHOW KW_COLUMNS ( KW_FROM | KW_IN ) tableName ( ( KW_FROM | KW_IN ) db_name= identifier )?
					{
					KW_SHOW456=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement7892); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW456);

					KW_COLUMNS457=(Token)match(input,KW_COLUMNS,FOLLOW_KW_COLUMNS_in_showStatement7894); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COLUMNS.add(KW_COLUMNS457);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:26: ( KW_FROM | KW_IN )
					int alt136=2;
					int LA136_0 = input.LA(1);
					if ( (LA136_0==KW_FROM) ) {
						alt136=1;
					}
					else if ( (LA136_0==KW_IN) ) {
						alt136=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 136, 0, input);
						throw nvae;
					}

					switch (alt136) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:27: KW_FROM
							{
							KW_FROM458=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_showStatement7897); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM458);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:35: KW_IN
							{
							KW_IN459=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_showStatement7899); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN459);

							}
							break;

					}

					pushFollow(FOLLOW_tableName_in_showStatement7902);
					tableName460=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName460.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:52: ( ( KW_FROM | KW_IN ) db_name= identifier )?
					int alt138=2;
					int LA138_0 = input.LA(1);
					if ( (LA138_0==KW_FROM||LA138_0==KW_IN) ) {
						alt138=1;
					}
					switch (alt138) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:53: ( KW_FROM | KW_IN ) db_name= identifier
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:53: ( KW_FROM | KW_IN )
							int alt137=2;
							int LA137_0 = input.LA(1);
							if ( (LA137_0==KW_FROM) ) {
								alt137=1;
							}
							else if ( (LA137_0==KW_IN) ) {
								alt137=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 137, 0, input);
								throw nvae;
							}

							switch (alt137) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:54: KW_FROM
									{
									KW_FROM461=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_showStatement7906); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM461);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1537:62: KW_IN
									{
									KW_IN462=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_showStatement7908); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN462);

									}
									break;

							}

							pushFollow(FOLLOW_identifier_in_showStatement7913);
							db_name=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(db_name.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: tableName, db_name
					// token labels: 
					// rule labels: db_name, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_db_name=new RewriteRuleSubtreeStream(adaptor,"rule db_name",db_name!=null?db_name.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1538:5: -> ^( TOK_SHOWCOLUMNS tableName ( $db_name)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1538:8: ^( TOK_SHOWCOLUMNS tableName ( $db_name)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWCOLUMNS, "TOK_SHOWCOLUMNS"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1538:37: ( $db_name)?
						if ( stream_db_name.hasNext() ) {
							adaptor.addChild(root_1, stream_db_name.nextTree());
						}
						stream_db_name.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:7: KW_SHOW KW_FUNCTIONS ( KW_LIKE showFunctionIdentifier | showFunctionIdentifier )?
					{
					KW_SHOW463=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement7939); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW463);

					KW_FUNCTIONS464=(Token)match(input,KW_FUNCTIONS,FOLLOW_KW_FUNCTIONS_in_showStatement7941); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_FUNCTIONS.add(KW_FUNCTIONS464);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:28: ( KW_LIKE showFunctionIdentifier | showFunctionIdentifier )?
					int alt139=3;
					int LA139_0 = input.LA(1);
					if ( (LA139_0==KW_LIKE) ) {
						alt139=1;
					}
					else if ( (LA139_0==Identifier||(LA139_0 >= KW_ABORT && LA139_0 <= KW_AFTER)||LA139_0==KW_ANALYZE||LA139_0==KW_ARCHIVE||LA139_0==KW_ASC||(LA139_0 >= KW_AUTOCOMMIT && LA139_0 <= KW_BEFORE)||(LA139_0 >= KW_BUCKET && LA139_0 <= KW_BUCKETS)||(LA139_0 >= KW_CACHE && LA139_0 <= KW_CASCADE)||LA139_0==KW_CHANGE||(LA139_0 >= KW_CLUSTER && LA139_0 <= KW_COLLECTION)||(LA139_0 >= KW_COLUMNS && LA139_0 <= KW_COMMENT)||(LA139_0 >= KW_COMPACT && LA139_0 <= KW_CONCATENATE)||LA139_0==KW_CONTINUE||LA139_0==KW_DATA||LA139_0==KW_DATABASES||(LA139_0 >= KW_DATETIME && LA139_0 <= KW_DBPROPERTIES)||(LA139_0 >= KW_DEFERRED && LA139_0 <= KW_DEFINED)||(LA139_0 >= KW_DELIMITED && LA139_0 <= KW_DESC)||(LA139_0 >= KW_DETAIL && LA139_0 <= KW_DISABLE)||LA139_0==KW_DISTRIBUTE||LA139_0==KW_DOW||(LA139_0 >= KW_DUMP && LA139_0 <= KW_ELEM_TYPE)||LA139_0==KW_ENABLE||LA139_0==KW_ESCAPED||LA139_0==KW_EXCLUSIVE||(LA139_0 >= KW_EXPLAIN && LA139_0 <= KW_EXPRESSION)||(LA139_0 >= KW_FIELDS && LA139_0 <= KW_FIRST)||(LA139_0 >= KW_FORMAT && LA139_0 <= KW_FORMATTED)||LA139_0==KW_FUNCTIONS||(LA139_0 >= KW_HOUR && LA139_0 <= KW_IDXPROPERTIES)||(LA139_0 >= KW_INDEX && LA139_0 <= KW_INDEXES)||(LA139_0 >= KW_INPATH && LA139_0 <= KW_INPUTFORMAT)||(LA139_0 >= KW_ISOLATION && LA139_0 <= KW_JAR)||(LA139_0 >= KW_KEY && LA139_0 <= KW_LAST)||LA139_0==KW_LEVEL||(LA139_0 >= KW_LIMIT && LA139_0 <= KW_LOAD)||(LA139_0 >= KW_LOCATION && LA139_0 <= KW_LONG)||(LA139_0 >= KW_MAPJOIN && LA139_0 <= KW_MATERIALIZED)||LA139_0==KW_METADATA||(LA139_0 >= KW_MINUTE && LA139_0 <= KW_MONTH)||LA139_0==KW_MSCK||(LA139_0 >= KW_NORELY && LA139_0 <= KW_NOSCAN)||LA139_0==KW_NOVALIDATE||LA139_0==KW_NULLS||LA139_0==KW_OFFSET||(LA139_0 >= KW_OPERATOR && LA139_0 <= KW_OPTION)||(LA139_0 >= KW_OUTPUTDRIVER && LA139_0 <= KW_OUTPUTFORMAT)||(LA139_0 >= KW_OVERWRITE && LA139_0 <= KW_OWNER)||(LA139_0 >= KW_PARTITIONED && LA139_0 <= KW_PARTITIONS)||LA139_0==KW_PLUS||LA139_0==KW_PRETTY||LA139_0==KW_PRINCIPALS||(LA139_0 >= KW_PURGE && LA139_0 <= KW_QUARTER)||LA139_0==KW_READ||(LA139_0 >= KW_REBUILD && LA139_0 <= KW_RECORDWRITER)||(LA139_0 >= KW_RELOAD && LA139_0 <= KW_RESTRICT)||LA139_0==KW_REWRITE||(LA139_0 >= KW_ROLE && LA139_0 <= KW_ROLES)||(LA139_0 >= KW_SCHEMA && LA139_0 <= KW_SECOND)||(LA139_0 >= KW_SEMI && LA139_0 <= KW_SERVER)||(LA139_0 >= KW_SETS && LA139_0 <= KW_SKEWED)||(LA139_0 >= KW_SNAPSHOT && LA139_0 <= KW_SSL)||(LA139_0 >= KW_STATISTICS && LA139_0 <= KW_SUMMARY)||LA139_0==KW_TABLES||(LA139_0 >= KW_TBLPROPERTIES && LA139_0 <= KW_TERMINATED)||LA139_0==KW_TINYINT||(LA139_0 >= KW_TOUCH && LA139_0 <= KW_TRANSACTIONS)||LA139_0==KW_UNARCHIVE||LA139_0==KW_UNDO||LA139_0==KW_UNIONTYPE||(LA139_0 >= KW_UNLOCK && LA139_0 <= KW_UNSIGNED)||(LA139_0 >= KW_URI && LA139_0 <= KW_USE)||(LA139_0 >= KW_UTC && LA139_0 <= KW_VALIDATE)||LA139_0==KW_VALUE_TYPE||(LA139_0 >= KW_VECTORIZATION && LA139_0 <= KW_WEEK)||LA139_0==KW_WHILE||(LA139_0 >= KW_WORK && LA139_0 <= KW_YEAR)||LA139_0==StringLiteral||LA139_0==KW_BATCH||LA139_0==KW_DAYOFWEEK||LA139_0==KW_HOLD_DDLTIME||LA139_0==KW_IGNORE||LA139_0==KW_NO_DROP||LA139_0==KW_OFFLINE||LA139_0==KW_PROTECTION||LA139_0==KW_READONLY) ) {
						alt139=2;
					}
					switch (alt139) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:29: KW_LIKE showFunctionIdentifier
							{
							KW_LIKE465=(Token)match(input,KW_LIKE,FOLLOW_KW_LIKE_in_showStatement7944); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_LIKE.add(KW_LIKE465);

							pushFollow(FOLLOW_showFunctionIdentifier_in_showStatement7946);
							showFunctionIdentifier466=showFunctionIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showFunctionIdentifier.add(showFunctionIdentifier466.getTree());
							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:60: showFunctionIdentifier
							{
							pushFollow(FOLLOW_showFunctionIdentifier_in_showStatement7948);
							showFunctionIdentifier467=showFunctionIdentifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_showFunctionIdentifier.add(showFunctionIdentifier467.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: KW_LIKE, showFunctionIdentifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1539:86: -> ^( TOK_SHOWFUNCTIONS ( KW_LIKE )? ( showFunctionIdentifier )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:89: ^( TOK_SHOWFUNCTIONS ( KW_LIKE )? ( showFunctionIdentifier )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWFUNCTIONS, "TOK_SHOWFUNCTIONS"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:109: ( KW_LIKE )?
						if ( stream_KW_LIKE.hasNext() ) {
							adaptor.addChild(root_1, stream_KW_LIKE.nextNode());
						}
						stream_KW_LIKE.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1539:118: ( showFunctionIdentifier )?
						if ( stream_showFunctionIdentifier.hasNext() ) {
							adaptor.addChild(root_1, stream_showFunctionIdentifier.nextTree());
						}
						stream_showFunctionIdentifier.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1540:7: KW_SHOW KW_PARTITIONS tabName= tableName ( partitionSpec )?
					{
					KW_SHOW468=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement7971); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW468);

					KW_PARTITIONS469=(Token)match(input,KW_PARTITIONS,FOLLOW_KW_PARTITIONS_in_showStatement7973); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_PARTITIONS.add(KW_PARTITIONS469);

					pushFollow(FOLLOW_tableName_in_showStatement7977);
					tabName=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tabName.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1540:47: ( partitionSpec )?
					int alt140=2;
					int LA140_0 = input.LA(1);
					if ( (LA140_0==KW_PARTITION) ) {
						alt140=1;
					}
					switch (alt140) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1540:47: partitionSpec
							{
							pushFollow(FOLLOW_partitionSpec_in_showStatement7979);
							partitionSpec470=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec470.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: tabName, partitionSpec
					// token labels: 
					// rule labels: tabName, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_tabName=new RewriteRuleSubtreeStream(adaptor,"rule tabName",tabName!=null?tabName.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1540:62: -> ^( TOK_SHOWPARTITIONS $tabName ( partitionSpec )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1540:65: ^( TOK_SHOWPARTITIONS $tabName ( partitionSpec )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWPARTITIONS, "TOK_SHOWPARTITIONS"), root_1);
						adaptor.addChild(root_1, stream_tabName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1540:95: ( partitionSpec )?
						if ( stream_partitionSpec.hasNext() ) {
							adaptor.addChild(root_1, stream_partitionSpec.nextTree());
						}
						stream_partitionSpec.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1541:7: KW_SHOW KW_CREATE ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) db_name= identifier -> ^( TOK_SHOW_CREATEDATABASE $db_name) | KW_TABLE tabName= tableName -> ^( TOK_SHOW_CREATETABLE $tabName) )
					{
					KW_SHOW471=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8001); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW471);

					KW_CREATE472=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_showStatement8003); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE472);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1541:25: ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) db_name= identifier -> ^( TOK_SHOW_CREATEDATABASE $db_name) | KW_TABLE tabName= tableName -> ^( TOK_SHOW_CREATETABLE $tabName) )
					int alt142=2;
					int LA142_0 = input.LA(1);
					if ( (LA142_0==KW_DATABASE) && (synpred12_HiveParser())) {
						alt142=1;
					}
					else if ( (LA142_0==KW_SCHEMA) && (synpred12_HiveParser())) {
						alt142=1;
					}
					else if ( (LA142_0==KW_TABLE) ) {
						alt142=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 142, 0, input);
						throw nvae;
					}

					switch (alt142) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1542:9: ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) db_name= identifier
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1542:36: ( KW_DATABASE | KW_SCHEMA )
							int alt141=2;
							int LA141_0 = input.LA(1);
							if ( (LA141_0==KW_DATABASE) ) {
								alt141=1;
							}
							else if ( (LA141_0==KW_SCHEMA) ) {
								alt141=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 141, 0, input);
								throw nvae;
							}

							switch (alt141) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1542:37: KW_DATABASE
									{
									KW_DATABASE473=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_showStatement8024); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE473);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1542:49: KW_SCHEMA
									{
									KW_SCHEMA474=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_showStatement8026); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA474);

									}
									break;

							}

							pushFollow(FOLLOW_identifier_in_showStatement8031);
							db_name=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(db_name.getTree());
							// AST REWRITE
							// elements: db_name
							// token labels: 
							// rule labels: db_name, retval
							// token list labels: 
							// rule list labels: 
							// wildcard labels: 
							if ( state.backtracking==0 ) {
							retval.tree = root_0;
							RewriteRuleSubtreeStream stream_db_name=new RewriteRuleSubtreeStream(adaptor,"rule db_name",db_name!=null?db_name.getTree():null);
							RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

							root_0 = (ASTNode)adaptor.nil();
							// 1542:79: -> ^( TOK_SHOW_CREATEDATABASE $db_name)
							{
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1542:82: ^( TOK_SHOW_CREATEDATABASE $db_name)
								{
								ASTNode root_1 = (ASTNode)adaptor.nil();
								root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_CREATEDATABASE, "TOK_SHOW_CREATEDATABASE"), root_1);
								adaptor.addChild(root_1, stream_db_name.nextTree());
								adaptor.addChild(root_0, root_1);
								}

							}


							retval.tree = root_0;
							}

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1544:9: KW_TABLE tabName= tableName
							{
							KW_TABLE475=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_showStatement8060); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE475);

							pushFollow(FOLLOW_tableName_in_showStatement8064);
							tabName=tableName();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableName.add(tabName.getTree());
							// AST REWRITE
							// elements: tabName
							// token labels: 
							// rule labels: tabName, retval
							// token list labels: 
							// rule list labels: 
							// wildcard labels: 
							if ( state.backtracking==0 ) {
							retval.tree = root_0;
							RewriteRuleSubtreeStream stream_tabName=new RewriteRuleSubtreeStream(adaptor,"rule tabName",tabName!=null?tabName.getTree():null);
							RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

							root_0 = (ASTNode)adaptor.nil();
							// 1544:36: -> ^( TOK_SHOW_CREATETABLE $tabName)
							{
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1544:39: ^( TOK_SHOW_CREATETABLE $tabName)
								{
								ASTNode root_1 = (ASTNode)adaptor.nil();
								root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_CREATETABLE, "TOK_SHOW_CREATETABLE"), root_1);
								adaptor.addChild(root_1, stream_tabName.nextTree());
								adaptor.addChild(root_0, root_1);
								}

							}


							retval.tree = root_0;
							}

							}
							break;

					}

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:7: KW_SHOW KW_TABLE KW_EXTENDED ( ( KW_FROM | KW_IN ) db_name= identifier )? KW_LIKE showStmtIdentifier ( partitionSpec )?
					{
					KW_SHOW476=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8089); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW476);

					KW_TABLE477=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_showStatement8091); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE477);

					KW_EXTENDED478=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_showStatement8093); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_EXTENDED.add(KW_EXTENDED478);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:36: ( ( KW_FROM | KW_IN ) db_name= identifier )?
					int alt144=2;
					int LA144_0 = input.LA(1);
					if ( (LA144_0==KW_FROM||LA144_0==KW_IN) ) {
						alt144=1;
					}
					switch (alt144) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:37: ( KW_FROM | KW_IN ) db_name= identifier
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:37: ( KW_FROM | KW_IN )
							int alt143=2;
							int LA143_0 = input.LA(1);
							if ( (LA143_0==KW_FROM) ) {
								alt143=1;
							}
							else if ( (LA143_0==KW_IN) ) {
								alt143=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 143, 0, input);
								throw nvae;
							}

							switch (alt143) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:38: KW_FROM
									{
									KW_FROM479=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_showStatement8097); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM479);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:46: KW_IN
									{
									KW_IN480=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_showStatement8099); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN480);

									}
									break;

							}

							pushFollow(FOLLOW_identifier_in_showStatement8104);
							db_name=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(db_name.getTree());
							}
							break;

					}

					KW_LIKE481=(Token)match(input,KW_LIKE,FOLLOW_KW_LIKE_in_showStatement8108); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LIKE.add(KW_LIKE481);

					pushFollow(FOLLOW_showStmtIdentifier_in_showStatement8110);
					showStmtIdentifier482=showStmtIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier482.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:101: ( partitionSpec )?
					int alt145=2;
					int LA145_0 = input.LA(1);
					if ( (LA145_0==KW_PARTITION) ) {
						alt145=1;
					}
					switch (alt145) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1546:101: partitionSpec
							{
							pushFollow(FOLLOW_partitionSpec_in_showStatement8112);
							partitionSpec483=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec483.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: db_name, partitionSpec, showStmtIdentifier
					// token labels: 
					// rule labels: db_name, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_db_name=new RewriteRuleSubtreeStream(adaptor,"rule db_name",db_name!=null?db_name.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1547:5: -> ^( TOK_SHOW_TABLESTATUS showStmtIdentifier ( $db_name)? ( partitionSpec )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1547:8: ^( TOK_SHOW_TABLESTATUS showStmtIdentifier ( $db_name)? ( partitionSpec )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_TABLESTATUS, "TOK_SHOW_TABLESTATUS"), root_1);
						adaptor.addChild(root_1, stream_showStmtIdentifier.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1547:51: ( $db_name)?
						if ( stream_db_name.hasNext() ) {
							adaptor.addChild(root_1, stream_db_name.nextTree());
						}
						stream_db_name.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1547:60: ( partitionSpec )?
						if ( stream_partitionSpec.hasNext() ) {
							adaptor.addChild(root_1, stream_partitionSpec.nextTree());
						}
						stream_partitionSpec.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1548:7: KW_SHOW KW_TBLPROPERTIES tableName ( LPAREN prptyName= StringLiteral RPAREN )?
					{
					KW_SHOW484=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8140); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW484);

					KW_TBLPROPERTIES485=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_showStatement8142); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TBLPROPERTIES.add(KW_TBLPROPERTIES485);

					pushFollow(FOLLOW_tableName_in_showStatement8144);
					tableName486=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName486.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1548:42: ( LPAREN prptyName= StringLiteral RPAREN )?
					int alt146=2;
					int LA146_0 = input.LA(1);
					if ( (LA146_0==LPAREN) ) {
						alt146=1;
					}
					switch (alt146) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1548:43: LPAREN prptyName= StringLiteral RPAREN
							{
							LPAREN487=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_showStatement8147); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN487);

							prptyName=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_showStatement8151); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_StringLiteral.add(prptyName);

							RPAREN488=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_showStatement8153); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN488);

							}
							break;

					}

					// AST REWRITE
					// elements: prptyName, tableName
					// token labels: prptyName
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_prptyName=new RewriteRuleTokenStream(adaptor,"token prptyName",prptyName);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1548:83: -> ^( TOK_SHOW_TBLPROPERTIES tableName ( $prptyName)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1548:86: ^( TOK_SHOW_TBLPROPERTIES tableName ( $prptyName)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_TBLPROPERTIES, "TOK_SHOW_TBLPROPERTIES"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1548:122: ( $prptyName)?
						if ( stream_prptyName.hasNext() ) {
							adaptor.addChild(root_1, stream_prptyName.nextNode());
						}
						stream_prptyName.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1549:7: KW_SHOW KW_LOCKS ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWDBLOCKS $dbName ( $isExtended)? ) | (parttype= partTypeExpr )? (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWLOCKS ( $parttype)? ( $isExtended)? ) )
					{
					KW_SHOW489=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8175); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW489);

					KW_LOCKS490=(Token)match(input,KW_LOCKS,FOLLOW_KW_LOCKS_in_showStatement8177); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LOCKS.add(KW_LOCKS490);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1550:7: ( ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWDBLOCKS $dbName ( $isExtended)? ) | (parttype= partTypeExpr )? (isExtended= KW_EXTENDED )? -> ^( TOK_SHOWLOCKS ( $parttype)? ( $isExtended)? ) )
					int alt151=2;
					int LA151_0 = input.LA(1);
					if ( (LA151_0==KW_DATABASE) && (synpred13_HiveParser())) {
						alt151=1;
					}
					else if ( (LA151_0==KW_SCHEMA) ) {
						int LA151_2 = input.LA(2);
						if ( (LA151_2==Identifier) ) {
							int LA151_7 = input.LA(3);
							if ( (synpred13_HiveParser()) ) {
								alt151=1;
							}
							else if ( (true) ) {
								alt151=2;
							}

						}
						else if ( (LA151_2==EOF||LA151_2==DOT||(LA151_2 >= KW_ABORT && LA151_2 <= KW_AFTER)||LA151_2==KW_ANALYZE||LA151_2==KW_ARCHIVE||LA151_2==KW_ASC||(LA151_2 >= KW_AUTOCOMMIT && LA151_2 <= KW_BEFORE)||(LA151_2 >= KW_BUCKET && LA151_2 <= KW_BUCKETS)||(LA151_2 >= KW_CACHE && LA151_2 <= KW_CASCADE)||LA151_2==KW_CHANGE||(LA151_2 >= KW_CLUSTER && LA151_2 <= KW_COLLECTION)||(LA151_2 >= KW_COLUMNS && LA151_2 <= KW_COMMENT)||(LA151_2 >= KW_COMPACT && LA151_2 <= KW_CONCATENATE)||LA151_2==KW_CONTINUE||LA151_2==KW_DATA||LA151_2==KW_DATABASES||(LA151_2 >= KW_DATETIME && LA151_2 <= KW_DBPROPERTIES)||(LA151_2 >= KW_DEFERRED && LA151_2 <= KW_DEFINED)||(LA151_2 >= KW_DELIMITED && LA151_2 <= KW_DESC)||(LA151_2 >= KW_DETAIL && LA151_2 <= KW_DISABLE)||LA151_2==KW_DISTRIBUTE||LA151_2==KW_DOW||(LA151_2 >= KW_DUMP && LA151_2 <= KW_ELEM_TYPE)||LA151_2==KW_ENABLE||LA151_2==KW_ESCAPED||LA151_2==KW_EXCLUSIVE||(LA151_2 >= KW_EXPLAIN && LA151_2 <= KW_EXTENDED)||(LA151_2 >= KW_FIELDS && LA151_2 <= KW_FIRST)||(LA151_2 >= KW_FORMAT && LA151_2 <= KW_FORMATTED)||LA151_2==KW_FUNCTIONS||(LA151_2 >= KW_HOUR && LA151_2 <= KW_IDXPROPERTIES)||(LA151_2 >= KW_INDEX && LA151_2 <= KW_INDEXES)||(LA151_2 >= KW_INPATH && LA151_2 <= KW_INPUTFORMAT)||(LA151_2 >= KW_ISOLATION && LA151_2 <= KW_JAR)||(LA151_2 >= KW_KEY && LA151_2 <= KW_LAST)||LA151_2==KW_LEVEL||(LA151_2 >= KW_LIMIT && LA151_2 <= KW_LOAD)||(LA151_2 >= KW_LOCATION && LA151_2 <= KW_LONG)||(LA151_2 >= KW_MAPJOIN && LA151_2 <= KW_MATERIALIZED)||LA151_2==KW_METADATA||(LA151_2 >= KW_MINUTE && LA151_2 <= KW_MONTH)||LA151_2==KW_MSCK||(LA151_2 >= KW_NORELY && LA151_2 <= KW_NOSCAN)||LA151_2==KW_NOVALIDATE||LA151_2==KW_NULLS||LA151_2==KW_OFFSET||(LA151_2 >= KW_OPERATOR && LA151_2 <= KW_OPTION)||(LA151_2 >= KW_OUTPUTDRIVER && LA151_2 <= KW_OUTPUTFORMAT)||(LA151_2 >= KW_OVERWRITE && LA151_2 <= KW_OWNER)||(LA151_2 >= KW_PARTITION && LA151_2 <= KW_PARTITIONS)||LA151_2==KW_PLUS||LA151_2==KW_PRETTY||LA151_2==KW_PRINCIPALS||(LA151_2 >= KW_PURGE && LA151_2 <= KW_QUARTER)||LA151_2==KW_READ||(LA151_2 >= KW_REBUILD && LA151_2 <= KW_RECORDWRITER)||(LA151_2 >= KW_RELOAD && LA151_2 <= KW_RESTRICT)||LA151_2==KW_REWRITE||(LA151_2 >= KW_ROLE && LA151_2 <= KW_ROLES)||(LA151_2 >= KW_SCHEMA && LA151_2 <= KW_SECOND)||(LA151_2 >= KW_SEMI && LA151_2 <= KW_SERVER)||(LA151_2 >= KW_SETS && LA151_2 <= KW_SKEWED)||(LA151_2 >= KW_SNAPSHOT && LA151_2 <= KW_SSL)||(LA151_2 >= KW_STATISTICS && LA151_2 <= KW_SUMMARY)||LA151_2==KW_TABLES||(LA151_2 >= KW_TBLPROPERTIES && LA151_2 <= KW_TERMINATED)||LA151_2==KW_TINYINT||(LA151_2 >= KW_TOUCH && LA151_2 <= KW_TRANSACTIONS)||LA151_2==KW_UNARCHIVE||LA151_2==KW_UNDO||LA151_2==KW_UNIONTYPE||(LA151_2 >= KW_UNLOCK && LA151_2 <= KW_UNSIGNED)||(LA151_2 >= KW_URI && LA151_2 <= KW_USE)||(LA151_2 >= KW_UTC && LA151_2 <= KW_VALIDATE)||LA151_2==KW_VALUE_TYPE||(LA151_2 >= KW_VECTORIZATION && LA151_2 <= KW_WEEK)||LA151_2==KW_WHILE||(LA151_2 >= KW_WORK && LA151_2 <= KW_YEAR)||LA151_2==KW_BATCH||LA151_2==KW_DAYOFWEEK||LA151_2==KW_HOLD_DDLTIME||LA151_2==KW_IGNORE||LA151_2==KW_NO_DROP||LA151_2==KW_OFFLINE||LA151_2==KW_PROTECTION||LA151_2==KW_READONLY) ) {
							alt151=2;
						}

						else {
							if (state.backtracking>0) {state.failed=true; return retval;}
							int nvaeMark = input.mark();
							try {
								input.consume();
								NoViableAltException nvae =
									new NoViableAltException("", 151, 2, input);
								throw nvae;
							} finally {
								input.rewind(nvaeMark);
							}
						}

					}
					else if ( (LA151_0==EOF||LA151_0==Identifier||(LA151_0 >= KW_ABORT && LA151_0 <= KW_AFTER)||LA151_0==KW_ANALYZE||LA151_0==KW_ARCHIVE||LA151_0==KW_ASC||(LA151_0 >= KW_AUTOCOMMIT && LA151_0 <= KW_BEFORE)||(LA151_0 >= KW_BUCKET && LA151_0 <= KW_BUCKETS)||(LA151_0 >= KW_CACHE && LA151_0 <= KW_CASCADE)||LA151_0==KW_CHANGE||(LA151_0 >= KW_CLUSTER && LA151_0 <= KW_COLLECTION)||(LA151_0 >= KW_COLUMNS && LA151_0 <= KW_COMMENT)||(LA151_0 >= KW_COMPACT && LA151_0 <= KW_CONCATENATE)||LA151_0==KW_CONTINUE||LA151_0==KW_DATA||LA151_0==KW_DATABASES||(LA151_0 >= KW_DATETIME && LA151_0 <= KW_DBPROPERTIES)||(LA151_0 >= KW_DEFERRED && LA151_0 <= KW_DEFINED)||(LA151_0 >= KW_DELIMITED && LA151_0 <= KW_DESC)||(LA151_0 >= KW_DETAIL && LA151_0 <= KW_DISABLE)||LA151_0==KW_DISTRIBUTE||LA151_0==KW_DOW||(LA151_0 >= KW_DUMP && LA151_0 <= KW_ELEM_TYPE)||LA151_0==KW_ENABLE||LA151_0==KW_ESCAPED||LA151_0==KW_EXCLUSIVE||(LA151_0 >= KW_EXPLAIN && LA151_0 <= KW_EXTENDED)||(LA151_0 >= KW_FIELDS && LA151_0 <= KW_FIRST)||(LA151_0 >= KW_FORMAT && LA151_0 <= KW_FORMATTED)||LA151_0==KW_FUNCTIONS||(LA151_0 >= KW_HOUR && LA151_0 <= KW_IDXPROPERTIES)||(LA151_0 >= KW_INDEX && LA151_0 <= KW_INDEXES)||(LA151_0 >= KW_INPATH && LA151_0 <= KW_INPUTFORMAT)||(LA151_0 >= KW_ISOLATION && LA151_0 <= KW_JAR)||(LA151_0 >= KW_KEY && LA151_0 <= KW_LAST)||LA151_0==KW_LEVEL||(LA151_0 >= KW_LIMIT && LA151_0 <= KW_LOAD)||(LA151_0 >= KW_LOCATION && LA151_0 <= KW_LONG)||(LA151_0 >= KW_MAPJOIN && LA151_0 <= KW_MATERIALIZED)||LA151_0==KW_METADATA||(LA151_0 >= KW_MINUTE && LA151_0 <= KW_MONTH)||LA151_0==KW_MSCK||(LA151_0 >= KW_NORELY && LA151_0 <= KW_NOSCAN)||LA151_0==KW_NOVALIDATE||LA151_0==KW_NULLS||LA151_0==KW_OFFSET||(LA151_0 >= KW_OPERATOR && LA151_0 <= KW_OPTION)||(LA151_0 >= KW_OUTPUTDRIVER && LA151_0 <= KW_OUTPUTFORMAT)||(LA151_0 >= KW_OVERWRITE && LA151_0 <= KW_OWNER)||(LA151_0 >= KW_PARTITIONED && LA151_0 <= KW_PARTITIONS)||LA151_0==KW_PLUS||LA151_0==KW_PRETTY||LA151_0==KW_PRINCIPALS||(LA151_0 >= KW_PURGE && LA151_0 <= KW_QUARTER)||LA151_0==KW_READ||(LA151_0 >= KW_REBUILD && LA151_0 <= KW_RECORDWRITER)||(LA151_0 >= KW_RELOAD && LA151_0 <= KW_RESTRICT)||LA151_0==KW_REWRITE||(LA151_0 >= KW_ROLE && LA151_0 <= KW_ROLES)||(LA151_0 >= KW_SCHEMAS && LA151_0 <= KW_SECOND)||(LA151_0 >= KW_SEMI && LA151_0 <= KW_SERVER)||(LA151_0 >= KW_SETS && LA151_0 <= KW_SKEWED)||(LA151_0 >= KW_SNAPSHOT && LA151_0 <= KW_SSL)||(LA151_0 >= KW_STATISTICS && LA151_0 <= KW_SUMMARY)||LA151_0==KW_TABLES||(LA151_0 >= KW_TBLPROPERTIES && LA151_0 <= KW_TERMINATED)||LA151_0==KW_TINYINT||(LA151_0 >= KW_TOUCH && LA151_0 <= KW_TRANSACTIONS)||LA151_0==KW_UNARCHIVE||LA151_0==KW_UNDO||LA151_0==KW_UNIONTYPE||(LA151_0 >= KW_UNLOCK && LA151_0 <= KW_UNSIGNED)||(LA151_0 >= KW_URI && LA151_0 <= KW_USE)||(LA151_0 >= KW_UTC && LA151_0 <= KW_VALIDATE)||LA151_0==KW_VALUE_TYPE||(LA151_0 >= KW_VECTORIZATION && LA151_0 <= KW_WEEK)||LA151_0==KW_WHILE||(LA151_0 >= KW_WORK && LA151_0 <= KW_YEAR)||LA151_0==KW_BATCH||LA151_0==KW_DAYOFWEEK||LA151_0==KW_HOLD_DDLTIME||LA151_0==KW_IGNORE||LA151_0==KW_NO_DROP||LA151_0==KW_OFFLINE||LA151_0==KW_PROTECTION||LA151_0==KW_READONLY) ) {
						alt151=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 151, 0, input);
						throw nvae;
					}

					switch (alt151) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:7: ( KW_DATABASE | KW_SCHEMA )=> ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) (isExtended= KW_EXTENDED )?
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:34: ( KW_DATABASE | KW_SCHEMA )
							int alt147=2;
							int LA147_0 = input.LA(1);
							if ( (LA147_0==KW_DATABASE) ) {
								alt147=1;
							}
							else if ( (LA147_0==KW_SCHEMA) ) {
								alt147=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 147, 0, input);
								throw nvae;
							}

							switch (alt147) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:35: KW_DATABASE
									{
									KW_DATABASE491=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_showStatement8203); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE491);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:47: KW_SCHEMA
									{
									KW_SCHEMA492=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_showStatement8205); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA492);

									}
									break;

							}

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:58: (dbName= Identifier )
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:59: dbName= Identifier
							{
							dbName=(Token)match(input,Identifier,FOLLOW_Identifier_in_showStatement8211); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_Identifier.add(dbName);

							}

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:78: (isExtended= KW_EXTENDED )?
							int alt148=2;
							int LA148_0 = input.LA(1);
							if ( (LA148_0==KW_EXTENDED) ) {
								alt148=1;
							}
							switch (alt148) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:79: isExtended= KW_EXTENDED
									{
									isExtended=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_showStatement8217); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_EXTENDED.add(isExtended);

									}
									break;

							}

							// AST REWRITE
							// elements: dbName, isExtended
							// token labels: dbName, isExtended
							// rule labels: retval
							// token list labels: 
							// rule list labels: 
							// wildcard labels: 
							if ( state.backtracking==0 ) {
							retval.tree = root_0;
							RewriteRuleTokenStream stream_dbName=new RewriteRuleTokenStream(adaptor,"token dbName",dbName);
							RewriteRuleTokenStream stream_isExtended=new RewriteRuleTokenStream(adaptor,"token isExtended",isExtended);
							RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

							root_0 = (ASTNode)adaptor.nil();
							// 1551:104: -> ^( TOK_SHOWDBLOCKS $dbName ( $isExtended)? )
							{
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:107: ^( TOK_SHOWDBLOCKS $dbName ( $isExtended)? )
								{
								ASTNode root_1 = (ASTNode)adaptor.nil();
								root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWDBLOCKS, "TOK_SHOWDBLOCKS"), root_1);
								adaptor.addChild(root_1, stream_dbName.nextNode());
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:134: ( $isExtended)?
								if ( stream_isExtended.hasNext() ) {
									adaptor.addChild(root_1, stream_isExtended.nextNode());
								}
								stream_isExtended.reset();

								adaptor.addChild(root_0, root_1);
								}

							}


							retval.tree = root_0;
							}

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:7: (parttype= partTypeExpr )? (isExtended= KW_EXTENDED )?
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:7: (parttype= partTypeExpr )?
							int alt149=2;
							int LA149_0 = input.LA(1);
							if ( (LA149_0==Identifier||(LA149_0 >= KW_ABORT && LA149_0 <= KW_AFTER)||LA149_0==KW_ANALYZE||LA149_0==KW_ARCHIVE||LA149_0==KW_ASC||(LA149_0 >= KW_AUTOCOMMIT && LA149_0 <= KW_BEFORE)||(LA149_0 >= KW_BUCKET && LA149_0 <= KW_BUCKETS)||(LA149_0 >= KW_CACHE && LA149_0 <= KW_CASCADE)||LA149_0==KW_CHANGE||(LA149_0 >= KW_CLUSTER && LA149_0 <= KW_COLLECTION)||(LA149_0 >= KW_COLUMNS && LA149_0 <= KW_COMMENT)||(LA149_0 >= KW_COMPACT && LA149_0 <= KW_CONCATENATE)||LA149_0==KW_CONTINUE||LA149_0==KW_DATA||LA149_0==KW_DATABASES||(LA149_0 >= KW_DATETIME && LA149_0 <= KW_DBPROPERTIES)||(LA149_0 >= KW_DEFERRED && LA149_0 <= KW_DEFINED)||(LA149_0 >= KW_DELIMITED && LA149_0 <= KW_DESC)||(LA149_0 >= KW_DETAIL && LA149_0 <= KW_DISABLE)||LA149_0==KW_DISTRIBUTE||LA149_0==KW_DOW||(LA149_0 >= KW_DUMP && LA149_0 <= KW_ELEM_TYPE)||LA149_0==KW_ENABLE||LA149_0==KW_ESCAPED||LA149_0==KW_EXCLUSIVE||(LA149_0 >= KW_EXPLAIN && LA149_0 <= KW_EXPRESSION)||(LA149_0 >= KW_FIELDS && LA149_0 <= KW_FIRST)||(LA149_0 >= KW_FORMAT && LA149_0 <= KW_FORMATTED)||LA149_0==KW_FUNCTIONS||(LA149_0 >= KW_HOUR && LA149_0 <= KW_IDXPROPERTIES)||(LA149_0 >= KW_INDEX && LA149_0 <= KW_INDEXES)||(LA149_0 >= KW_INPATH && LA149_0 <= KW_INPUTFORMAT)||(LA149_0 >= KW_ISOLATION && LA149_0 <= KW_JAR)||(LA149_0 >= KW_KEY && LA149_0 <= KW_LAST)||LA149_0==KW_LEVEL||(LA149_0 >= KW_LIMIT && LA149_0 <= KW_LOAD)||(LA149_0 >= KW_LOCATION && LA149_0 <= KW_LONG)||(LA149_0 >= KW_MAPJOIN && LA149_0 <= KW_MATERIALIZED)||LA149_0==KW_METADATA||(LA149_0 >= KW_MINUTE && LA149_0 <= KW_MONTH)||LA149_0==KW_MSCK||(LA149_0 >= KW_NORELY && LA149_0 <= KW_NOSCAN)||LA149_0==KW_NOVALIDATE||LA149_0==KW_NULLS||LA149_0==KW_OFFSET||(LA149_0 >= KW_OPERATOR && LA149_0 <= KW_OPTION)||(LA149_0 >= KW_OUTPUTDRIVER && LA149_0 <= KW_OUTPUTFORMAT)||(LA149_0 >= KW_OVERWRITE && LA149_0 <= KW_OWNER)||(LA149_0 >= KW_PARTITIONED && LA149_0 <= KW_PARTITIONS)||LA149_0==KW_PLUS||LA149_0==KW_PRETTY||LA149_0==KW_PRINCIPALS||(LA149_0 >= KW_PURGE && LA149_0 <= KW_QUARTER)||LA149_0==KW_READ||(LA149_0 >= KW_REBUILD && LA149_0 <= KW_RECORDWRITER)||(LA149_0 >= KW_RELOAD && LA149_0 <= KW_RESTRICT)||LA149_0==KW_REWRITE||(LA149_0 >= KW_ROLE && LA149_0 <= KW_ROLES)||(LA149_0 >= KW_SCHEMA && LA149_0 <= KW_SECOND)||(LA149_0 >= KW_SEMI && LA149_0 <= KW_SERVER)||(LA149_0 >= KW_SETS && LA149_0 <= KW_SKEWED)||(LA149_0 >= KW_SNAPSHOT && LA149_0 <= KW_SSL)||(LA149_0 >= KW_STATISTICS && LA149_0 <= KW_SUMMARY)||LA149_0==KW_TABLES||(LA149_0 >= KW_TBLPROPERTIES && LA149_0 <= KW_TERMINATED)||LA149_0==KW_TINYINT||(LA149_0 >= KW_TOUCH && LA149_0 <= KW_TRANSACTIONS)||LA149_0==KW_UNARCHIVE||LA149_0==KW_UNDO||LA149_0==KW_UNIONTYPE||(LA149_0 >= KW_UNLOCK && LA149_0 <= KW_UNSIGNED)||(LA149_0 >= KW_URI && LA149_0 <= KW_USE)||(LA149_0 >= KW_UTC && LA149_0 <= KW_VALIDATE)||LA149_0==KW_VALUE_TYPE||(LA149_0 >= KW_VECTORIZATION && LA149_0 <= KW_WEEK)||LA149_0==KW_WHILE||(LA149_0 >= KW_WORK && LA149_0 <= KW_YEAR)||LA149_0==KW_BATCH||LA149_0==KW_DAYOFWEEK||LA149_0==KW_HOLD_DDLTIME||LA149_0==KW_IGNORE||LA149_0==KW_NO_DROP||LA149_0==KW_OFFLINE||LA149_0==KW_PROTECTION||LA149_0==KW_READONLY) ) {
								alt149=1;
							}
							switch (alt149) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:8: parttype= partTypeExpr
									{
									pushFollow(FOLLOW_partTypeExpr_in_showStatement8251);
									parttype=partTypeExpr();
									state._fsp--;
									if (state.failed) return retval;
									if ( state.backtracking==0 ) stream_partTypeExpr.add(parttype.getTree());
									}
									break;

							}

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:32: (isExtended= KW_EXTENDED )?
							int alt150=2;
							int LA150_0 = input.LA(1);
							if ( (LA150_0==KW_EXTENDED) ) {
								alt150=1;
							}
							switch (alt150) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:33: isExtended= KW_EXTENDED
									{
									isExtended=(Token)match(input,KW_EXTENDED,FOLLOW_KW_EXTENDED_in_showStatement8258); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_EXTENDED.add(isExtended);

									}
									break;

							}

							// AST REWRITE
							// elements: isExtended, parttype
							// token labels: isExtended
							// rule labels: parttype, retval
							// token list labels: 
							// rule list labels: 
							// wildcard labels: 
							if ( state.backtracking==0 ) {
							retval.tree = root_0;
							RewriteRuleTokenStream stream_isExtended=new RewriteRuleTokenStream(adaptor,"token isExtended",isExtended);
							RewriteRuleSubtreeStream stream_parttype=new RewriteRuleSubtreeStream(adaptor,"rule parttype",parttype!=null?parttype.getTree():null);
							RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

							root_0 = (ASTNode)adaptor.nil();
							// 1553:58: -> ^( TOK_SHOWLOCKS ( $parttype)? ( $isExtended)? )
							{
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:61: ^( TOK_SHOWLOCKS ( $parttype)? ( $isExtended)? )
								{
								ASTNode root_1 = (ASTNode)adaptor.nil();
								root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWLOCKS, "TOK_SHOWLOCKS"), root_1);
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:78: ( $parttype)?
								if ( stream_parttype.hasNext() ) {
									adaptor.addChild(root_1, stream_parttype.nextTree());
								}
								stream_parttype.reset();

								// org/apache/hadoop/hive/ql/parse/HiveParser.g:1553:89: ( $isExtended)?
								if ( stream_isExtended.hasNext() ) {
									adaptor.addChild(root_1, stream_isExtended.nextNode());
								}
								stream_isExtended.reset();

								adaptor.addChild(root_0, root_1);
								}

							}


							retval.tree = root_0;
							}

							}
							break;

					}

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:7: KW_SHOW (showOptions= KW_FORMATTED )? ( KW_INDEX | KW_INDEXES ) KW_ON showStmtIdentifier ( ( KW_FROM | KW_IN ) db_name= identifier )?
					{
					KW_SHOW493=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8290); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW493);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:15: (showOptions= KW_FORMATTED )?
					int alt152=2;
					int LA152_0 = input.LA(1);
					if ( (LA152_0==KW_FORMATTED) ) {
						alt152=1;
					}
					switch (alt152) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:16: showOptions= KW_FORMATTED
							{
							showOptions=(Token)match(input,KW_FORMATTED,FOLLOW_KW_FORMATTED_in_showStatement8295); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_FORMATTED.add(showOptions);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:43: ( KW_INDEX | KW_INDEXES )
					int alt153=2;
					int LA153_0 = input.LA(1);
					if ( (LA153_0==KW_INDEX) ) {
						alt153=1;
					}
					else if ( (LA153_0==KW_INDEXES) ) {
						alt153=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 153, 0, input);
						throw nvae;
					}

					switch (alt153) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:44: KW_INDEX
							{
							KW_INDEX494=(Token)match(input,KW_INDEX,FOLLOW_KW_INDEX_in_showStatement8300); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_INDEX.add(KW_INDEX494);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:53: KW_INDEXES
							{
							KW_INDEXES495=(Token)match(input,KW_INDEXES,FOLLOW_KW_INDEXES_in_showStatement8302); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_INDEXES.add(KW_INDEXES495);

							}
							break;

					}

					KW_ON496=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_showStatement8305); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON496);

					pushFollow(FOLLOW_showStmtIdentifier_in_showStatement8307);
					showStmtIdentifier497=showStmtIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_showStmtIdentifier.add(showStmtIdentifier497.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:90: ( ( KW_FROM | KW_IN ) db_name= identifier )?
					int alt155=2;
					int LA155_0 = input.LA(1);
					if ( (LA155_0==KW_FROM||LA155_0==KW_IN) ) {
						alt155=1;
					}
					switch (alt155) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:91: ( KW_FROM | KW_IN ) db_name= identifier
							{
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:91: ( KW_FROM | KW_IN )
							int alt154=2;
							int LA154_0 = input.LA(1);
							if ( (LA154_0==KW_FROM) ) {
								alt154=1;
							}
							else if ( (LA154_0==KW_IN) ) {
								alt154=2;
							}

							else {
								if (state.backtracking>0) {state.failed=true; return retval;}
								NoViableAltException nvae =
									new NoViableAltException("", 154, 0, input);
								throw nvae;
							}

							switch (alt154) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:92: KW_FROM
									{
									KW_FROM498=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_showStatement8311); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM498);

									}
									break;
								case 2 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:1555:100: KW_IN
									{
									KW_IN499=(Token)match(input,KW_IN,FOLLOW_KW_IN_in_showStatement8313); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_KW_IN.add(KW_IN499);

									}
									break;

							}

							pushFollow(FOLLOW_identifier_in_showStatement8318);
							db_name=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_identifier.add(db_name.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: showOptions, db_name, showStmtIdentifier
					// token labels: showOptions
					// rule labels: db_name, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_showOptions=new RewriteRuleTokenStream(adaptor,"token showOptions",showOptions);
					RewriteRuleSubtreeStream stream_db_name=new RewriteRuleSubtreeStream(adaptor,"rule db_name",db_name!=null?db_name.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1556:5: -> ^( TOK_SHOWINDEXES showStmtIdentifier ( $showOptions)? ( $db_name)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1556:8: ^( TOK_SHOWINDEXES showStmtIdentifier ( $showOptions)? ( $db_name)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWINDEXES, "TOK_SHOWINDEXES"), root_1);
						adaptor.addChild(root_1, stream_showStmtIdentifier.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1556:46: ( $showOptions)?
						if ( stream_showOptions.hasNext() ) {
							adaptor.addChild(root_1, stream_showOptions.nextNode());
						}
						stream_showOptions.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1556:60: ( $db_name)?
						if ( stream_db_name.hasNext() ) {
							adaptor.addChild(root_1, stream_db_name.nextTree());
						}
						stream_db_name.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 12 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1557:7: KW_SHOW KW_COMPACTIONS
					{
					KW_SHOW500=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8348); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW500);

					KW_COMPACTIONS501=(Token)match(input,KW_COMPACTIONS,FOLLOW_KW_COMPACTIONS_in_showStatement8350); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMPACTIONS.add(KW_COMPACTIONS501);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1557:30: -> ^( TOK_SHOW_COMPACTIONS )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1557:33: ^( TOK_SHOW_COMPACTIONS )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_COMPACTIONS, "TOK_SHOW_COMPACTIONS"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 13 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1558:7: KW_SHOW KW_TRANSACTIONS
					{
					KW_SHOW502=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8364); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW502);

					KW_TRANSACTIONS503=(Token)match(input,KW_TRANSACTIONS,FOLLOW_KW_TRANSACTIONS_in_showStatement8366); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TRANSACTIONS.add(KW_TRANSACTIONS503);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1558:31: -> ^( TOK_SHOW_TRANSACTIONS )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1558:34: ^( TOK_SHOW_TRANSACTIONS )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_TRANSACTIONS, "TOK_SHOW_TRANSACTIONS"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 14 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1559:7: KW_SHOW KW_CONF StringLiteral
					{
					KW_SHOW504=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showStatement8380); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW504);

					KW_CONF505=(Token)match(input,KW_CONF,FOLLOW_KW_CONF_in_showStatement8382); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CONF.add(KW_CONF505);

					StringLiteral506=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_showStatement8384); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(StringLiteral506);

					// AST REWRITE
					// elements: StringLiteral
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1559:37: -> ^( TOK_SHOWCONF StringLiteral )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1559:40: ^( TOK_SHOWCONF StringLiteral )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOWCONF, "TOK_SHOWCONF"), root_1);
						adaptor.addChild(root_1, stream_StringLiteral.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showStatement"


	public static class lockStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "lockStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1562:1: lockStatement : KW_LOCK KW_TABLE tableName ( partitionSpec )? lockMode -> ^( TOK_LOCKTABLE tableName lockMode ( partitionSpec )? ) ;
	public final HiveParser.lockStatement_return lockStatement() throws RecognitionException {
		HiveParser.lockStatement_return retval = new HiveParser.lockStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_LOCK507=null;
		Token KW_TABLE508=null;
		ParserRuleReturnScope tableName509 =null;
		ParserRuleReturnScope partitionSpec510 =null;
		ParserRuleReturnScope lockMode511 =null;

		ASTNode KW_LOCK507_tree=null;
		ASTNode KW_TABLE508_tree=null;
		RewriteRuleTokenStream stream_KW_LOCK=new RewriteRuleTokenStream(adaptor,"token KW_LOCK");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_lockMode=new RewriteRuleSubtreeStream(adaptor,"rule lockMode");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("lock statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1565:5: ( KW_LOCK KW_TABLE tableName ( partitionSpec )? lockMode -> ^( TOK_LOCKTABLE tableName lockMode ( partitionSpec )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1565:7: KW_LOCK KW_TABLE tableName ( partitionSpec )? lockMode
			{
			KW_LOCK507=(Token)match(input,KW_LOCK,FOLLOW_KW_LOCK_in_lockStatement8419); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCK.add(KW_LOCK507);

			KW_TABLE508=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_lockStatement8421); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE508);

			pushFollow(FOLLOW_tableName_in_lockStatement8423);
			tableName509=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName509.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1565:34: ( partitionSpec )?
			int alt157=2;
			int LA157_0 = input.LA(1);
			if ( (LA157_0==KW_PARTITION) ) {
				alt157=1;
			}
			switch (alt157) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1565:34: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_lockStatement8425);
					partitionSpec510=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec510.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_lockMode_in_lockStatement8428);
			lockMode511=lockMode();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_lockMode.add(lockMode511.getTree());
			// AST REWRITE
			// elements: lockMode, tableName, partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1565:58: -> ^( TOK_LOCKTABLE tableName lockMode ( partitionSpec )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1565:61: ^( TOK_LOCKTABLE tableName lockMode ( partitionSpec )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LOCKTABLE, "TOK_LOCKTABLE"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				adaptor.addChild(root_1, stream_lockMode.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1565:96: ( partitionSpec )?
				if ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "lockStatement"


	public static class lockDatabase_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "lockDatabase"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1568:1: lockDatabase : KW_LOCK ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) lockMode -> ^( TOK_LOCKDB $dbName lockMode ) ;
	public final HiveParser.lockDatabase_return lockDatabase() throws RecognitionException {
		HiveParser.lockDatabase_return retval = new HiveParser.lockDatabase_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token dbName=null;
		Token KW_LOCK512=null;
		Token KW_DATABASE513=null;
		Token KW_SCHEMA514=null;
		ParserRuleReturnScope lockMode515 =null;

		ASTNode dbName_tree=null;
		ASTNode KW_LOCK512_tree=null;
		ASTNode KW_DATABASE513_tree=null;
		ASTNode KW_SCHEMA514_tree=null;
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,"token Identifier");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_KW_LOCK=new RewriteRuleTokenStream(adaptor,"token KW_LOCK");
		RewriteRuleSubtreeStream stream_lockMode=new RewriteRuleSubtreeStream(adaptor,"rule lockMode");

		 pushMsg("lock database statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:5: ( KW_LOCK ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) lockMode -> ^( TOK_LOCKDB $dbName lockMode ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:7: KW_LOCK ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) lockMode
			{
			KW_LOCK512=(Token)match(input,KW_LOCK,FOLLOW_KW_LOCK_in_lockDatabase8468); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCK.add(KW_LOCK512);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:15: ( KW_DATABASE | KW_SCHEMA )
			int alt158=2;
			int LA158_0 = input.LA(1);
			if ( (LA158_0==KW_DATABASE) ) {
				alt158=1;
			}
			else if ( (LA158_0==KW_SCHEMA) ) {
				alt158=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 158, 0, input);
				throw nvae;
			}

			switch (alt158) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:16: KW_DATABASE
					{
					KW_DATABASE513=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_lockDatabase8471); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE513);

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:28: KW_SCHEMA
					{
					KW_SCHEMA514=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_lockDatabase8473); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA514);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:39: (dbName= Identifier )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:40: dbName= Identifier
			{
			dbName=(Token)match(input,Identifier,FOLLOW_Identifier_in_lockDatabase8479); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_Identifier.add(dbName);

			}

			pushFollow(FOLLOW_lockMode_in_lockDatabase8482);
			lockMode515=lockMode();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_lockMode.add(lockMode515.getTree());
			// AST REWRITE
			// elements: lockMode, dbName
			// token labels: dbName
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_dbName=new RewriteRuleTokenStream(adaptor,"token dbName",dbName);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1571:68: -> ^( TOK_LOCKDB $dbName lockMode )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1571:71: ^( TOK_LOCKDB $dbName lockMode )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LOCKDB, "TOK_LOCKDB"), root_1);
				adaptor.addChild(root_1, stream_dbName.nextNode());
				adaptor.addChild(root_1, stream_lockMode.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "lockDatabase"


	public static class lockMode_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "lockMode"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1574:1: lockMode : ( KW_SHARED | KW_EXCLUSIVE );
	public final HiveParser.lockMode_return lockMode() throws RecognitionException {
		HiveParser.lockMode_return retval = new HiveParser.lockMode_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token set516=null;

		ASTNode set516_tree=null;

		 pushMsg("lock mode", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1577:5: ( KW_SHARED | KW_EXCLUSIVE )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:
			{
			root_0 = (ASTNode)adaptor.nil();


			set516=input.LT(1);
			if ( input.LA(1)==KW_EXCLUSIVE||input.LA(1)==KW_SHARED ) {
				input.consume();
				if ( state.backtracking==0 ) adaptor.addChild(root_0, (ASTNode)adaptor.create(set516));
				state.errorRecovery=false;
				state.failed=false;
			}
			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "lockMode"


	public static class unlockStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "unlockStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1580:1: unlockStatement : KW_UNLOCK KW_TABLE tableName ( partitionSpec )? -> ^( TOK_UNLOCKTABLE tableName ( partitionSpec )? ) ;
	public final HiveParser.unlockStatement_return unlockStatement() throws RecognitionException {
		HiveParser.unlockStatement_return retval = new HiveParser.unlockStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UNLOCK517=null;
		Token KW_TABLE518=null;
		ParserRuleReturnScope tableName519 =null;
		ParserRuleReturnScope partitionSpec520 =null;

		ASTNode KW_UNLOCK517_tree=null;
		ASTNode KW_TABLE518_tree=null;
		RewriteRuleTokenStream stream_KW_UNLOCK=new RewriteRuleTokenStream(adaptor,"token KW_UNLOCK");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("unlock statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1583:5: ( KW_UNLOCK KW_TABLE tableName ( partitionSpec )? -> ^( TOK_UNLOCKTABLE tableName ( partitionSpec )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1583:7: KW_UNLOCK KW_TABLE tableName ( partitionSpec )?
			{
			KW_UNLOCK517=(Token)match(input,KW_UNLOCK,FOLLOW_KW_UNLOCK_in_unlockStatement8551); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UNLOCK.add(KW_UNLOCK517);

			KW_TABLE518=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_unlockStatement8553); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE518);

			pushFollow(FOLLOW_tableName_in_unlockStatement8555);
			tableName519=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName519.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1583:36: ( partitionSpec )?
			int alt159=2;
			int LA159_0 = input.LA(1);
			if ( (LA159_0==KW_PARTITION) ) {
				alt159=1;
			}
			switch (alt159) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1583:36: partitionSpec
					{
					pushFollow(FOLLOW_partitionSpec_in_unlockStatement8557);
					partitionSpec520=partitionSpec();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec520.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tableName, partitionSpec
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1583:52: -> ^( TOK_UNLOCKTABLE tableName ( partitionSpec )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1583:55: ^( TOK_UNLOCKTABLE tableName ( partitionSpec )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNLOCKTABLE, "TOK_UNLOCKTABLE"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1583:83: ( partitionSpec )?
				if ( stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_partitionSpec.nextTree());
				}
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "unlockStatement"


	public static class unlockDatabase_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "unlockDatabase"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1586:1: unlockDatabase : KW_UNLOCK ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) -> ^( TOK_UNLOCKDB $dbName) ;
	public final HiveParser.unlockDatabase_return unlockDatabase() throws RecognitionException {
		HiveParser.unlockDatabase_return retval = new HiveParser.unlockDatabase_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token dbName=null;
		Token KW_UNLOCK521=null;
		Token KW_DATABASE522=null;
		Token KW_SCHEMA523=null;

		ASTNode dbName_tree=null;
		ASTNode KW_UNLOCK521_tree=null;
		ASTNode KW_DATABASE522_tree=null;
		ASTNode KW_SCHEMA523_tree=null;
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,"token Identifier");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_KW_UNLOCK=new RewriteRuleTokenStream(adaptor,"token KW_UNLOCK");

		 pushMsg("unlock database statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:5: ( KW_UNLOCK ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier ) -> ^( TOK_UNLOCKDB $dbName) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:7: KW_UNLOCK ( KW_DATABASE | KW_SCHEMA ) (dbName= Identifier )
			{
			KW_UNLOCK521=(Token)match(input,KW_UNLOCK,FOLLOW_KW_UNLOCK_in_unlockDatabase8597); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UNLOCK.add(KW_UNLOCK521);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:17: ( KW_DATABASE | KW_SCHEMA )
			int alt160=2;
			int LA160_0 = input.LA(1);
			if ( (LA160_0==KW_DATABASE) ) {
				alt160=1;
			}
			else if ( (LA160_0==KW_SCHEMA) ) {
				alt160=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 160, 0, input);
				throw nvae;
			}

			switch (alt160) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:18: KW_DATABASE
					{
					KW_DATABASE522=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_unlockDatabase8600); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE522);

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:30: KW_SCHEMA
					{
					KW_SCHEMA523=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_unlockDatabase8602); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA523);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:41: (dbName= Identifier )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:42: dbName= Identifier
			{
			dbName=(Token)match(input,Identifier,FOLLOW_Identifier_in_unlockDatabase8608); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_Identifier.add(dbName);

			}

			// AST REWRITE
			// elements: dbName
			// token labels: dbName
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_dbName=new RewriteRuleTokenStream(adaptor,"token dbName",dbName);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1589:61: -> ^( TOK_UNLOCKDB $dbName)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1589:64: ^( TOK_UNLOCKDB $dbName)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNLOCKDB, "TOK_UNLOCKDB"), root_1);
				adaptor.addChild(root_1, stream_dbName.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "unlockDatabase"


	public static class createRoleStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createRoleStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1592:1: createRoleStatement : KW_CREATE KW_ROLE roleName= identifier -> ^( TOK_CREATEROLE $roleName) ;
	public final HiveParser.createRoleStatement_return createRoleStatement() throws RecognitionException {
		HiveParser.createRoleStatement_return retval = new HiveParser.createRoleStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CREATE524=null;
		Token KW_ROLE525=null;
		ParserRuleReturnScope roleName =null;

		ASTNode KW_CREATE524_tree=null;
		ASTNode KW_ROLE525_tree=null;
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("create role", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1595:5: ( KW_CREATE KW_ROLE roleName= identifier -> ^( TOK_CREATEROLE $roleName) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1595:7: KW_CREATE KW_ROLE roleName= identifier
			{
			KW_CREATE524=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createRoleStatement8645); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE524);

			KW_ROLE525=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_createRoleStatement8647); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE525);

			pushFollow(FOLLOW_identifier_in_createRoleStatement8651);
			roleName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(roleName.getTree());
			// AST REWRITE
			// elements: roleName
			// token labels: 
			// rule labels: roleName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_roleName=new RewriteRuleSubtreeStream(adaptor,"rule roleName",roleName!=null?roleName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1596:5: -> ^( TOK_CREATEROLE $roleName)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1596:8: ^( TOK_CREATEROLE $roleName)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEROLE, "TOK_CREATEROLE"), root_1);
				adaptor.addChild(root_1, stream_roleName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createRoleStatement"


	public static class dropRoleStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropRoleStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1599:1: dropRoleStatement : KW_DROP KW_ROLE roleName= identifier -> ^( TOK_DROPROLE $roleName) ;
	public final HiveParser.dropRoleStatement_return dropRoleStatement() throws RecognitionException {
		HiveParser.dropRoleStatement_return retval = new HiveParser.dropRoleStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP526=null;
		Token KW_ROLE527=null;
		ParserRuleReturnScope roleName =null;

		ASTNode KW_DROP526_tree=null;
		ASTNode KW_ROLE527_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		pushMsg("drop role", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1602:5: ( KW_DROP KW_ROLE roleName= identifier -> ^( TOK_DROPROLE $roleName) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1602:7: KW_DROP KW_ROLE roleName= identifier
			{
			KW_DROP526=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropRoleStatement8691); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP526);

			KW_ROLE527=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_dropRoleStatement8693); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE527);

			pushFollow(FOLLOW_identifier_in_dropRoleStatement8697);
			roleName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(roleName.getTree());
			// AST REWRITE
			// elements: roleName
			// token labels: 
			// rule labels: roleName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_roleName=new RewriteRuleSubtreeStream(adaptor,"rule roleName",roleName!=null?roleName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1603:5: -> ^( TOK_DROPROLE $roleName)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1603:8: ^( TOK_DROPROLE $roleName)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPROLE, "TOK_DROPROLE"), root_1);
				adaptor.addChild(root_1, stream_roleName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropRoleStatement"


	public static class grantPrivileges_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "grantPrivileges"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1606:1: grantPrivileges : KW_GRANT privList= privilegeList ( privilegeObject )? KW_TO principalSpecification ( withGrantOption )? -> ^( TOK_GRANT $privList principalSpecification ( privilegeObject )? ( withGrantOption )? ) ;
	public final HiveParser.grantPrivileges_return grantPrivileges() throws RecognitionException {
		HiveParser.grantPrivileges_return retval = new HiveParser.grantPrivileges_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_GRANT528=null;
		Token KW_TO530=null;
		ParserRuleReturnScope privList =null;
		ParserRuleReturnScope privilegeObject529 =null;
		ParserRuleReturnScope principalSpecification531 =null;
		ParserRuleReturnScope withGrantOption532 =null;

		ASTNode KW_GRANT528_tree=null;
		ASTNode KW_TO530_tree=null;
		RewriteRuleTokenStream stream_KW_TO=new RewriteRuleTokenStream(adaptor,"token KW_TO");
		RewriteRuleTokenStream stream_KW_GRANT=new RewriteRuleTokenStream(adaptor,"token KW_GRANT");
		RewriteRuleSubtreeStream stream_withGrantOption=new RewriteRuleSubtreeStream(adaptor,"rule withGrantOption");
		RewriteRuleSubtreeStream stream_privilegeList=new RewriteRuleSubtreeStream(adaptor,"rule privilegeList");
		RewriteRuleSubtreeStream stream_privilegeObject=new RewriteRuleSubtreeStream(adaptor,"rule privilegeObject");
		RewriteRuleSubtreeStream stream_principalSpecification=new RewriteRuleSubtreeStream(adaptor,"rule principalSpecification");

		pushMsg("grant privileges", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1609:5: ( KW_GRANT privList= privilegeList ( privilegeObject )? KW_TO principalSpecification ( withGrantOption )? -> ^( TOK_GRANT $privList principalSpecification ( privilegeObject )? ( withGrantOption )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1609:7: KW_GRANT privList= privilegeList ( privilegeObject )? KW_TO principalSpecification ( withGrantOption )?
			{
			KW_GRANT528=(Token)match(input,KW_GRANT,FOLLOW_KW_GRANT_in_grantPrivileges8737); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_GRANT.add(KW_GRANT528);

			pushFollow(FOLLOW_privilegeList_in_grantPrivileges8741);
			privList=privilegeList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_privilegeList.add(privList.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1610:7: ( privilegeObject )?
			int alt161=2;
			int LA161_0 = input.LA(1);
			if ( (LA161_0==KW_ON) ) {
				alt161=1;
			}
			switch (alt161) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1610:7: privilegeObject
					{
					pushFollow(FOLLOW_privilegeObject_in_grantPrivileges8749);
					privilegeObject529=privilegeObject();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_privilegeObject.add(privilegeObject529.getTree());
					}
					break;

			}

			KW_TO530=(Token)match(input,KW_TO,FOLLOW_KW_TO_in_grantPrivileges8758); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TO.add(KW_TO530);

			pushFollow(FOLLOW_principalSpecification_in_grantPrivileges8760);
			principalSpecification531=principalSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalSpecification.add(principalSpecification531.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1612:7: ( withGrantOption )?
			int alt162=2;
			int LA162_0 = input.LA(1);
			if ( (LA162_0==KW_WITH) ) {
				alt162=1;
			}
			switch (alt162) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1612:7: withGrantOption
					{
					pushFollow(FOLLOW_withGrantOption_in_grantPrivileges8768);
					withGrantOption532=withGrantOption();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_withGrantOption.add(withGrantOption532.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: principalSpecification, withGrantOption, privList, privilegeObject
			// token labels: 
			// rule labels: privList, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_privList=new RewriteRuleSubtreeStream(adaptor,"rule privList",privList!=null?privList.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1613:5: -> ^( TOK_GRANT $privList principalSpecification ( privilegeObject )? ( withGrantOption )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1613:8: ^( TOK_GRANT $privList principalSpecification ( privilegeObject )? ( withGrantOption )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_GRANT, "TOK_GRANT"), root_1);
				adaptor.addChild(root_1, stream_privList.nextTree());
				adaptor.addChild(root_1, stream_principalSpecification.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1613:53: ( privilegeObject )?
				if ( stream_privilegeObject.hasNext() ) {
					adaptor.addChild(root_1, stream_privilegeObject.nextTree());
				}
				stream_privilegeObject.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1613:70: ( withGrantOption )?
				if ( stream_withGrantOption.hasNext() ) {
					adaptor.addChild(root_1, stream_withGrantOption.nextTree());
				}
				stream_withGrantOption.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "grantPrivileges"


	public static class revokePrivileges_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "revokePrivileges"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1616:1: revokePrivileges : KW_REVOKE ( grantOptionFor )? privilegeList ( privilegeObject )? KW_FROM principalSpecification -> ^( TOK_REVOKE privilegeList principalSpecification ( privilegeObject )? ( grantOptionFor )? ) ;
	public final HiveParser.revokePrivileges_return revokePrivileges() throws RecognitionException {
		HiveParser.revokePrivileges_return retval = new HiveParser.revokePrivileges_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_REVOKE533=null;
		Token KW_FROM537=null;
		ParserRuleReturnScope grantOptionFor534 =null;
		ParserRuleReturnScope privilegeList535 =null;
		ParserRuleReturnScope privilegeObject536 =null;
		ParserRuleReturnScope principalSpecification538 =null;

		ASTNode KW_REVOKE533_tree=null;
		ASTNode KW_FROM537_tree=null;
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleTokenStream stream_KW_REVOKE=new RewriteRuleTokenStream(adaptor,"token KW_REVOKE");
		RewriteRuleSubtreeStream stream_grantOptionFor=new RewriteRuleSubtreeStream(adaptor,"rule grantOptionFor");
		RewriteRuleSubtreeStream stream_privilegeList=new RewriteRuleSubtreeStream(adaptor,"rule privilegeList");
		RewriteRuleSubtreeStream stream_privilegeObject=new RewriteRuleSubtreeStream(adaptor,"rule privilegeObject");
		RewriteRuleSubtreeStream stream_principalSpecification=new RewriteRuleSubtreeStream(adaptor,"rule principalSpecification");

		pushMsg("revoke privileges", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1619:5: ( KW_REVOKE ( grantOptionFor )? privilegeList ( privilegeObject )? KW_FROM principalSpecification -> ^( TOK_REVOKE privilegeList principalSpecification ( privilegeObject )? ( grantOptionFor )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1619:7: KW_REVOKE ( grantOptionFor )? privilegeList ( privilegeObject )? KW_FROM principalSpecification
			{
			KW_REVOKE533=(Token)match(input,KW_REVOKE,FOLLOW_KW_REVOKE_in_revokePrivileges8817); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REVOKE.add(KW_REVOKE533);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1619:17: ( grantOptionFor )?
			int alt163=2;
			int LA163_0 = input.LA(1);
			if ( (LA163_0==KW_GRANT) ) {
				alt163=1;
			}
			switch (alt163) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1619:17: grantOptionFor
					{
					pushFollow(FOLLOW_grantOptionFor_in_revokePrivileges8819);
					grantOptionFor534=grantOptionFor();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_grantOptionFor.add(grantOptionFor534.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_privilegeList_in_revokePrivileges8822);
			privilegeList535=privilegeList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_privilegeList.add(privilegeList535.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1619:47: ( privilegeObject )?
			int alt164=2;
			int LA164_0 = input.LA(1);
			if ( (LA164_0==KW_ON) ) {
				alt164=1;
			}
			switch (alt164) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1619:47: privilegeObject
					{
					pushFollow(FOLLOW_privilegeObject_in_revokePrivileges8824);
					privilegeObject536=privilegeObject();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_privilegeObject.add(privilegeObject536.getTree());
					}
					break;

			}

			KW_FROM537=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_revokePrivileges8827); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM537);

			pushFollow(FOLLOW_principalSpecification_in_revokePrivileges8829);
			principalSpecification538=principalSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalSpecification.add(principalSpecification538.getTree());
			// AST REWRITE
			// elements: principalSpecification, privilegeObject, grantOptionFor, privilegeList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1620:5: -> ^( TOK_REVOKE privilegeList principalSpecification ( privilegeObject )? ( grantOptionFor )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1620:8: ^( TOK_REVOKE privilegeList principalSpecification ( privilegeObject )? ( grantOptionFor )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REVOKE, "TOK_REVOKE"), root_1);
				adaptor.addChild(root_1, stream_privilegeList.nextTree());
				adaptor.addChild(root_1, stream_principalSpecification.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1620:58: ( privilegeObject )?
				if ( stream_privilegeObject.hasNext() ) {
					adaptor.addChild(root_1, stream_privilegeObject.nextTree());
				}
				stream_privilegeObject.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1620:75: ( grantOptionFor )?
				if ( stream_grantOptionFor.hasNext() ) {
					adaptor.addChild(root_1, stream_grantOptionFor.nextTree());
				}
				stream_grantOptionFor.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "revokePrivileges"


	public static class grantRole_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "grantRole"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1623:1: grantRole : KW_GRANT ( KW_ROLE )? identifier ( COMMA identifier )* KW_TO principalSpecification ( withAdminOption )? -> ^( TOK_GRANT_ROLE principalSpecification ( withAdminOption )? ( identifier )+ ) ;
	public final HiveParser.grantRole_return grantRole() throws RecognitionException {
		HiveParser.grantRole_return retval = new HiveParser.grantRole_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_GRANT539=null;
		Token KW_ROLE540=null;
		Token COMMA542=null;
		Token KW_TO544=null;
		ParserRuleReturnScope identifier541 =null;
		ParserRuleReturnScope identifier543 =null;
		ParserRuleReturnScope principalSpecification545 =null;
		ParserRuleReturnScope withAdminOption546 =null;

		ASTNode KW_GRANT539_tree=null;
		ASTNode KW_ROLE540_tree=null;
		ASTNode COMMA542_tree=null;
		ASTNode KW_TO544_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleTokenStream stream_KW_TO=new RewriteRuleTokenStream(adaptor,"token KW_TO");
		RewriteRuleTokenStream stream_KW_GRANT=new RewriteRuleTokenStream(adaptor,"token KW_GRANT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_withAdminOption=new RewriteRuleSubtreeStream(adaptor,"rule withAdminOption");
		RewriteRuleSubtreeStream stream_principalSpecification=new RewriteRuleSubtreeStream(adaptor,"rule principalSpecification");

		pushMsg("grant role", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:5: ( KW_GRANT ( KW_ROLE )? identifier ( COMMA identifier )* KW_TO principalSpecification ( withAdminOption )? -> ^( TOK_GRANT_ROLE principalSpecification ( withAdminOption )? ( identifier )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:7: KW_GRANT ( KW_ROLE )? identifier ( COMMA identifier )* KW_TO principalSpecification ( withAdminOption )?
			{
			KW_GRANT539=(Token)match(input,KW_GRANT,FOLLOW_KW_GRANT_in_grantRole8876); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_GRANT.add(KW_GRANT539);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:16: ( KW_ROLE )?
			int alt165=2;
			int LA165_0 = input.LA(1);
			if ( (LA165_0==KW_ROLE) ) {
				int LA165_1 = input.LA(2);
				if ( (LA165_1==Identifier||(LA165_1 >= KW_ABORT && LA165_1 <= KW_AFTER)||LA165_1==KW_ANALYZE||LA165_1==KW_ARCHIVE||LA165_1==KW_ASC||(LA165_1 >= KW_AUTOCOMMIT && LA165_1 <= KW_BEFORE)||(LA165_1 >= KW_BUCKET && LA165_1 <= KW_BUCKETS)||(LA165_1 >= KW_CACHE && LA165_1 <= KW_CASCADE)||LA165_1==KW_CHANGE||(LA165_1 >= KW_CLUSTER && LA165_1 <= KW_COLLECTION)||(LA165_1 >= KW_COLUMNS && LA165_1 <= KW_COMMENT)||(LA165_1 >= KW_COMPACT && LA165_1 <= KW_CONCATENATE)||LA165_1==KW_CONTINUE||LA165_1==KW_DATA||LA165_1==KW_DATABASES||(LA165_1 >= KW_DATETIME && LA165_1 <= KW_DBPROPERTIES)||(LA165_1 >= KW_DEFERRED && LA165_1 <= KW_DEFINED)||(LA165_1 >= KW_DELIMITED && LA165_1 <= KW_DESC)||(LA165_1 >= KW_DETAIL && LA165_1 <= KW_DISABLE)||LA165_1==KW_DISTRIBUTE||LA165_1==KW_DOW||(LA165_1 >= KW_DUMP && LA165_1 <= KW_ELEM_TYPE)||LA165_1==KW_ENABLE||LA165_1==KW_ESCAPED||LA165_1==KW_EXCLUSIVE||(LA165_1 >= KW_EXPLAIN && LA165_1 <= KW_EXPRESSION)||(LA165_1 >= KW_FIELDS && LA165_1 <= KW_FIRST)||(LA165_1 >= KW_FORMAT && LA165_1 <= KW_FORMATTED)||LA165_1==KW_FUNCTIONS||(LA165_1 >= KW_HOUR && LA165_1 <= KW_IDXPROPERTIES)||(LA165_1 >= KW_INDEX && LA165_1 <= KW_INDEXES)||(LA165_1 >= KW_INPATH && LA165_1 <= KW_INPUTFORMAT)||(LA165_1 >= KW_ISOLATION && LA165_1 <= KW_JAR)||(LA165_1 >= KW_KEY && LA165_1 <= KW_LAST)||LA165_1==KW_LEVEL||(LA165_1 >= KW_LIMIT && LA165_1 <= KW_LOAD)||(LA165_1 >= KW_LOCATION && LA165_1 <= KW_LONG)||(LA165_1 >= KW_MAPJOIN && LA165_1 <= KW_MATERIALIZED)||LA165_1==KW_METADATA||(LA165_1 >= KW_MINUTE && LA165_1 <= KW_MONTH)||LA165_1==KW_MSCK||(LA165_1 >= KW_NORELY && LA165_1 <= KW_NOSCAN)||LA165_1==KW_NOVALIDATE||LA165_1==KW_NULLS||LA165_1==KW_OFFSET||(LA165_1 >= KW_OPERATOR && LA165_1 <= KW_OPTION)||(LA165_1 >= KW_OUTPUTDRIVER && LA165_1 <= KW_OUTPUTFORMAT)||(LA165_1 >= KW_OVERWRITE && LA165_1 <= KW_OWNER)||(LA165_1 >= KW_PARTITIONED && LA165_1 <= KW_PARTITIONS)||LA165_1==KW_PLUS||LA165_1==KW_PRETTY||LA165_1==KW_PRINCIPALS||(LA165_1 >= KW_PURGE && LA165_1 <= KW_QUARTER)||LA165_1==KW_READ||(LA165_1 >= KW_REBUILD && LA165_1 <= KW_RECORDWRITER)||(LA165_1 >= KW_RELOAD && LA165_1 <= KW_RESTRICT)||LA165_1==KW_REWRITE||(LA165_1 >= KW_ROLE && LA165_1 <= KW_ROLES)||(LA165_1 >= KW_SCHEMA && LA165_1 <= KW_SECOND)||(LA165_1 >= KW_SEMI && LA165_1 <= KW_SERVER)||(LA165_1 >= KW_SETS && LA165_1 <= KW_SKEWED)||(LA165_1 >= KW_SNAPSHOT && LA165_1 <= KW_SSL)||(LA165_1 >= KW_STATISTICS && LA165_1 <= KW_SUMMARY)||LA165_1==KW_TABLES||(LA165_1 >= KW_TBLPROPERTIES && LA165_1 <= KW_TERMINATED)||LA165_1==KW_TINYINT||(LA165_1 >= KW_TOUCH && LA165_1 <= KW_TRANSACTIONS)||LA165_1==KW_UNARCHIVE||LA165_1==KW_UNDO||LA165_1==KW_UNIONTYPE||(LA165_1 >= KW_UNLOCK && LA165_1 <= KW_UNSIGNED)||(LA165_1 >= KW_URI && LA165_1 <= KW_USE)||(LA165_1 >= KW_UTC && LA165_1 <= KW_VALIDATE)||LA165_1==KW_VALUE_TYPE||(LA165_1 >= KW_VECTORIZATION && LA165_1 <= KW_WEEK)||LA165_1==KW_WHILE||(LA165_1 >= KW_WORK && LA165_1 <= KW_YEAR)||LA165_1==KW_BATCH||LA165_1==KW_DAYOFWEEK||LA165_1==KW_HOLD_DDLTIME||LA165_1==KW_IGNORE||LA165_1==KW_NO_DROP||LA165_1==KW_OFFLINE||LA165_1==KW_PROTECTION||LA165_1==KW_READONLY) ) {
					alt165=1;
				}
			}
			switch (alt165) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:16: KW_ROLE
					{
					KW_ROLE540=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_grantRole8878); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE540);

					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_grantRole8881);
			identifier541=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(identifier541.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:36: ( COMMA identifier )*
			loop166:
			while (true) {
				int alt166=2;
				int LA166_0 = input.LA(1);
				if ( (LA166_0==COMMA) ) {
					alt166=1;
				}

				switch (alt166) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:37: COMMA identifier
					{
					COMMA542=(Token)match(input,COMMA,FOLLOW_COMMA_in_grantRole8884); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA542);

					pushFollow(FOLLOW_identifier_in_grantRole8886);
					identifier543=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier543.getTree());
					}
					break;

				default :
					break loop166;
				}
			}

			KW_TO544=(Token)match(input,KW_TO,FOLLOW_KW_TO_in_grantRole8890); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TO.add(KW_TO544);

			pushFollow(FOLLOW_principalSpecification_in_grantRole8892);
			principalSpecification545=principalSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalSpecification.add(principalSpecification545.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:85: ( withAdminOption )?
			int alt167=2;
			int LA167_0 = input.LA(1);
			if ( (LA167_0==KW_WITH) ) {
				alt167=1;
			}
			switch (alt167) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1626:85: withAdminOption
					{
					pushFollow(FOLLOW_withAdminOption_in_grantRole8894);
					withAdminOption546=withAdminOption();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_withAdminOption.add(withAdminOption546.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: withAdminOption, principalSpecification, identifier
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1627:5: -> ^( TOK_GRANT_ROLE principalSpecification ( withAdminOption )? ( identifier )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1627:8: ^( TOK_GRANT_ROLE principalSpecification ( withAdminOption )? ( identifier )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_GRANT_ROLE, "TOK_GRANT_ROLE"), root_1);
				adaptor.addChild(root_1, stream_principalSpecification.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1627:48: ( withAdminOption )?
				if ( stream_withAdminOption.hasNext() ) {
					adaptor.addChild(root_1, stream_withAdminOption.nextTree());
				}
				stream_withAdminOption.reset();

				if ( !(stream_identifier.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_identifier.hasNext() ) {
					adaptor.addChild(root_1, stream_identifier.nextTree());
				}
				stream_identifier.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "grantRole"


	public static class revokeRole_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "revokeRole"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1630:1: revokeRole : KW_REVOKE ( adminOptionFor )? ( KW_ROLE )? identifier ( COMMA identifier )* KW_FROM principalSpecification -> ^( TOK_REVOKE_ROLE principalSpecification ( adminOptionFor )? ( identifier )+ ) ;
	public final HiveParser.revokeRole_return revokeRole() throws RecognitionException {
		HiveParser.revokeRole_return retval = new HiveParser.revokeRole_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_REVOKE547=null;
		Token KW_ROLE549=null;
		Token COMMA551=null;
		Token KW_FROM553=null;
		ParserRuleReturnScope adminOptionFor548 =null;
		ParserRuleReturnScope identifier550 =null;
		ParserRuleReturnScope identifier552 =null;
		ParserRuleReturnScope principalSpecification554 =null;

		ASTNode KW_REVOKE547_tree=null;
		ASTNode KW_ROLE549_tree=null;
		ASTNode COMMA551_tree=null;
		ASTNode KW_FROM553_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleTokenStream stream_KW_REVOKE=new RewriteRuleTokenStream(adaptor,"token KW_REVOKE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_adminOptionFor=new RewriteRuleSubtreeStream(adaptor,"rule adminOptionFor");
		RewriteRuleSubtreeStream stream_principalSpecification=new RewriteRuleSubtreeStream(adaptor,"rule principalSpecification");

		pushMsg("revoke role", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:5: ( KW_REVOKE ( adminOptionFor )? ( KW_ROLE )? identifier ( COMMA identifier )* KW_FROM principalSpecification -> ^( TOK_REVOKE_ROLE principalSpecification ( adminOptionFor )? ( identifier )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:7: KW_REVOKE ( adminOptionFor )? ( KW_ROLE )? identifier ( COMMA identifier )* KW_FROM principalSpecification
			{
			KW_REVOKE547=(Token)match(input,KW_REVOKE,FOLLOW_KW_REVOKE_in_revokeRole8940); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REVOKE.add(KW_REVOKE547);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:17: ( adminOptionFor )?
			int alt168=2;
			int LA168_0 = input.LA(1);
			if ( (LA168_0==KW_ADMIN) ) {
				int LA168_1 = input.LA(2);
				if ( (LA168_1==KW_OPTION) ) {
					alt168=1;
				}
			}
			switch (alt168) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:17: adminOptionFor
					{
					pushFollow(FOLLOW_adminOptionFor_in_revokeRole8942);
					adminOptionFor548=adminOptionFor();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_adminOptionFor.add(adminOptionFor548.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:33: ( KW_ROLE )?
			int alt169=2;
			int LA169_0 = input.LA(1);
			if ( (LA169_0==KW_ROLE) ) {
				int LA169_1 = input.LA(2);
				if ( (LA169_1==Identifier||(LA169_1 >= KW_ABORT && LA169_1 <= KW_AFTER)||LA169_1==KW_ANALYZE||LA169_1==KW_ARCHIVE||LA169_1==KW_ASC||(LA169_1 >= KW_AUTOCOMMIT && LA169_1 <= KW_BEFORE)||(LA169_1 >= KW_BUCKET && LA169_1 <= KW_BUCKETS)||(LA169_1 >= KW_CACHE && LA169_1 <= KW_CASCADE)||LA169_1==KW_CHANGE||(LA169_1 >= KW_CLUSTER && LA169_1 <= KW_COLLECTION)||(LA169_1 >= KW_COLUMNS && LA169_1 <= KW_COMMENT)||(LA169_1 >= KW_COMPACT && LA169_1 <= KW_CONCATENATE)||LA169_1==KW_CONTINUE||LA169_1==KW_DATA||LA169_1==KW_DATABASES||(LA169_1 >= KW_DATETIME && LA169_1 <= KW_DBPROPERTIES)||(LA169_1 >= KW_DEFERRED && LA169_1 <= KW_DEFINED)||(LA169_1 >= KW_DELIMITED && LA169_1 <= KW_DESC)||(LA169_1 >= KW_DETAIL && LA169_1 <= KW_DISABLE)||LA169_1==KW_DISTRIBUTE||LA169_1==KW_DOW||(LA169_1 >= KW_DUMP && LA169_1 <= KW_ELEM_TYPE)||LA169_1==KW_ENABLE||LA169_1==KW_ESCAPED||LA169_1==KW_EXCLUSIVE||(LA169_1 >= KW_EXPLAIN && LA169_1 <= KW_EXPRESSION)||(LA169_1 >= KW_FIELDS && LA169_1 <= KW_FIRST)||(LA169_1 >= KW_FORMAT && LA169_1 <= KW_FORMATTED)||LA169_1==KW_FUNCTIONS||(LA169_1 >= KW_HOUR && LA169_1 <= KW_IDXPROPERTIES)||(LA169_1 >= KW_INDEX && LA169_1 <= KW_INDEXES)||(LA169_1 >= KW_INPATH && LA169_1 <= KW_INPUTFORMAT)||(LA169_1 >= KW_ISOLATION && LA169_1 <= KW_JAR)||(LA169_1 >= KW_KEY && LA169_1 <= KW_LAST)||LA169_1==KW_LEVEL||(LA169_1 >= KW_LIMIT && LA169_1 <= KW_LOAD)||(LA169_1 >= KW_LOCATION && LA169_1 <= KW_LONG)||(LA169_1 >= KW_MAPJOIN && LA169_1 <= KW_MATERIALIZED)||LA169_1==KW_METADATA||(LA169_1 >= KW_MINUTE && LA169_1 <= KW_MONTH)||LA169_1==KW_MSCK||(LA169_1 >= KW_NORELY && LA169_1 <= KW_NOSCAN)||LA169_1==KW_NOVALIDATE||LA169_1==KW_NULLS||LA169_1==KW_OFFSET||(LA169_1 >= KW_OPERATOR && LA169_1 <= KW_OPTION)||(LA169_1 >= KW_OUTPUTDRIVER && LA169_1 <= KW_OUTPUTFORMAT)||(LA169_1 >= KW_OVERWRITE && LA169_1 <= KW_OWNER)||(LA169_1 >= KW_PARTITIONED && LA169_1 <= KW_PARTITIONS)||LA169_1==KW_PLUS||LA169_1==KW_PRETTY||LA169_1==KW_PRINCIPALS||(LA169_1 >= KW_PURGE && LA169_1 <= KW_QUARTER)||LA169_1==KW_READ||(LA169_1 >= KW_REBUILD && LA169_1 <= KW_RECORDWRITER)||(LA169_1 >= KW_RELOAD && LA169_1 <= KW_RESTRICT)||LA169_1==KW_REWRITE||(LA169_1 >= KW_ROLE && LA169_1 <= KW_ROLES)||(LA169_1 >= KW_SCHEMA && LA169_1 <= KW_SECOND)||(LA169_1 >= KW_SEMI && LA169_1 <= KW_SERVER)||(LA169_1 >= KW_SETS && LA169_1 <= KW_SKEWED)||(LA169_1 >= KW_SNAPSHOT && LA169_1 <= KW_SSL)||(LA169_1 >= KW_STATISTICS && LA169_1 <= KW_SUMMARY)||LA169_1==KW_TABLES||(LA169_1 >= KW_TBLPROPERTIES && LA169_1 <= KW_TERMINATED)||LA169_1==KW_TINYINT||(LA169_1 >= KW_TOUCH && LA169_1 <= KW_TRANSACTIONS)||LA169_1==KW_UNARCHIVE||LA169_1==KW_UNDO||LA169_1==KW_UNIONTYPE||(LA169_1 >= KW_UNLOCK && LA169_1 <= KW_UNSIGNED)||(LA169_1 >= KW_URI && LA169_1 <= KW_USE)||(LA169_1 >= KW_UTC && LA169_1 <= KW_VALIDATE)||LA169_1==KW_VALUE_TYPE||(LA169_1 >= KW_VECTORIZATION && LA169_1 <= KW_WEEK)||LA169_1==KW_WHILE||(LA169_1 >= KW_WORK && LA169_1 <= KW_YEAR)||LA169_1==KW_BATCH||LA169_1==KW_DAYOFWEEK||LA169_1==KW_HOLD_DDLTIME||LA169_1==KW_IGNORE||LA169_1==KW_NO_DROP||LA169_1==KW_OFFLINE||LA169_1==KW_PROTECTION||LA169_1==KW_READONLY) ) {
					alt169=1;
				}
			}
			switch (alt169) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:33: KW_ROLE
					{
					KW_ROLE549=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_revokeRole8945); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE549);

					}
					break;

			}

			pushFollow(FOLLOW_identifier_in_revokeRole8948);
			identifier550=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(identifier550.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:53: ( COMMA identifier )*
			loop170:
			while (true) {
				int alt170=2;
				int LA170_0 = input.LA(1);
				if ( (LA170_0==COMMA) ) {
					alt170=1;
				}

				switch (alt170) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1633:54: COMMA identifier
					{
					COMMA551=(Token)match(input,COMMA,FOLLOW_COMMA_in_revokeRole8951); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA551);

					pushFollow(FOLLOW_identifier_in_revokeRole8953);
					identifier552=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier552.getTree());
					}
					break;

				default :
					break loop170;
				}
			}

			KW_FROM553=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_revokeRole8957); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM553);

			pushFollow(FOLLOW_principalSpecification_in_revokeRole8959);
			principalSpecification554=principalSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalSpecification.add(principalSpecification554.getTree());
			// AST REWRITE
			// elements: principalSpecification, adminOptionFor, identifier
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1634:5: -> ^( TOK_REVOKE_ROLE principalSpecification ( adminOptionFor )? ( identifier )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1634:8: ^( TOK_REVOKE_ROLE principalSpecification ( adminOptionFor )? ( identifier )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_REVOKE_ROLE, "TOK_REVOKE_ROLE"), root_1);
				adaptor.addChild(root_1, stream_principalSpecification.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1634:49: ( adminOptionFor )?
				if ( stream_adminOptionFor.hasNext() ) {
					adaptor.addChild(root_1, stream_adminOptionFor.nextTree());
				}
				stream_adminOptionFor.reset();

				if ( !(stream_identifier.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_identifier.hasNext() ) {
					adaptor.addChild(root_1, stream_identifier.nextTree());
				}
				stream_identifier.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "revokeRole"


	public static class showRoleGrants_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showRoleGrants"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1637:1: showRoleGrants : KW_SHOW KW_ROLE KW_GRANT principalName -> ^( TOK_SHOW_ROLE_GRANT principalName ) ;
	public final HiveParser.showRoleGrants_return showRoleGrants() throws RecognitionException {
		HiveParser.showRoleGrants_return retval = new HiveParser.showRoleGrants_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SHOW555=null;
		Token KW_ROLE556=null;
		Token KW_GRANT557=null;
		ParserRuleReturnScope principalName558 =null;

		ASTNode KW_SHOW555_tree=null;
		ASTNode KW_ROLE556_tree=null;
		ASTNode KW_GRANT557_tree=null;
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleTokenStream stream_KW_GRANT=new RewriteRuleTokenStream(adaptor,"token KW_GRANT");
		RewriteRuleTokenStream stream_KW_SHOW=new RewriteRuleTokenStream(adaptor,"token KW_SHOW");
		RewriteRuleSubtreeStream stream_principalName=new RewriteRuleSubtreeStream(adaptor,"rule principalName");

		pushMsg("show role grants", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1640:5: ( KW_SHOW KW_ROLE KW_GRANT principalName -> ^( TOK_SHOW_ROLE_GRANT principalName ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1640:7: KW_SHOW KW_ROLE KW_GRANT principalName
			{
			KW_SHOW555=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showRoleGrants9004); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW555);

			KW_ROLE556=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_showRoleGrants9006); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE556);

			KW_GRANT557=(Token)match(input,KW_GRANT,FOLLOW_KW_GRANT_in_showRoleGrants9008); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_GRANT.add(KW_GRANT557);

			pushFollow(FOLLOW_principalName_in_showRoleGrants9010);
			principalName558=principalName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalName.add(principalName558.getTree());
			// AST REWRITE
			// elements: principalName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1641:5: -> ^( TOK_SHOW_ROLE_GRANT principalName )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1641:8: ^( TOK_SHOW_ROLE_GRANT principalName )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_ROLE_GRANT, "TOK_SHOW_ROLE_GRANT"), root_1);
				adaptor.addChild(root_1, stream_principalName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showRoleGrants"


	public static class showRoles_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showRoles"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1645:1: showRoles : KW_SHOW KW_ROLES -> ^( TOK_SHOW_ROLES ) ;
	public final HiveParser.showRoles_return showRoles() throws RecognitionException {
		HiveParser.showRoles_return retval = new HiveParser.showRoles_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SHOW559=null;
		Token KW_ROLES560=null;

		ASTNode KW_SHOW559_tree=null;
		ASTNode KW_ROLES560_tree=null;
		RewriteRuleTokenStream stream_KW_ROLES=new RewriteRuleTokenStream(adaptor,"token KW_ROLES");
		RewriteRuleTokenStream stream_KW_SHOW=new RewriteRuleTokenStream(adaptor,"token KW_SHOW");

		pushMsg("show roles", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1648:5: ( KW_SHOW KW_ROLES -> ^( TOK_SHOW_ROLES ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1648:7: KW_SHOW KW_ROLES
			{
			KW_SHOW559=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showRoles9050); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW559);

			KW_ROLES560=(Token)match(input,KW_ROLES,FOLLOW_KW_ROLES_in_showRoles9052); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLES.add(KW_ROLES560);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1649:5: -> ^( TOK_SHOW_ROLES )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1649:8: ^( TOK_SHOW_ROLES )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_ROLES, "TOK_SHOW_ROLES"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showRoles"


	public static class showCurrentRole_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showCurrentRole"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1652:1: showCurrentRole : KW_SHOW KW_CURRENT KW_ROLES -> ^( TOK_SHOW_SET_ROLE ) ;
	public final HiveParser.showCurrentRole_return showCurrentRole() throws RecognitionException {
		HiveParser.showCurrentRole_return retval = new HiveParser.showCurrentRole_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SHOW561=null;
		Token KW_CURRENT562=null;
		Token KW_ROLES563=null;

		ASTNode KW_SHOW561_tree=null;
		ASTNode KW_CURRENT562_tree=null;
		ASTNode KW_ROLES563_tree=null;
		RewriteRuleTokenStream stream_KW_ROLES=new RewriteRuleTokenStream(adaptor,"token KW_ROLES");
		RewriteRuleTokenStream stream_KW_SHOW=new RewriteRuleTokenStream(adaptor,"token KW_SHOW");
		RewriteRuleTokenStream stream_KW_CURRENT=new RewriteRuleTokenStream(adaptor,"token KW_CURRENT");

		pushMsg("show current role", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1655:5: ( KW_SHOW KW_CURRENT KW_ROLES -> ^( TOK_SHOW_SET_ROLE ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1655:7: KW_SHOW KW_CURRENT KW_ROLES
			{
			KW_SHOW561=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showCurrentRole9089); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW561);

			KW_CURRENT562=(Token)match(input,KW_CURRENT,FOLLOW_KW_CURRENT_in_showCurrentRole9091); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CURRENT.add(KW_CURRENT562);

			KW_ROLES563=(Token)match(input,KW_ROLES,FOLLOW_KW_ROLES_in_showCurrentRole9093); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLES.add(KW_ROLES563);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1656:5: -> ^( TOK_SHOW_SET_ROLE )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1656:8: ^( TOK_SHOW_SET_ROLE )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_SET_ROLE, "TOK_SHOW_SET_ROLE"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showCurrentRole"


	public static class setRole_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "setRole"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1659:1: setRole : KW_SET KW_ROLE ( ( KW_ALL )=> (all= KW_ALL ) -> ^( TOK_SHOW_SET_ROLE Identifier[$all.text] ) | ( KW_NONE )=> (none= KW_NONE ) -> ^( TOK_SHOW_SET_ROLE Identifier[$none.text] ) | identifier -> ^( TOK_SHOW_SET_ROLE identifier ) ) ;
	public final HiveParser.setRole_return setRole() throws RecognitionException {
		HiveParser.setRole_return retval = new HiveParser.setRole_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token all=null;
		Token none=null;
		Token KW_SET564=null;
		Token KW_ROLE565=null;
		ParserRuleReturnScope identifier566 =null;

		ASTNode all_tree=null;
		ASTNode none_tree=null;
		ASTNode KW_SET564_tree=null;
		ASTNode KW_ROLE565_tree=null;
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleTokenStream stream_KW_NONE=new RewriteRuleTokenStream(adaptor,"token KW_NONE");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleTokenStream stream_KW_ALL=new RewriteRuleTokenStream(adaptor,"token KW_ALL");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		pushMsg("set role", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1662:5: ( KW_SET KW_ROLE ( ( KW_ALL )=> (all= KW_ALL ) -> ^( TOK_SHOW_SET_ROLE Identifier[$all.text] ) | ( KW_NONE )=> (none= KW_NONE ) -> ^( TOK_SHOW_SET_ROLE Identifier[$none.text] ) | identifier -> ^( TOK_SHOW_SET_ROLE identifier ) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1662:7: KW_SET KW_ROLE ( ( KW_ALL )=> (all= KW_ALL ) -> ^( TOK_SHOW_SET_ROLE Identifier[$all.text] ) | ( KW_NONE )=> (none= KW_NONE ) -> ^( TOK_SHOW_SET_ROLE Identifier[$none.text] ) | identifier -> ^( TOK_SHOW_SET_ROLE identifier ) )
			{
			KW_SET564=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_setRole9130); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET564);

			KW_ROLE565=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_setRole9132); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE565);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1663:5: ( ( KW_ALL )=> (all= KW_ALL ) -> ^( TOK_SHOW_SET_ROLE Identifier[$all.text] ) | ( KW_NONE )=> (none= KW_NONE ) -> ^( TOK_SHOW_SET_ROLE Identifier[$none.text] ) | identifier -> ^( TOK_SHOW_SET_ROLE identifier ) )
			int alt171=3;
			int LA171_0 = input.LA(1);
			if ( (LA171_0==KW_ALL) && (synpred14_HiveParser())) {
				alt171=1;
			}
			else if ( (LA171_0==KW_NONE) && (synpred15_HiveParser())) {
				alt171=2;
			}
			else if ( (LA171_0==Identifier||(LA171_0 >= KW_ABORT && LA171_0 <= KW_AFTER)||LA171_0==KW_ANALYZE||LA171_0==KW_ARCHIVE||LA171_0==KW_ASC||(LA171_0 >= KW_AUTOCOMMIT && LA171_0 <= KW_BEFORE)||(LA171_0 >= KW_BUCKET && LA171_0 <= KW_BUCKETS)||(LA171_0 >= KW_CACHE && LA171_0 <= KW_CASCADE)||LA171_0==KW_CHANGE||(LA171_0 >= KW_CLUSTER && LA171_0 <= KW_COLLECTION)||(LA171_0 >= KW_COLUMNS && LA171_0 <= KW_COMMENT)||(LA171_0 >= KW_COMPACT && LA171_0 <= KW_CONCATENATE)||LA171_0==KW_CONTINUE||LA171_0==KW_DATA||LA171_0==KW_DATABASES||(LA171_0 >= KW_DATETIME && LA171_0 <= KW_DBPROPERTIES)||(LA171_0 >= KW_DEFERRED && LA171_0 <= KW_DEFINED)||(LA171_0 >= KW_DELIMITED && LA171_0 <= KW_DESC)||(LA171_0 >= KW_DETAIL && LA171_0 <= KW_DISABLE)||LA171_0==KW_DISTRIBUTE||LA171_0==KW_DOW||(LA171_0 >= KW_DUMP && LA171_0 <= KW_ELEM_TYPE)||LA171_0==KW_ENABLE||LA171_0==KW_ESCAPED||LA171_0==KW_EXCLUSIVE||(LA171_0 >= KW_EXPLAIN && LA171_0 <= KW_EXPRESSION)||(LA171_0 >= KW_FIELDS && LA171_0 <= KW_FIRST)||(LA171_0 >= KW_FORMAT && LA171_0 <= KW_FORMATTED)||LA171_0==KW_FUNCTIONS||(LA171_0 >= KW_HOUR && LA171_0 <= KW_IDXPROPERTIES)||(LA171_0 >= KW_INDEX && LA171_0 <= KW_INDEXES)||(LA171_0 >= KW_INPATH && LA171_0 <= KW_INPUTFORMAT)||(LA171_0 >= KW_ISOLATION && LA171_0 <= KW_JAR)||(LA171_0 >= KW_KEY && LA171_0 <= KW_LAST)||LA171_0==KW_LEVEL||(LA171_0 >= KW_LIMIT && LA171_0 <= KW_LOAD)||(LA171_0 >= KW_LOCATION && LA171_0 <= KW_LONG)||(LA171_0 >= KW_MAPJOIN && LA171_0 <= KW_MATERIALIZED)||LA171_0==KW_METADATA||(LA171_0 >= KW_MINUTE && LA171_0 <= KW_MONTH)||LA171_0==KW_MSCK||(LA171_0 >= KW_NORELY && LA171_0 <= KW_NOSCAN)||LA171_0==KW_NOVALIDATE||LA171_0==KW_NULLS||LA171_0==KW_OFFSET||(LA171_0 >= KW_OPERATOR && LA171_0 <= KW_OPTION)||(LA171_0 >= KW_OUTPUTDRIVER && LA171_0 <= KW_OUTPUTFORMAT)||(LA171_0 >= KW_OVERWRITE && LA171_0 <= KW_OWNER)||(LA171_0 >= KW_PARTITIONED && LA171_0 <= KW_PARTITIONS)||LA171_0==KW_PLUS||LA171_0==KW_PRETTY||LA171_0==KW_PRINCIPALS||(LA171_0 >= KW_PURGE && LA171_0 <= KW_QUARTER)||LA171_0==KW_READ||(LA171_0 >= KW_REBUILD && LA171_0 <= KW_RECORDWRITER)||(LA171_0 >= KW_RELOAD && LA171_0 <= KW_RESTRICT)||LA171_0==KW_REWRITE||(LA171_0 >= KW_ROLE && LA171_0 <= KW_ROLES)||(LA171_0 >= KW_SCHEMA && LA171_0 <= KW_SECOND)||(LA171_0 >= KW_SEMI && LA171_0 <= KW_SERVER)||(LA171_0 >= KW_SETS && LA171_0 <= KW_SKEWED)||(LA171_0 >= KW_SNAPSHOT && LA171_0 <= KW_SSL)||(LA171_0 >= KW_STATISTICS && LA171_0 <= KW_SUMMARY)||LA171_0==KW_TABLES||(LA171_0 >= KW_TBLPROPERTIES && LA171_0 <= KW_TERMINATED)||LA171_0==KW_TINYINT||(LA171_0 >= KW_TOUCH && LA171_0 <= KW_TRANSACTIONS)||LA171_0==KW_UNARCHIVE||LA171_0==KW_UNDO||LA171_0==KW_UNIONTYPE||(LA171_0 >= KW_UNLOCK && LA171_0 <= KW_UNSIGNED)||(LA171_0 >= KW_URI && LA171_0 <= KW_USE)||(LA171_0 >= KW_UTC && LA171_0 <= KW_VALIDATE)||LA171_0==KW_VALUE_TYPE||(LA171_0 >= KW_VECTORIZATION && LA171_0 <= KW_WEEK)||LA171_0==KW_WHILE||(LA171_0 >= KW_WORK && LA171_0 <= KW_YEAR)||LA171_0==KW_BATCH||LA171_0==KW_DAYOFWEEK||LA171_0==KW_HOLD_DDLTIME||LA171_0==KW_IGNORE||LA171_0==KW_NO_DROP||LA171_0==KW_OFFLINE||LA171_0==KW_PROTECTION||LA171_0==KW_READONLY) ) {
				alt171=3;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 171, 0, input);
				throw nvae;
			}

			switch (alt171) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1664:5: ( KW_ALL )=> (all= KW_ALL )
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1664:17: (all= KW_ALL )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1664:18: all= KW_ALL
					{
					all=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_setRole9154); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(all);

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1664:30: -> ^( TOK_SHOW_SET_ROLE Identifier[$all.text] )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1664:33: ^( TOK_SHOW_SET_ROLE Identifier[$all.text] )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_SET_ROLE, "TOK_SHOW_SET_ROLE"), root_1);
						adaptor.addChild(root_1, (ASTNode)adaptor.create(Identifier, (all!=null?all.getText():null)));
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1666:5: ( KW_NONE )=> (none= KW_NONE )
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1666:18: (none= KW_NONE )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1666:19: none= KW_NONE
					{
					none=(Token)match(input,KW_NONE,FOLLOW_KW_NONE_in_setRole9185); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NONE.add(none);

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1666:33: -> ^( TOK_SHOW_SET_ROLE Identifier[$none.text] )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1666:36: ^( TOK_SHOW_SET_ROLE Identifier[$none.text] )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_SET_ROLE, "TOK_SHOW_SET_ROLE"), root_1);
						adaptor.addChild(root_1, (ASTNode)adaptor.create(Identifier, (none!=null?none.getText():null)));
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1668:5: identifier
					{
					pushFollow(FOLLOW_identifier_in_setRole9207);
					identifier566=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier566.getTree());
					// AST REWRITE
					// elements: identifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1668:16: -> ^( TOK_SHOW_SET_ROLE identifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1668:19: ^( TOK_SHOW_SET_ROLE identifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_SET_ROLE, "TOK_SHOW_SET_ROLE"), root_1);
						adaptor.addChild(root_1, stream_identifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "setRole"


	public static class showGrants_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showGrants"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1672:1: showGrants : KW_SHOW KW_GRANT ( principalName )? ( KW_ON privilegeIncludeColObject )? -> ^( TOK_SHOW_GRANT ( principalName )? ( privilegeIncludeColObject )? ) ;
	public final HiveParser.showGrants_return showGrants() throws RecognitionException {
		HiveParser.showGrants_return retval = new HiveParser.showGrants_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SHOW567=null;
		Token KW_GRANT568=null;
		Token KW_ON570=null;
		ParserRuleReturnScope principalName569 =null;
		ParserRuleReturnScope privilegeIncludeColObject571 =null;

		ASTNode KW_SHOW567_tree=null;
		ASTNode KW_GRANT568_tree=null;
		ASTNode KW_ON570_tree=null;
		RewriteRuleTokenStream stream_KW_GRANT=new RewriteRuleTokenStream(adaptor,"token KW_GRANT");
		RewriteRuleTokenStream stream_KW_SHOW=new RewriteRuleTokenStream(adaptor,"token KW_SHOW");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleSubtreeStream stream_privilegeIncludeColObject=new RewriteRuleSubtreeStream(adaptor,"rule privilegeIncludeColObject");
		RewriteRuleSubtreeStream stream_principalName=new RewriteRuleSubtreeStream(adaptor,"rule principalName");

		pushMsg("show grants", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1675:5: ( KW_SHOW KW_GRANT ( principalName )? ( KW_ON privilegeIncludeColObject )? -> ^( TOK_SHOW_GRANT ( principalName )? ( privilegeIncludeColObject )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1675:7: KW_SHOW KW_GRANT ( principalName )? ( KW_ON privilegeIncludeColObject )?
			{
			KW_SHOW567=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showGrants9248); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW567);

			KW_GRANT568=(Token)match(input,KW_GRANT,FOLLOW_KW_GRANT_in_showGrants9250); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_GRANT.add(KW_GRANT568);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1675:24: ( principalName )?
			int alt172=2;
			int LA172_0 = input.LA(1);
			if ( (LA172_0==KW_GROUP||LA172_0==KW_ROLE||LA172_0==KW_USER) ) {
				alt172=1;
			}
			switch (alt172) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1675:24: principalName
					{
					pushFollow(FOLLOW_principalName_in_showGrants9252);
					principalName569=principalName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_principalName.add(principalName569.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1675:39: ( KW_ON privilegeIncludeColObject )?
			int alt173=2;
			int LA173_0 = input.LA(1);
			if ( (LA173_0==KW_ON) ) {
				alt173=1;
			}
			switch (alt173) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1675:40: KW_ON privilegeIncludeColObject
					{
					KW_ON570=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_showGrants9256); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON570);

					pushFollow(FOLLOW_privilegeIncludeColObject_in_showGrants9258);
					privilegeIncludeColObject571=privilegeIncludeColObject();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_privilegeIncludeColObject.add(privilegeIncludeColObject571.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: principalName, privilegeIncludeColObject
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1676:5: -> ^( TOK_SHOW_GRANT ( principalName )? ( privilegeIncludeColObject )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1676:8: ^( TOK_SHOW_GRANT ( principalName )? ( privilegeIncludeColObject )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_GRANT, "TOK_SHOW_GRANT"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1676:25: ( principalName )?
				if ( stream_principalName.hasNext() ) {
					adaptor.addChild(root_1, stream_principalName.nextTree());
				}
				stream_principalName.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1676:40: ( privilegeIncludeColObject )?
				if ( stream_privilegeIncludeColObject.hasNext() ) {
					adaptor.addChild(root_1, stream_privilegeIncludeColObject.nextTree());
				}
				stream_privilegeIncludeColObject.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showGrants"


	public static class showRolePrincipals_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showRolePrincipals"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1679:1: showRolePrincipals : KW_SHOW KW_PRINCIPALS roleName= identifier -> ^( TOK_SHOW_ROLE_PRINCIPALS $roleName) ;
	public final HiveParser.showRolePrincipals_return showRolePrincipals() throws RecognitionException {
		HiveParser.showRolePrincipals_return retval = new HiveParser.showRolePrincipals_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SHOW572=null;
		Token KW_PRINCIPALS573=null;
		ParserRuleReturnScope roleName =null;

		ASTNode KW_SHOW572_tree=null;
		ASTNode KW_PRINCIPALS573_tree=null;
		RewriteRuleTokenStream stream_KW_PRINCIPALS=new RewriteRuleTokenStream(adaptor,"token KW_PRINCIPALS");
		RewriteRuleTokenStream stream_KW_SHOW=new RewriteRuleTokenStream(adaptor,"token KW_SHOW");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		pushMsg("show role principals", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1682:5: ( KW_SHOW KW_PRINCIPALS roleName= identifier -> ^( TOK_SHOW_ROLE_PRINCIPALS $roleName) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1682:7: KW_SHOW KW_PRINCIPALS roleName= identifier
			{
			KW_SHOW572=(Token)match(input,KW_SHOW,FOLLOW_KW_SHOW_in_showRolePrincipals9303); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SHOW.add(KW_SHOW572);

			KW_PRINCIPALS573=(Token)match(input,KW_PRINCIPALS,FOLLOW_KW_PRINCIPALS_in_showRolePrincipals9305); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_PRINCIPALS.add(KW_PRINCIPALS573);

			pushFollow(FOLLOW_identifier_in_showRolePrincipals9309);
			roleName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(roleName.getTree());
			// AST REWRITE
			// elements: roleName
			// token labels: 
			// rule labels: roleName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_roleName=new RewriteRuleSubtreeStream(adaptor,"rule roleName",roleName!=null?roleName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1683:5: -> ^( TOK_SHOW_ROLE_PRINCIPALS $roleName)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1683:8: ^( TOK_SHOW_ROLE_PRINCIPALS $roleName)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SHOW_ROLE_PRINCIPALS, "TOK_SHOW_ROLE_PRINCIPALS"), root_1);
				adaptor.addChild(root_1, stream_roleName.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showRolePrincipals"


	public static class privilegeIncludeColObject_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privilegeIncludeColObject"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1687:1: privilegeIncludeColObject : ( ( KW_ALL )=> KW_ALL -> ^( TOK_RESOURCE_ALL ) | privObjectCols -> ^( TOK_PRIV_OBJECT_COL privObjectCols ) );
	public final HiveParser.privilegeIncludeColObject_return privilegeIncludeColObject() throws RecognitionException {
		HiveParser.privilegeIncludeColObject_return retval = new HiveParser.privilegeIncludeColObject_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ALL574=null;
		ParserRuleReturnScope privObjectCols575 =null;

		ASTNode KW_ALL574_tree=null;
		RewriteRuleTokenStream stream_KW_ALL=new RewriteRuleTokenStream(adaptor,"token KW_ALL");
		RewriteRuleSubtreeStream stream_privObjectCols=new RewriteRuleSubtreeStream(adaptor,"rule privObjectCols");

		pushMsg("privilege object including columns", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1690:5: ( ( KW_ALL )=> KW_ALL -> ^( TOK_RESOURCE_ALL ) | privObjectCols -> ^( TOK_PRIV_OBJECT_COL privObjectCols ) )
			int alt174=2;
			int LA174_0 = input.LA(1);
			if ( (LA174_0==KW_ALL) && (synpred16_HiveParser())) {
				alt174=1;
			}
			else if ( (LA174_0==Identifier||(LA174_0 >= KW_ABORT && LA174_0 <= KW_AFTER)||LA174_0==KW_ANALYZE||LA174_0==KW_ARCHIVE||LA174_0==KW_ASC||(LA174_0 >= KW_AUTOCOMMIT && LA174_0 <= KW_BEFORE)||(LA174_0 >= KW_BUCKET && LA174_0 <= KW_BUCKETS)||(LA174_0 >= KW_CACHE && LA174_0 <= KW_CASCADE)||LA174_0==KW_CHANGE||(LA174_0 >= KW_CLUSTER && LA174_0 <= KW_COLLECTION)||(LA174_0 >= KW_COLUMNS && LA174_0 <= KW_COMMENT)||(LA174_0 >= KW_COMPACT && LA174_0 <= KW_CONCATENATE)||LA174_0==KW_CONTINUE||(LA174_0 >= KW_DATA && LA174_0 <= KW_DATABASES)||(LA174_0 >= KW_DATETIME && LA174_0 <= KW_DBPROPERTIES)||(LA174_0 >= KW_DEFERRED && LA174_0 <= KW_DEFINED)||(LA174_0 >= KW_DELIMITED && LA174_0 <= KW_DESC)||(LA174_0 >= KW_DETAIL && LA174_0 <= KW_DISABLE)||LA174_0==KW_DISTRIBUTE||LA174_0==KW_DOW||(LA174_0 >= KW_DUMP && LA174_0 <= KW_ELEM_TYPE)||LA174_0==KW_ENABLE||LA174_0==KW_ESCAPED||LA174_0==KW_EXCLUSIVE||(LA174_0 >= KW_EXPLAIN && LA174_0 <= KW_EXPRESSION)||(LA174_0 >= KW_FIELDS && LA174_0 <= KW_FIRST)||(LA174_0 >= KW_FORMAT && LA174_0 <= KW_FORMATTED)||LA174_0==KW_FUNCTIONS||(LA174_0 >= KW_HOUR && LA174_0 <= KW_IDXPROPERTIES)||(LA174_0 >= KW_INDEX && LA174_0 <= KW_INDEXES)||(LA174_0 >= KW_INPATH && LA174_0 <= KW_INPUTFORMAT)||(LA174_0 >= KW_ISOLATION && LA174_0 <= KW_JAR)||(LA174_0 >= KW_KEY && LA174_0 <= KW_LAST)||LA174_0==KW_LEVEL||(LA174_0 >= KW_LIMIT && LA174_0 <= KW_LOAD)||(LA174_0 >= KW_LOCATION && LA174_0 <= KW_LONG)||(LA174_0 >= KW_MAPJOIN && LA174_0 <= KW_MATERIALIZED)||LA174_0==KW_METADATA||(LA174_0 >= KW_MINUTE && LA174_0 <= KW_MONTH)||LA174_0==KW_MSCK||(LA174_0 >= KW_NORELY && LA174_0 <= KW_NOSCAN)||LA174_0==KW_NOVALIDATE||LA174_0==KW_NULLS||LA174_0==KW_OFFSET||(LA174_0 >= KW_OPERATOR && LA174_0 <= KW_OPTION)||(LA174_0 >= KW_OUTPUTDRIVER && LA174_0 <= KW_OUTPUTFORMAT)||(LA174_0 >= KW_OVERWRITE && LA174_0 <= KW_OWNER)||(LA174_0 >= KW_PARTITIONED && LA174_0 <= KW_PARTITIONS)||LA174_0==KW_PLUS||LA174_0==KW_PRETTY||LA174_0==KW_PRINCIPALS||(LA174_0 >= KW_PURGE && LA174_0 <= KW_QUARTER)||LA174_0==KW_READ||(LA174_0 >= KW_REBUILD && LA174_0 <= KW_RECORDWRITER)||(LA174_0 >= KW_RELOAD && LA174_0 <= KW_RESTRICT)||LA174_0==KW_REWRITE||(LA174_0 >= KW_ROLE && LA174_0 <= KW_ROLES)||(LA174_0 >= KW_SCHEMA && LA174_0 <= KW_SECOND)||(LA174_0 >= KW_SEMI && LA174_0 <= KW_SERVER)||(LA174_0 >= KW_SETS && LA174_0 <= KW_SKEWED)||(LA174_0 >= KW_SNAPSHOT && LA174_0 <= KW_SSL)||(LA174_0 >= KW_STATISTICS && LA174_0 <= KW_TABLES)||(LA174_0 >= KW_TBLPROPERTIES && LA174_0 <= KW_TERMINATED)||LA174_0==KW_TINYINT||(LA174_0 >= KW_TOUCH && LA174_0 <= KW_TRANSACTIONS)||LA174_0==KW_UNARCHIVE||LA174_0==KW_UNDO||LA174_0==KW_UNIONTYPE||(LA174_0 >= KW_UNLOCK && LA174_0 <= KW_UNSIGNED)||(LA174_0 >= KW_URI && LA174_0 <= KW_USE)||(LA174_0 >= KW_UTC && LA174_0 <= KW_VALIDATE)||LA174_0==KW_VALUE_TYPE||(LA174_0 >= KW_VECTORIZATION && LA174_0 <= KW_WEEK)||LA174_0==KW_WHILE||(LA174_0 >= KW_WORK && LA174_0 <= KW_YEAR)||LA174_0==KW_BATCH||LA174_0==KW_DAYOFWEEK||LA174_0==KW_HOLD_DDLTIME||LA174_0==KW_IGNORE||LA174_0==KW_NO_DROP||LA174_0==KW_OFFLINE||LA174_0==KW_PROTECTION||LA174_0==KW_READONLY) ) {
				alt174=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 174, 0, input);
				throw nvae;
			}

			switch (alt174) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1690:7: ( KW_ALL )=> KW_ALL
					{
					KW_ALL574=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_privilegeIncludeColObject9356); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(KW_ALL574);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1690:26: -> ^( TOK_RESOURCE_ALL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1690:29: ^( TOK_RESOURCE_ALL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RESOURCE_ALL, "TOK_RESOURCE_ALL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1691:7: privObjectCols
					{
					pushFollow(FOLLOW_privObjectCols_in_privilegeIncludeColObject9370);
					privObjectCols575=privObjectCols();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_privObjectCols.add(privObjectCols575.getTree());
					// AST REWRITE
					// elements: privObjectCols
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1691:22: -> ^( TOK_PRIV_OBJECT_COL privObjectCols )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1691:25: ^( TOK_PRIV_OBJECT_COL privObjectCols )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_OBJECT_COL, "TOK_PRIV_OBJECT_COL"), root_1);
						adaptor.addChild(root_1, stream_privObjectCols.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privilegeIncludeColObject"


	public static class privilegeObject_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privilegeObject"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1694:1: privilegeObject : KW_ON privObject -> ^( TOK_PRIV_OBJECT privObject ) ;
	public final HiveParser.privilegeObject_return privilegeObject() throws RecognitionException {
		HiveParser.privilegeObject_return retval = new HiveParser.privilegeObject_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ON576=null;
		ParserRuleReturnScope privObject577 =null;

		ASTNode KW_ON576_tree=null;
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleSubtreeStream stream_privObject=new RewriteRuleSubtreeStream(adaptor,"rule privObject");

		pushMsg("privilege object", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1697:5: ( KW_ON privObject -> ^( TOK_PRIV_OBJECT privObject ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1697:7: KW_ON privObject
			{
			KW_ON576=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_privilegeObject9405); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON576);

			pushFollow(FOLLOW_privObject_in_privilegeObject9407);
			privObject577=privObject();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_privObject.add(privObject577.getTree());
			// AST REWRITE
			// elements: privObject
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1697:24: -> ^( TOK_PRIV_OBJECT privObject )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1697:27: ^( TOK_PRIV_OBJECT privObject )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_OBJECT, "TOK_PRIV_OBJECT"), root_1);
				adaptor.addChild(root_1, stream_privObject.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privilegeObject"


	public static class privObject_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privObject"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1701:1: privObject : ( ( KW_DATABASE | KW_SCHEMA ) identifier -> ^( TOK_DB_TYPE identifier ) | ( KW_TABLE )? tableName ( partitionSpec )? -> ^( TOK_TABLE_TYPE tableName ( partitionSpec )? ) | KW_URI (path= StringLiteral ) -> ^( TOK_URI_TYPE $path) | KW_SERVER identifier -> ^( TOK_SERVER_TYPE identifier ) );
	public final HiveParser.privObject_return privObject() throws RecognitionException {
		HiveParser.privObject_return retval = new HiveParser.privObject_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token path=null;
		Token KW_DATABASE578=null;
		Token KW_SCHEMA579=null;
		Token KW_TABLE581=null;
		Token KW_URI584=null;
		Token KW_SERVER585=null;
		ParserRuleReturnScope identifier580 =null;
		ParserRuleReturnScope tableName582 =null;
		ParserRuleReturnScope partitionSpec583 =null;
		ParserRuleReturnScope identifier586 =null;

		ASTNode path_tree=null;
		ASTNode KW_DATABASE578_tree=null;
		ASTNode KW_SCHEMA579_tree=null;
		ASTNode KW_TABLE581_tree=null;
		ASTNode KW_URI584_tree=null;
		ASTNode KW_SERVER585_tree=null;
		RewriteRuleTokenStream stream_KW_SERVER=new RewriteRuleTokenStream(adaptor,"token KW_SERVER");
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_URI=new RewriteRuleTokenStream(adaptor,"token KW_URI");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1702:5: ( ( KW_DATABASE | KW_SCHEMA ) identifier -> ^( TOK_DB_TYPE identifier ) | ( KW_TABLE )? tableName ( partitionSpec )? -> ^( TOK_TABLE_TYPE tableName ( partitionSpec )? ) | KW_URI (path= StringLiteral ) -> ^( TOK_URI_TYPE $path) | KW_SERVER identifier -> ^( TOK_SERVER_TYPE identifier ) )
			int alt178=4;
			switch ( input.LA(1) ) {
			case KW_DATABASE:
				{
				alt178=1;
				}
				break;
			case KW_SCHEMA:
				{
				int LA178_2 = input.LA(2);
				if ( (LA178_2==Identifier||(LA178_2 >= KW_ABORT && LA178_2 <= KW_AFTER)||LA178_2==KW_ANALYZE||LA178_2==KW_ARCHIVE||LA178_2==KW_ASC||(LA178_2 >= KW_AUTOCOMMIT && LA178_2 <= KW_BEFORE)||(LA178_2 >= KW_BUCKET && LA178_2 <= KW_BUCKETS)||(LA178_2 >= KW_CACHE && LA178_2 <= KW_CASCADE)||LA178_2==KW_CHANGE||(LA178_2 >= KW_CLUSTER && LA178_2 <= KW_COLLECTION)||(LA178_2 >= KW_COLUMNS && LA178_2 <= KW_COMMENT)||(LA178_2 >= KW_COMPACT && LA178_2 <= KW_CONCATENATE)||LA178_2==KW_CONTINUE||LA178_2==KW_DATA||LA178_2==KW_DATABASES||(LA178_2 >= KW_DATETIME && LA178_2 <= KW_DBPROPERTIES)||(LA178_2 >= KW_DEFERRED && LA178_2 <= KW_DEFINED)||(LA178_2 >= KW_DELIMITED && LA178_2 <= KW_DESC)||(LA178_2 >= KW_DETAIL && LA178_2 <= KW_DISABLE)||LA178_2==KW_DISTRIBUTE||LA178_2==KW_DOW||(LA178_2 >= KW_DUMP && LA178_2 <= KW_ELEM_TYPE)||LA178_2==KW_ENABLE||LA178_2==KW_ESCAPED||LA178_2==KW_EXCLUSIVE||(LA178_2 >= KW_EXPLAIN && LA178_2 <= KW_EXPRESSION)||(LA178_2 >= KW_FIELDS && LA178_2 <= KW_FIRST)||(LA178_2 >= KW_FORMAT && LA178_2 <= KW_FORMATTED)||LA178_2==KW_FUNCTIONS||(LA178_2 >= KW_HOUR && LA178_2 <= KW_IDXPROPERTIES)||(LA178_2 >= KW_INDEX && LA178_2 <= KW_INDEXES)||(LA178_2 >= KW_INPATH && LA178_2 <= KW_INPUTFORMAT)||(LA178_2 >= KW_ISOLATION && LA178_2 <= KW_JAR)||(LA178_2 >= KW_KEY && LA178_2 <= KW_LAST)||LA178_2==KW_LEVEL||(LA178_2 >= KW_LIMIT && LA178_2 <= KW_LOAD)||(LA178_2 >= KW_LOCATION && LA178_2 <= KW_LONG)||(LA178_2 >= KW_MAPJOIN && LA178_2 <= KW_MATERIALIZED)||LA178_2==KW_METADATA||(LA178_2 >= KW_MINUTE && LA178_2 <= KW_MONTH)||LA178_2==KW_MSCK||(LA178_2 >= KW_NORELY && LA178_2 <= KW_NOSCAN)||LA178_2==KW_NOVALIDATE||LA178_2==KW_NULLS||LA178_2==KW_OFFSET||(LA178_2 >= KW_OPERATOR && LA178_2 <= KW_OPTION)||(LA178_2 >= KW_OUTPUTDRIVER && LA178_2 <= KW_OUTPUTFORMAT)||(LA178_2 >= KW_OVERWRITE && LA178_2 <= KW_OWNER)||(LA178_2 >= KW_PARTITIONED && LA178_2 <= KW_PARTITIONS)||LA178_2==KW_PLUS||LA178_2==KW_PRETTY||LA178_2==KW_PRINCIPALS||(LA178_2 >= KW_PURGE && LA178_2 <= KW_QUARTER)||LA178_2==KW_READ||(LA178_2 >= KW_REBUILD && LA178_2 <= KW_RECORDWRITER)||(LA178_2 >= KW_RELOAD && LA178_2 <= KW_RESTRICT)||LA178_2==KW_REWRITE||(LA178_2 >= KW_ROLE && LA178_2 <= KW_ROLES)||(LA178_2 >= KW_SCHEMA && LA178_2 <= KW_SECOND)||(LA178_2 >= KW_SEMI && LA178_2 <= KW_SERVER)||(LA178_2 >= KW_SETS && LA178_2 <= KW_SKEWED)||(LA178_2 >= KW_SNAPSHOT && LA178_2 <= KW_SSL)||(LA178_2 >= KW_STATISTICS && LA178_2 <= KW_SUMMARY)||LA178_2==KW_TABLES||(LA178_2 >= KW_TBLPROPERTIES && LA178_2 <= KW_TERMINATED)||LA178_2==KW_TINYINT||(LA178_2 >= KW_TOUCH && LA178_2 <= KW_TRANSACTIONS)||LA178_2==KW_UNARCHIVE||LA178_2==KW_UNDO||LA178_2==KW_UNIONTYPE||(LA178_2 >= KW_UNLOCK && LA178_2 <= KW_UNSIGNED)||(LA178_2 >= KW_URI && LA178_2 <= KW_USE)||(LA178_2 >= KW_UTC && LA178_2 <= KW_VALIDATE)||LA178_2==KW_VALUE_TYPE||(LA178_2 >= KW_VECTORIZATION && LA178_2 <= KW_WEEK)||LA178_2==KW_WHILE||(LA178_2 >= KW_WORK && LA178_2 <= KW_YEAR)||LA178_2==KW_BATCH||LA178_2==KW_DAYOFWEEK||LA178_2==KW_HOLD_DDLTIME||LA178_2==KW_IGNORE||LA178_2==KW_NO_DROP||LA178_2==KW_OFFLINE||LA178_2==KW_PROTECTION||LA178_2==KW_READONLY) ) {
					alt178=1;
				}
				else if ( (LA178_2==DOT||LA178_2==KW_FROM||LA178_2==KW_PARTITION||LA178_2==KW_TO) ) {
					alt178=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 178, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case Identifier:
			case KW_ABORT:
			case KW_ADD:
			case KW_ADMIN:
			case KW_AFTER:
			case KW_ANALYZE:
			case KW_ARCHIVE:
			case KW_ASC:
			case KW_AUTOCOMMIT:
			case KW_BEFORE:
			case KW_BUCKET:
			case KW_BUCKETS:
			case KW_CACHE:
			case KW_CASCADE:
			case KW_CHANGE:
			case KW_CLUSTER:
			case KW_CLUSTERED:
			case KW_CLUSTERSTATUS:
			case KW_COLLECTION:
			case KW_COLUMNS:
			case KW_COMMENT:
			case KW_COMPACT:
			case KW_COMPACTIONS:
			case KW_COMPUTE:
			case KW_CONCATENATE:
			case KW_CONTINUE:
			case KW_DATA:
			case KW_DATABASES:
			case KW_DATETIME:
			case KW_DAY:
			case KW_DBPROPERTIES:
			case KW_DEFERRED:
			case KW_DEFINED:
			case KW_DELIMITED:
			case KW_DEPENDENCY:
			case KW_DESC:
			case KW_DETAIL:
			case KW_DIRECTORIES:
			case KW_DIRECTORY:
			case KW_DISABLE:
			case KW_DISTRIBUTE:
			case KW_DOW:
			case KW_DUMP:
			case KW_ELEM_TYPE:
			case KW_ENABLE:
			case KW_ESCAPED:
			case KW_EXCLUSIVE:
			case KW_EXPLAIN:
			case KW_EXPORT:
			case KW_EXPRESSION:
			case KW_FIELDS:
			case KW_FILE:
			case KW_FILEFORMAT:
			case KW_FIRST:
			case KW_FORMAT:
			case KW_FORMATTED:
			case KW_FUNCTIONS:
			case KW_HOUR:
			case KW_IDXPROPERTIES:
			case KW_INDEX:
			case KW_INDEXES:
			case KW_INPATH:
			case KW_INPUTDRIVER:
			case KW_INPUTFORMAT:
			case KW_ISOLATION:
			case KW_ITEMS:
			case KW_JAR:
			case KW_KEY:
			case KW_KEYS:
			case KW_KEY_TYPE:
			case KW_LAST:
			case KW_LEVEL:
			case KW_LIMIT:
			case KW_LINES:
			case KW_LOAD:
			case KW_LOCATION:
			case KW_LOCK:
			case KW_LOCKS:
			case KW_LOGICAL:
			case KW_LONG:
			case KW_MAPJOIN:
			case KW_MATCHED:
			case KW_MATERIALIZED:
			case KW_METADATA:
			case KW_MINUTE:
			case KW_MONTH:
			case KW_MSCK:
			case KW_NORELY:
			case KW_NOSCAN:
			case KW_NOVALIDATE:
			case KW_NULLS:
			case KW_OFFSET:
			case KW_OPERATOR:
			case KW_OPTION:
			case KW_OUTPUTDRIVER:
			case KW_OUTPUTFORMAT:
			case KW_OVERWRITE:
			case KW_OWNER:
			case KW_PARTITIONED:
			case KW_PARTITIONS:
			case KW_PLUS:
			case KW_PRETTY:
			case KW_PRINCIPALS:
			case KW_PURGE:
			case KW_QUARTER:
			case KW_READ:
			case KW_REBUILD:
			case KW_RECORDREADER:
			case KW_RECORDWRITER:
			case KW_RELOAD:
			case KW_RELY:
			case KW_RENAME:
			case KW_REPAIR:
			case KW_REPL:
			case KW_REPLACE:
			case KW_REPLICATION:
			case KW_RESTRICT:
			case KW_REWRITE:
			case KW_ROLE:
			case KW_ROLES:
			case KW_SCHEMAS:
			case KW_SECOND:
			case KW_SEMI:
			case KW_SERDE:
			case KW_SERDEPROPERTIES:
			case KW_SETS:
			case KW_SHARED:
			case KW_SHOW:
			case KW_SHOW_DATABASE:
			case KW_SKEWED:
			case KW_SNAPSHOT:
			case KW_SORT:
			case KW_SORTED:
			case KW_SSL:
			case KW_STATISTICS:
			case KW_STATUS:
			case KW_STORED:
			case KW_STREAMTABLE:
			case KW_STRING:
			case KW_STRUCT:
			case KW_SUMMARY:
			case KW_TABLE:
			case KW_TABLES:
			case KW_TBLPROPERTIES:
			case KW_TEMPORARY:
			case KW_TERMINATED:
			case KW_TINYINT:
			case KW_TOUCH:
			case KW_TRANSACTION:
			case KW_TRANSACTIONS:
			case KW_UNARCHIVE:
			case KW_UNDO:
			case KW_UNIONTYPE:
			case KW_UNLOCK:
			case KW_UNSET:
			case KW_UNSIGNED:
			case KW_USE:
			case KW_UTC:
			case KW_UTCTIMESTAMP:
			case KW_VALIDATE:
			case KW_VALUE_TYPE:
			case KW_VECTORIZATION:
			case KW_VIEW:
			case KW_VIEWS:
			case KW_WAIT:
			case KW_WEEK:
			case KW_WHILE:
			case KW_WORK:
			case KW_WRITE:
			case KW_YEAR:
			case KW_BATCH:
			case KW_DAYOFWEEK:
			case KW_HOLD_DDLTIME:
			case KW_IGNORE:
			case KW_NO_DROP:
			case KW_OFFLINE:
			case KW_PROTECTION:
			case KW_READONLY:
				{
				alt178=2;
				}
				break;
			case KW_URI:
				{
				int LA178_5 = input.LA(2);
				if ( (LA178_5==DOT||LA178_5==KW_FROM||LA178_5==KW_PARTITION||LA178_5==KW_TO) ) {
					alt178=2;
				}
				else if ( (LA178_5==StringLiteral) ) {
					alt178=3;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 178, 5, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_SERVER:
				{
				int LA178_6 = input.LA(2);
				if ( (LA178_6==DOT||LA178_6==KW_FROM||LA178_6==KW_PARTITION||LA178_6==KW_TO) ) {
					alt178=2;
				}
				else if ( (LA178_6==Identifier||(LA178_6 >= KW_ABORT && LA178_6 <= KW_AFTER)||LA178_6==KW_ANALYZE||LA178_6==KW_ARCHIVE||LA178_6==KW_ASC||(LA178_6 >= KW_AUTOCOMMIT && LA178_6 <= KW_BEFORE)||(LA178_6 >= KW_BUCKET && LA178_6 <= KW_BUCKETS)||(LA178_6 >= KW_CACHE && LA178_6 <= KW_CASCADE)||LA178_6==KW_CHANGE||(LA178_6 >= KW_CLUSTER && LA178_6 <= KW_COLLECTION)||(LA178_6 >= KW_COLUMNS && LA178_6 <= KW_COMMENT)||(LA178_6 >= KW_COMPACT && LA178_6 <= KW_CONCATENATE)||LA178_6==KW_CONTINUE||LA178_6==KW_DATA||LA178_6==KW_DATABASES||(LA178_6 >= KW_DATETIME && LA178_6 <= KW_DBPROPERTIES)||(LA178_6 >= KW_DEFERRED && LA178_6 <= KW_DEFINED)||(LA178_6 >= KW_DELIMITED && LA178_6 <= KW_DESC)||(LA178_6 >= KW_DETAIL && LA178_6 <= KW_DISABLE)||LA178_6==KW_DISTRIBUTE||LA178_6==KW_DOW||(LA178_6 >= KW_DUMP && LA178_6 <= KW_ELEM_TYPE)||LA178_6==KW_ENABLE||LA178_6==KW_ESCAPED||LA178_6==KW_EXCLUSIVE||(LA178_6 >= KW_EXPLAIN && LA178_6 <= KW_EXPRESSION)||(LA178_6 >= KW_FIELDS && LA178_6 <= KW_FIRST)||(LA178_6 >= KW_FORMAT && LA178_6 <= KW_FORMATTED)||LA178_6==KW_FUNCTIONS||(LA178_6 >= KW_HOUR && LA178_6 <= KW_IDXPROPERTIES)||(LA178_6 >= KW_INDEX && LA178_6 <= KW_INDEXES)||(LA178_6 >= KW_INPATH && LA178_6 <= KW_INPUTFORMAT)||(LA178_6 >= KW_ISOLATION && LA178_6 <= KW_JAR)||(LA178_6 >= KW_KEY && LA178_6 <= KW_LAST)||LA178_6==KW_LEVEL||(LA178_6 >= KW_LIMIT && LA178_6 <= KW_LOAD)||(LA178_6 >= KW_LOCATION && LA178_6 <= KW_LONG)||(LA178_6 >= KW_MAPJOIN && LA178_6 <= KW_MATERIALIZED)||LA178_6==KW_METADATA||(LA178_6 >= KW_MINUTE && LA178_6 <= KW_MONTH)||LA178_6==KW_MSCK||(LA178_6 >= KW_NORELY && LA178_6 <= KW_NOSCAN)||LA178_6==KW_NOVALIDATE||LA178_6==KW_NULLS||LA178_6==KW_OFFSET||(LA178_6 >= KW_OPERATOR && LA178_6 <= KW_OPTION)||(LA178_6 >= KW_OUTPUTDRIVER && LA178_6 <= KW_OUTPUTFORMAT)||(LA178_6 >= KW_OVERWRITE && LA178_6 <= KW_OWNER)||(LA178_6 >= KW_PARTITIONED && LA178_6 <= KW_PARTITIONS)||LA178_6==KW_PLUS||LA178_6==KW_PRETTY||LA178_6==KW_PRINCIPALS||(LA178_6 >= KW_PURGE && LA178_6 <= KW_QUARTER)||LA178_6==KW_READ||(LA178_6 >= KW_REBUILD && LA178_6 <= KW_RECORDWRITER)||(LA178_6 >= KW_RELOAD && LA178_6 <= KW_RESTRICT)||LA178_6==KW_REWRITE||(LA178_6 >= KW_ROLE && LA178_6 <= KW_ROLES)||(LA178_6 >= KW_SCHEMA && LA178_6 <= KW_SECOND)||(LA178_6 >= KW_SEMI && LA178_6 <= KW_SERVER)||(LA178_6 >= KW_SETS && LA178_6 <= KW_SKEWED)||(LA178_6 >= KW_SNAPSHOT && LA178_6 <= KW_SSL)||(LA178_6 >= KW_STATISTICS && LA178_6 <= KW_SUMMARY)||LA178_6==KW_TABLES||(LA178_6 >= KW_TBLPROPERTIES && LA178_6 <= KW_TERMINATED)||LA178_6==KW_TINYINT||(LA178_6 >= KW_TOUCH && LA178_6 <= KW_TRANSACTIONS)||LA178_6==KW_UNARCHIVE||LA178_6==KW_UNDO||LA178_6==KW_UNIONTYPE||(LA178_6 >= KW_UNLOCK && LA178_6 <= KW_UNSIGNED)||(LA178_6 >= KW_URI && LA178_6 <= KW_USE)||(LA178_6 >= KW_UTC && LA178_6 <= KW_VALIDATE)||LA178_6==KW_VALUE_TYPE||(LA178_6 >= KW_VECTORIZATION && LA178_6 <= KW_WEEK)||LA178_6==KW_WHILE||(LA178_6 >= KW_WORK && LA178_6 <= KW_YEAR)||LA178_6==KW_BATCH||LA178_6==KW_DAYOFWEEK||LA178_6==KW_HOLD_DDLTIME||LA178_6==KW_IGNORE||LA178_6==KW_NO_DROP||LA178_6==KW_OFFLINE||LA178_6==KW_PROTECTION||LA178_6==KW_READONLY) ) {
					alt178=4;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 178, 6, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 178, 0, input);
				throw nvae;
			}
			switch (alt178) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1702:7: ( KW_DATABASE | KW_SCHEMA ) identifier
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1702:7: ( KW_DATABASE | KW_SCHEMA )
					int alt175=2;
					int LA175_0 = input.LA(1);
					if ( (LA175_0==KW_DATABASE) ) {
						alt175=1;
					}
					else if ( (LA175_0==KW_SCHEMA) ) {
						alt175=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 175, 0, input);
						throw nvae;
					}

					switch (alt175) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1702:8: KW_DATABASE
							{
							KW_DATABASE578=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_privObject9434); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE578);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1702:20: KW_SCHEMA
							{
							KW_SCHEMA579=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_privObject9436); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA579);

							}
							break;

					}

					pushFollow(FOLLOW_identifier_in_privObject9439);
					identifier580=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier580.getTree());
					// AST REWRITE
					// elements: identifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1702:42: -> ^( TOK_DB_TYPE identifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1702:45: ^( TOK_DB_TYPE identifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DB_TYPE, "TOK_DB_TYPE"), root_1);
						adaptor.addChild(root_1, stream_identifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:7: ( KW_TABLE )? tableName ( partitionSpec )?
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:7: ( KW_TABLE )?
					int alt176=2;
					int LA176_0 = input.LA(1);
					if ( (LA176_0==KW_TABLE) ) {
						alt176=1;
					}
					switch (alt176) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:7: KW_TABLE
							{
							KW_TABLE581=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_privObject9455); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE581);

							}
							break;

					}

					pushFollow(FOLLOW_tableName_in_privObject9458);
					tableName582=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName582.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:27: ( partitionSpec )?
					int alt177=2;
					int LA177_0 = input.LA(1);
					if ( (LA177_0==KW_PARTITION) ) {
						alt177=1;
					}
					switch (alt177) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:27: partitionSpec
							{
							pushFollow(FOLLOW_partitionSpec_in_privObject9460);
							partitionSpec583=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec583.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: tableName, partitionSpec
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1703:42: -> ^( TOK_TABLE_TYPE tableName ( partitionSpec )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:45: ^( TOK_TABLE_TYPE tableName ( partitionSpec )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLE_TYPE, "TOK_TABLE_TYPE"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1703:72: ( partitionSpec )?
						if ( stream_partitionSpec.hasNext() ) {
							adaptor.addChild(root_1, stream_partitionSpec.nextTree());
						}
						stream_partitionSpec.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1704:7: KW_URI (path= StringLiteral )
					{
					KW_URI584=(Token)match(input,KW_URI,FOLLOW_KW_URI_in_privObject9480); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_URI.add(KW_URI584);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1704:14: (path= StringLiteral )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1704:15: path= StringLiteral
					{
					path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_privObject9485); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(path);

					}

					// AST REWRITE
					// elements: path
					// token labels: path
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1704:35: -> ^( TOK_URI_TYPE $path)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1704:39: ^( TOK_URI_TYPE $path)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_URI_TYPE, "TOK_URI_TYPE"), root_1);
						adaptor.addChild(root_1, stream_path.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1705:7: KW_SERVER identifier
					{
					KW_SERVER585=(Token)match(input,KW_SERVER,FOLLOW_KW_SERVER_in_privObject9504); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SERVER.add(KW_SERVER585);

					pushFollow(FOLLOW_identifier_in_privObject9506);
					identifier586=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier586.getTree());
					// AST REWRITE
					// elements: identifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1705:28: -> ^( TOK_SERVER_TYPE identifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1705:31: ^( TOK_SERVER_TYPE identifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERVER_TYPE, "TOK_SERVER_TYPE"), root_1);
						adaptor.addChild(root_1, stream_identifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privObject"


	public static class privObjectCols_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privObjectCols"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1708:1: privObjectCols : ( ( KW_DATABASE | KW_SCHEMA ) identifier -> ^( TOK_DB_TYPE identifier ) | ( KW_TABLE )? tableName ( LPAREN cols= columnNameList RPAREN )? ( partitionSpec )? -> ^( TOK_TABLE_TYPE tableName ( $cols)? ( partitionSpec )? ) | KW_URI (path= StringLiteral ) -> ^( TOK_URI_TYPE $path) | KW_SERVER identifier -> ^( TOK_SERVER_TYPE identifier ) );
	public final HiveParser.privObjectCols_return privObjectCols() throws RecognitionException {
		HiveParser.privObjectCols_return retval = new HiveParser.privObjectCols_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token path=null;
		Token KW_DATABASE587=null;
		Token KW_SCHEMA588=null;
		Token KW_TABLE590=null;
		Token LPAREN592=null;
		Token RPAREN593=null;
		Token KW_URI595=null;
		Token KW_SERVER596=null;
		ParserRuleReturnScope cols =null;
		ParserRuleReturnScope identifier589 =null;
		ParserRuleReturnScope tableName591 =null;
		ParserRuleReturnScope partitionSpec594 =null;
		ParserRuleReturnScope identifier597 =null;

		ASTNode path_tree=null;
		ASTNode KW_DATABASE587_tree=null;
		ASTNode KW_SCHEMA588_tree=null;
		ASTNode KW_TABLE590_tree=null;
		ASTNode LPAREN592_tree=null;
		ASTNode RPAREN593_tree=null;
		ASTNode KW_URI595_tree=null;
		ASTNode KW_SERVER596_tree=null;
		RewriteRuleTokenStream stream_KW_SERVER=new RewriteRuleTokenStream(adaptor,"token KW_SERVER");
		RewriteRuleTokenStream stream_KW_SCHEMA=new RewriteRuleTokenStream(adaptor,"token KW_SCHEMA");
		RewriteRuleTokenStream stream_KW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_DATABASE");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_URI=new RewriteRuleTokenStream(adaptor,"token KW_URI");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1709:5: ( ( KW_DATABASE | KW_SCHEMA ) identifier -> ^( TOK_DB_TYPE identifier ) | ( KW_TABLE )? tableName ( LPAREN cols= columnNameList RPAREN )? ( partitionSpec )? -> ^( TOK_TABLE_TYPE tableName ( $cols)? ( partitionSpec )? ) | KW_URI (path= StringLiteral ) -> ^( TOK_URI_TYPE $path) | KW_SERVER identifier -> ^( TOK_SERVER_TYPE identifier ) )
			int alt183=4;
			switch ( input.LA(1) ) {
			case KW_DATABASE:
				{
				alt183=1;
				}
				break;
			case KW_SCHEMA:
				{
				int LA183_2 = input.LA(2);
				if ( (LA183_2==Identifier||(LA183_2 >= KW_ABORT && LA183_2 <= KW_AFTER)||LA183_2==KW_ANALYZE||LA183_2==KW_ARCHIVE||LA183_2==KW_ASC||(LA183_2 >= KW_AUTOCOMMIT && LA183_2 <= KW_BEFORE)||(LA183_2 >= KW_BUCKET && LA183_2 <= KW_BUCKETS)||(LA183_2 >= KW_CACHE && LA183_2 <= KW_CASCADE)||LA183_2==KW_CHANGE||(LA183_2 >= KW_CLUSTER && LA183_2 <= KW_COLLECTION)||(LA183_2 >= KW_COLUMNS && LA183_2 <= KW_COMMENT)||(LA183_2 >= KW_COMPACT && LA183_2 <= KW_CONCATENATE)||LA183_2==KW_CONTINUE||LA183_2==KW_DATA||LA183_2==KW_DATABASES||(LA183_2 >= KW_DATETIME && LA183_2 <= KW_DBPROPERTIES)||(LA183_2 >= KW_DEFERRED && LA183_2 <= KW_DEFINED)||(LA183_2 >= KW_DELIMITED && LA183_2 <= KW_DESC)||(LA183_2 >= KW_DETAIL && LA183_2 <= KW_DISABLE)||LA183_2==KW_DISTRIBUTE||LA183_2==KW_DOW||(LA183_2 >= KW_DUMP && LA183_2 <= KW_ELEM_TYPE)||LA183_2==KW_ENABLE||LA183_2==KW_ESCAPED||LA183_2==KW_EXCLUSIVE||(LA183_2 >= KW_EXPLAIN && LA183_2 <= KW_EXPRESSION)||(LA183_2 >= KW_FIELDS && LA183_2 <= KW_FIRST)||(LA183_2 >= KW_FORMAT && LA183_2 <= KW_FORMATTED)||LA183_2==KW_FUNCTIONS||(LA183_2 >= KW_HOUR && LA183_2 <= KW_IDXPROPERTIES)||(LA183_2 >= KW_INDEX && LA183_2 <= KW_INDEXES)||(LA183_2 >= KW_INPATH && LA183_2 <= KW_INPUTFORMAT)||(LA183_2 >= KW_ISOLATION && LA183_2 <= KW_JAR)||(LA183_2 >= KW_KEY && LA183_2 <= KW_LAST)||LA183_2==KW_LEVEL||(LA183_2 >= KW_LIMIT && LA183_2 <= KW_LOAD)||(LA183_2 >= KW_LOCATION && LA183_2 <= KW_LONG)||(LA183_2 >= KW_MAPJOIN && LA183_2 <= KW_MATERIALIZED)||LA183_2==KW_METADATA||(LA183_2 >= KW_MINUTE && LA183_2 <= KW_MONTH)||LA183_2==KW_MSCK||(LA183_2 >= KW_NORELY && LA183_2 <= KW_NOSCAN)||LA183_2==KW_NOVALIDATE||LA183_2==KW_NULLS||LA183_2==KW_OFFSET||(LA183_2 >= KW_OPERATOR && LA183_2 <= KW_OPTION)||(LA183_2 >= KW_OUTPUTDRIVER && LA183_2 <= KW_OUTPUTFORMAT)||(LA183_2 >= KW_OVERWRITE && LA183_2 <= KW_OWNER)||(LA183_2 >= KW_PARTITIONED && LA183_2 <= KW_PARTITIONS)||LA183_2==KW_PLUS||LA183_2==KW_PRETTY||LA183_2==KW_PRINCIPALS||(LA183_2 >= KW_PURGE && LA183_2 <= KW_QUARTER)||LA183_2==KW_READ||(LA183_2 >= KW_REBUILD && LA183_2 <= KW_RECORDWRITER)||(LA183_2 >= KW_RELOAD && LA183_2 <= KW_RESTRICT)||LA183_2==KW_REWRITE||(LA183_2 >= KW_ROLE && LA183_2 <= KW_ROLES)||(LA183_2 >= KW_SCHEMA && LA183_2 <= KW_SECOND)||(LA183_2 >= KW_SEMI && LA183_2 <= KW_SERVER)||(LA183_2 >= KW_SETS && LA183_2 <= KW_SKEWED)||(LA183_2 >= KW_SNAPSHOT && LA183_2 <= KW_SSL)||(LA183_2 >= KW_STATISTICS && LA183_2 <= KW_SUMMARY)||LA183_2==KW_TABLES||(LA183_2 >= KW_TBLPROPERTIES && LA183_2 <= KW_TERMINATED)||LA183_2==KW_TINYINT||(LA183_2 >= KW_TOUCH && LA183_2 <= KW_TRANSACTIONS)||LA183_2==KW_UNARCHIVE||LA183_2==KW_UNDO||LA183_2==KW_UNIONTYPE||(LA183_2 >= KW_UNLOCK && LA183_2 <= KW_UNSIGNED)||(LA183_2 >= KW_URI && LA183_2 <= KW_USE)||(LA183_2 >= KW_UTC && LA183_2 <= KW_VALIDATE)||LA183_2==KW_VALUE_TYPE||(LA183_2 >= KW_VECTORIZATION && LA183_2 <= KW_WEEK)||LA183_2==KW_WHILE||(LA183_2 >= KW_WORK && LA183_2 <= KW_YEAR)||LA183_2==KW_BATCH||LA183_2==KW_DAYOFWEEK||LA183_2==KW_HOLD_DDLTIME||LA183_2==KW_IGNORE||LA183_2==KW_NO_DROP||LA183_2==KW_OFFLINE||LA183_2==KW_PROTECTION||LA183_2==KW_READONLY) ) {
					alt183=1;
				}
				else if ( (LA183_2==EOF||LA183_2==DOT||LA183_2==KW_PARTITION||LA183_2==LPAREN) ) {
					alt183=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 183, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case Identifier:
			case KW_ABORT:
			case KW_ADD:
			case KW_ADMIN:
			case KW_AFTER:
			case KW_ANALYZE:
			case KW_ARCHIVE:
			case KW_ASC:
			case KW_AUTOCOMMIT:
			case KW_BEFORE:
			case KW_BUCKET:
			case KW_BUCKETS:
			case KW_CACHE:
			case KW_CASCADE:
			case KW_CHANGE:
			case KW_CLUSTER:
			case KW_CLUSTERED:
			case KW_CLUSTERSTATUS:
			case KW_COLLECTION:
			case KW_COLUMNS:
			case KW_COMMENT:
			case KW_COMPACT:
			case KW_COMPACTIONS:
			case KW_COMPUTE:
			case KW_CONCATENATE:
			case KW_CONTINUE:
			case KW_DATA:
			case KW_DATABASES:
			case KW_DATETIME:
			case KW_DAY:
			case KW_DBPROPERTIES:
			case KW_DEFERRED:
			case KW_DEFINED:
			case KW_DELIMITED:
			case KW_DEPENDENCY:
			case KW_DESC:
			case KW_DETAIL:
			case KW_DIRECTORIES:
			case KW_DIRECTORY:
			case KW_DISABLE:
			case KW_DISTRIBUTE:
			case KW_DOW:
			case KW_DUMP:
			case KW_ELEM_TYPE:
			case KW_ENABLE:
			case KW_ESCAPED:
			case KW_EXCLUSIVE:
			case KW_EXPLAIN:
			case KW_EXPORT:
			case KW_EXPRESSION:
			case KW_FIELDS:
			case KW_FILE:
			case KW_FILEFORMAT:
			case KW_FIRST:
			case KW_FORMAT:
			case KW_FORMATTED:
			case KW_FUNCTIONS:
			case KW_HOUR:
			case KW_IDXPROPERTIES:
			case KW_INDEX:
			case KW_INDEXES:
			case KW_INPATH:
			case KW_INPUTDRIVER:
			case KW_INPUTFORMAT:
			case KW_ISOLATION:
			case KW_ITEMS:
			case KW_JAR:
			case KW_KEY:
			case KW_KEYS:
			case KW_KEY_TYPE:
			case KW_LAST:
			case KW_LEVEL:
			case KW_LIMIT:
			case KW_LINES:
			case KW_LOAD:
			case KW_LOCATION:
			case KW_LOCK:
			case KW_LOCKS:
			case KW_LOGICAL:
			case KW_LONG:
			case KW_MAPJOIN:
			case KW_MATCHED:
			case KW_MATERIALIZED:
			case KW_METADATA:
			case KW_MINUTE:
			case KW_MONTH:
			case KW_MSCK:
			case KW_NORELY:
			case KW_NOSCAN:
			case KW_NOVALIDATE:
			case KW_NULLS:
			case KW_OFFSET:
			case KW_OPERATOR:
			case KW_OPTION:
			case KW_OUTPUTDRIVER:
			case KW_OUTPUTFORMAT:
			case KW_OVERWRITE:
			case KW_OWNER:
			case KW_PARTITIONED:
			case KW_PARTITIONS:
			case KW_PLUS:
			case KW_PRETTY:
			case KW_PRINCIPALS:
			case KW_PURGE:
			case KW_QUARTER:
			case KW_READ:
			case KW_REBUILD:
			case KW_RECORDREADER:
			case KW_RECORDWRITER:
			case KW_RELOAD:
			case KW_RELY:
			case KW_RENAME:
			case KW_REPAIR:
			case KW_REPL:
			case KW_REPLACE:
			case KW_REPLICATION:
			case KW_RESTRICT:
			case KW_REWRITE:
			case KW_ROLE:
			case KW_ROLES:
			case KW_SCHEMAS:
			case KW_SECOND:
			case KW_SEMI:
			case KW_SERDE:
			case KW_SERDEPROPERTIES:
			case KW_SETS:
			case KW_SHARED:
			case KW_SHOW:
			case KW_SHOW_DATABASE:
			case KW_SKEWED:
			case KW_SNAPSHOT:
			case KW_SORT:
			case KW_SORTED:
			case KW_SSL:
			case KW_STATISTICS:
			case KW_STATUS:
			case KW_STORED:
			case KW_STREAMTABLE:
			case KW_STRING:
			case KW_STRUCT:
			case KW_SUMMARY:
			case KW_TABLE:
			case KW_TABLES:
			case KW_TBLPROPERTIES:
			case KW_TEMPORARY:
			case KW_TERMINATED:
			case KW_TINYINT:
			case KW_TOUCH:
			case KW_TRANSACTION:
			case KW_TRANSACTIONS:
			case KW_UNARCHIVE:
			case KW_UNDO:
			case KW_UNIONTYPE:
			case KW_UNLOCK:
			case KW_UNSET:
			case KW_UNSIGNED:
			case KW_USE:
			case KW_UTC:
			case KW_UTCTIMESTAMP:
			case KW_VALIDATE:
			case KW_VALUE_TYPE:
			case KW_VECTORIZATION:
			case KW_VIEW:
			case KW_VIEWS:
			case KW_WAIT:
			case KW_WEEK:
			case KW_WHILE:
			case KW_WORK:
			case KW_WRITE:
			case KW_YEAR:
			case KW_BATCH:
			case KW_DAYOFWEEK:
			case KW_HOLD_DDLTIME:
			case KW_IGNORE:
			case KW_NO_DROP:
			case KW_OFFLINE:
			case KW_PROTECTION:
			case KW_READONLY:
				{
				alt183=2;
				}
				break;
			case KW_URI:
				{
				int LA183_5 = input.LA(2);
				if ( (LA183_5==EOF||LA183_5==DOT||LA183_5==KW_PARTITION||LA183_5==LPAREN) ) {
					alt183=2;
				}
				else if ( (LA183_5==StringLiteral) ) {
					alt183=3;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 183, 5, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_SERVER:
				{
				int LA183_6 = input.LA(2);
				if ( (LA183_6==EOF||LA183_6==DOT||LA183_6==KW_PARTITION||LA183_6==LPAREN) ) {
					alt183=2;
				}
				else if ( (LA183_6==Identifier||(LA183_6 >= KW_ABORT && LA183_6 <= KW_AFTER)||LA183_6==KW_ANALYZE||LA183_6==KW_ARCHIVE||LA183_6==KW_ASC||(LA183_6 >= KW_AUTOCOMMIT && LA183_6 <= KW_BEFORE)||(LA183_6 >= KW_BUCKET && LA183_6 <= KW_BUCKETS)||(LA183_6 >= KW_CACHE && LA183_6 <= KW_CASCADE)||LA183_6==KW_CHANGE||(LA183_6 >= KW_CLUSTER && LA183_6 <= KW_COLLECTION)||(LA183_6 >= KW_COLUMNS && LA183_6 <= KW_COMMENT)||(LA183_6 >= KW_COMPACT && LA183_6 <= KW_CONCATENATE)||LA183_6==KW_CONTINUE||LA183_6==KW_DATA||LA183_6==KW_DATABASES||(LA183_6 >= KW_DATETIME && LA183_6 <= KW_DBPROPERTIES)||(LA183_6 >= KW_DEFERRED && LA183_6 <= KW_DEFINED)||(LA183_6 >= KW_DELIMITED && LA183_6 <= KW_DESC)||(LA183_6 >= KW_DETAIL && LA183_6 <= KW_DISABLE)||LA183_6==KW_DISTRIBUTE||LA183_6==KW_DOW||(LA183_6 >= KW_DUMP && LA183_6 <= KW_ELEM_TYPE)||LA183_6==KW_ENABLE||LA183_6==KW_ESCAPED||LA183_6==KW_EXCLUSIVE||(LA183_6 >= KW_EXPLAIN && LA183_6 <= KW_EXPRESSION)||(LA183_6 >= KW_FIELDS && LA183_6 <= KW_FIRST)||(LA183_6 >= KW_FORMAT && LA183_6 <= KW_FORMATTED)||LA183_6==KW_FUNCTIONS||(LA183_6 >= KW_HOUR && LA183_6 <= KW_IDXPROPERTIES)||(LA183_6 >= KW_INDEX && LA183_6 <= KW_INDEXES)||(LA183_6 >= KW_INPATH && LA183_6 <= KW_INPUTFORMAT)||(LA183_6 >= KW_ISOLATION && LA183_6 <= KW_JAR)||(LA183_6 >= KW_KEY && LA183_6 <= KW_LAST)||LA183_6==KW_LEVEL||(LA183_6 >= KW_LIMIT && LA183_6 <= KW_LOAD)||(LA183_6 >= KW_LOCATION && LA183_6 <= KW_LONG)||(LA183_6 >= KW_MAPJOIN && LA183_6 <= KW_MATERIALIZED)||LA183_6==KW_METADATA||(LA183_6 >= KW_MINUTE && LA183_6 <= KW_MONTH)||LA183_6==KW_MSCK||(LA183_6 >= KW_NORELY && LA183_6 <= KW_NOSCAN)||LA183_6==KW_NOVALIDATE||LA183_6==KW_NULLS||LA183_6==KW_OFFSET||(LA183_6 >= KW_OPERATOR && LA183_6 <= KW_OPTION)||(LA183_6 >= KW_OUTPUTDRIVER && LA183_6 <= KW_OUTPUTFORMAT)||(LA183_6 >= KW_OVERWRITE && LA183_6 <= KW_OWNER)||(LA183_6 >= KW_PARTITIONED && LA183_6 <= KW_PARTITIONS)||LA183_6==KW_PLUS||LA183_6==KW_PRETTY||LA183_6==KW_PRINCIPALS||(LA183_6 >= KW_PURGE && LA183_6 <= KW_QUARTER)||LA183_6==KW_READ||(LA183_6 >= KW_REBUILD && LA183_6 <= KW_RECORDWRITER)||(LA183_6 >= KW_RELOAD && LA183_6 <= KW_RESTRICT)||LA183_6==KW_REWRITE||(LA183_6 >= KW_ROLE && LA183_6 <= KW_ROLES)||(LA183_6 >= KW_SCHEMA && LA183_6 <= KW_SECOND)||(LA183_6 >= KW_SEMI && LA183_6 <= KW_SERVER)||(LA183_6 >= KW_SETS && LA183_6 <= KW_SKEWED)||(LA183_6 >= KW_SNAPSHOT && LA183_6 <= KW_SSL)||(LA183_6 >= KW_STATISTICS && LA183_6 <= KW_SUMMARY)||LA183_6==KW_TABLES||(LA183_6 >= KW_TBLPROPERTIES && LA183_6 <= KW_TERMINATED)||LA183_6==KW_TINYINT||(LA183_6 >= KW_TOUCH && LA183_6 <= KW_TRANSACTIONS)||LA183_6==KW_UNARCHIVE||LA183_6==KW_UNDO||LA183_6==KW_UNIONTYPE||(LA183_6 >= KW_UNLOCK && LA183_6 <= KW_UNSIGNED)||(LA183_6 >= KW_URI && LA183_6 <= KW_USE)||(LA183_6 >= KW_UTC && LA183_6 <= KW_VALIDATE)||LA183_6==KW_VALUE_TYPE||(LA183_6 >= KW_VECTORIZATION && LA183_6 <= KW_WEEK)||LA183_6==KW_WHILE||(LA183_6 >= KW_WORK && LA183_6 <= KW_YEAR)||LA183_6==KW_BATCH||LA183_6==KW_DAYOFWEEK||LA183_6==KW_HOLD_DDLTIME||LA183_6==KW_IGNORE||LA183_6==KW_NO_DROP||LA183_6==KW_OFFLINE||LA183_6==KW_PROTECTION||LA183_6==KW_READONLY) ) {
					alt183=4;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 183, 6, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 183, 0, input);
				throw nvae;
			}
			switch (alt183) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1709:7: ( KW_DATABASE | KW_SCHEMA ) identifier
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1709:7: ( KW_DATABASE | KW_SCHEMA )
					int alt179=2;
					int LA179_0 = input.LA(1);
					if ( (LA179_0==KW_DATABASE) ) {
						alt179=1;
					}
					else if ( (LA179_0==KW_SCHEMA) ) {
						alt179=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 179, 0, input);
						throw nvae;
					}

					switch (alt179) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1709:8: KW_DATABASE
							{
							KW_DATABASE587=(Token)match(input,KW_DATABASE,FOLLOW_KW_DATABASE_in_privObjectCols9532); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DATABASE.add(KW_DATABASE587);

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1709:20: KW_SCHEMA
							{
							KW_SCHEMA588=(Token)match(input,KW_SCHEMA,FOLLOW_KW_SCHEMA_in_privObjectCols9534); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SCHEMA.add(KW_SCHEMA588);

							}
							break;

					}

					pushFollow(FOLLOW_identifier_in_privObjectCols9537);
					identifier589=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier589.getTree());
					// AST REWRITE
					// elements: identifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1709:42: -> ^( TOK_DB_TYPE identifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1709:45: ^( TOK_DB_TYPE identifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DB_TYPE, "TOK_DB_TYPE"), root_1);
						adaptor.addChild(root_1, stream_identifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:7: ( KW_TABLE )? tableName ( LPAREN cols= columnNameList RPAREN )? ( partitionSpec )?
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:7: ( KW_TABLE )?
					int alt180=2;
					int LA180_0 = input.LA(1);
					if ( (LA180_0==KW_TABLE) ) {
						alt180=1;
					}
					switch (alt180) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:7: KW_TABLE
							{
							KW_TABLE590=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_privObjectCols9553); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE590);

							}
							break;

					}

					pushFollow(FOLLOW_tableName_in_privObjectCols9556);
					tableName591=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName591.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:27: ( LPAREN cols= columnNameList RPAREN )?
					int alt181=2;
					int LA181_0 = input.LA(1);
					if ( (LA181_0==LPAREN) ) {
						alt181=1;
					}
					switch (alt181) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:28: LPAREN cols= columnNameList RPAREN
							{
							LPAREN592=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_privObjectCols9559); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN592);

							pushFollow(FOLLOW_columnNameList_in_privObjectCols9563);
							cols=columnNameList();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_columnNameList.add(cols.getTree());
							RPAREN593=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_privObjectCols9565); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN593);

							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:64: ( partitionSpec )?
					int alt182=2;
					int LA182_0 = input.LA(1);
					if ( (LA182_0==KW_PARTITION) ) {
						alt182=1;
					}
					switch (alt182) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:64: partitionSpec
							{
							pushFollow(FOLLOW_partitionSpec_in_privObjectCols9569);
							partitionSpec594=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec594.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: cols, partitionSpec, tableName
					// token labels: 
					// rule labels: cols, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_cols=new RewriteRuleSubtreeStream(adaptor,"rule cols",cols!=null?cols.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1710:79: -> ^( TOK_TABLE_TYPE tableName ( $cols)? ( partitionSpec )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:82: ^( TOK_TABLE_TYPE tableName ( $cols)? ( partitionSpec )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLE_TYPE, "TOK_TABLE_TYPE"), root_1);
						adaptor.addChild(root_1, stream_tableName.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:110: ( $cols)?
						if ( stream_cols.hasNext() ) {
							adaptor.addChild(root_1, stream_cols.nextTree());
						}
						stream_cols.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1710:116: ( partitionSpec )?
						if ( stream_partitionSpec.hasNext() ) {
							adaptor.addChild(root_1, stream_partitionSpec.nextTree());
						}
						stream_partitionSpec.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1711:7: KW_URI (path= StringLiteral )
					{
					KW_URI595=(Token)match(input,KW_URI,FOLLOW_KW_URI_in_privObjectCols9593); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_URI.add(KW_URI595);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1711:14: (path= StringLiteral )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1711:15: path= StringLiteral
					{
					path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_privObjectCols9598); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(path);

					}

					// AST REWRITE
					// elements: path
					// token labels: path
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1711:35: -> ^( TOK_URI_TYPE $path)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1711:39: ^( TOK_URI_TYPE $path)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_URI_TYPE, "TOK_URI_TYPE"), root_1);
						adaptor.addChild(root_1, stream_path.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1712:7: KW_SERVER identifier
					{
					KW_SERVER596=(Token)match(input,KW_SERVER,FOLLOW_KW_SERVER_in_privObjectCols9617); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SERVER.add(KW_SERVER596);

					pushFollow(FOLLOW_identifier_in_privObjectCols9619);
					identifier597=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier597.getTree());
					// AST REWRITE
					// elements: identifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1712:28: -> ^( TOK_SERVER_TYPE identifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1712:31: ^( TOK_SERVER_TYPE identifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERVER_TYPE, "TOK_SERVER_TYPE"), root_1);
						adaptor.addChild(root_1, stream_identifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privObjectCols"


	public static class privilegeList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privilegeList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1715:1: privilegeList : privlegeDef ( COMMA privlegeDef )* -> ^( TOK_PRIVILEGE_LIST ( privlegeDef )+ ) ;
	public final HiveParser.privilegeList_return privilegeList() throws RecognitionException {
		HiveParser.privilegeList_return retval = new HiveParser.privilegeList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA599=null;
		ParserRuleReturnScope privlegeDef598 =null;
		ParserRuleReturnScope privlegeDef600 =null;

		ASTNode COMMA599_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_privlegeDef=new RewriteRuleSubtreeStream(adaptor,"rule privlegeDef");

		pushMsg("grant privilege list", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1718:5: ( privlegeDef ( COMMA privlegeDef )* -> ^( TOK_PRIVILEGE_LIST ( privlegeDef )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1718:7: privlegeDef ( COMMA privlegeDef )*
			{
			pushFollow(FOLLOW_privlegeDef_in_privilegeList9654);
			privlegeDef598=privlegeDef();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_privlegeDef.add(privlegeDef598.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1718:19: ( COMMA privlegeDef )*
			loop184:
			while (true) {
				int alt184=2;
				int LA184_0 = input.LA(1);
				if ( (LA184_0==COMMA) ) {
					alt184=1;
				}

				switch (alt184) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1718:20: COMMA privlegeDef
					{
					COMMA599=(Token)match(input,COMMA,FOLLOW_COMMA_in_privilegeList9657); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA599);

					pushFollow(FOLLOW_privlegeDef_in_privilegeList9659);
					privlegeDef600=privlegeDef();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_privlegeDef.add(privlegeDef600.getTree());
					}
					break;

				default :
					break loop184;
				}
			}

			// AST REWRITE
			// elements: privlegeDef
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1719:5: -> ^( TOK_PRIVILEGE_LIST ( privlegeDef )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1719:8: ^( TOK_PRIVILEGE_LIST ( privlegeDef )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIVILEGE_LIST, "TOK_PRIVILEGE_LIST"), root_1);
				if ( !(stream_privlegeDef.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_privlegeDef.hasNext() ) {
					adaptor.addChild(root_1, stream_privlegeDef.nextTree());
				}
				stream_privlegeDef.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privilegeList"


	public static class privlegeDef_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privlegeDef"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1722:1: privlegeDef : privilegeType ( LPAREN cols= columnNameList RPAREN )? -> ^( TOK_PRIVILEGE privilegeType ( $cols)? ) ;
	public final HiveParser.privlegeDef_return privlegeDef() throws RecognitionException {
		HiveParser.privlegeDef_return retval = new HiveParser.privlegeDef_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN602=null;
		Token RPAREN603=null;
		ParserRuleReturnScope cols =null;
		ParserRuleReturnScope privilegeType601 =null;

		ASTNode LPAREN602_tree=null;
		ASTNode RPAREN603_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");
		RewriteRuleSubtreeStream stream_privilegeType=new RewriteRuleSubtreeStream(adaptor,"rule privilegeType");

		pushMsg("grant privilege", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1725:5: ( privilegeType ( LPAREN cols= columnNameList RPAREN )? -> ^( TOK_PRIVILEGE privilegeType ( $cols)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1725:7: privilegeType ( LPAREN cols= columnNameList RPAREN )?
			{
			pushFollow(FOLLOW_privilegeType_in_privlegeDef9701);
			privilegeType601=privilegeType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_privilegeType.add(privilegeType601.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1725:21: ( LPAREN cols= columnNameList RPAREN )?
			int alt185=2;
			int LA185_0 = input.LA(1);
			if ( (LA185_0==LPAREN) ) {
				alt185=1;
			}
			switch (alt185) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1725:22: LPAREN cols= columnNameList RPAREN
					{
					LPAREN602=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_privlegeDef9704); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN602);

					pushFollow(FOLLOW_columnNameList_in_privlegeDef9708);
					cols=columnNameList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameList.add(cols.getTree());
					RPAREN603=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_privlegeDef9710); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN603);

					}
					break;

			}

			// AST REWRITE
			// elements: privilegeType, cols
			// token labels: 
			// rule labels: cols, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_cols=new RewriteRuleSubtreeStream(adaptor,"rule cols",cols!=null?cols.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1726:5: -> ^( TOK_PRIVILEGE privilegeType ( $cols)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1726:8: ^( TOK_PRIVILEGE privilegeType ( $cols)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIVILEGE, "TOK_PRIVILEGE"), root_1);
				adaptor.addChild(root_1, stream_privilegeType.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1726:39: ( $cols)?
				if ( stream_cols.hasNext() ) {
					adaptor.addChild(root_1, stream_cols.nextTree());
				}
				stream_cols.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privlegeDef"


	public static class privilegeType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "privilegeType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1729:1: privilegeType : ( KW_ALL -> ^( TOK_PRIV_ALL ) | KW_ALTER -> ^( TOK_PRIV_ALTER_METADATA ) | KW_UPDATE -> ^( TOK_PRIV_ALTER_DATA ) | KW_CREATE -> ^( TOK_PRIV_CREATE ) | KW_DROP -> ^( TOK_PRIV_DROP ) | KW_INDEX -> ^( TOK_PRIV_INDEX ) | KW_LOCK -> ^( TOK_PRIV_LOCK ) | KW_SELECT -> ^( TOK_PRIV_SELECT ) | KW_SHOW_DATABASE -> ^( TOK_PRIV_SHOW_DATABASE ) | KW_INSERT -> ^( TOK_PRIV_INSERT ) | KW_DELETE -> ^( TOK_PRIV_DELETE ) );
	public final HiveParser.privilegeType_return privilegeType() throws RecognitionException {
		HiveParser.privilegeType_return retval = new HiveParser.privilegeType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ALL604=null;
		Token KW_ALTER605=null;
		Token KW_UPDATE606=null;
		Token KW_CREATE607=null;
		Token KW_DROP608=null;
		Token KW_INDEX609=null;
		Token KW_LOCK610=null;
		Token KW_SELECT611=null;
		Token KW_SHOW_DATABASE612=null;
		Token KW_INSERT613=null;
		Token KW_DELETE614=null;

		ASTNode KW_ALL604_tree=null;
		ASTNode KW_ALTER605_tree=null;
		ASTNode KW_UPDATE606_tree=null;
		ASTNode KW_CREATE607_tree=null;
		ASTNode KW_DROP608_tree=null;
		ASTNode KW_INDEX609_tree=null;
		ASTNode KW_LOCK610_tree=null;
		ASTNode KW_SELECT611_tree=null;
		ASTNode KW_SHOW_DATABASE612_tree=null;
		ASTNode KW_INSERT613_tree=null;
		ASTNode KW_DELETE614_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_DELETE=new RewriteRuleTokenStream(adaptor,"token KW_DELETE");
		RewriteRuleTokenStream stream_KW_SHOW_DATABASE=new RewriteRuleTokenStream(adaptor,"token KW_SHOW_DATABASE");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_INDEX=new RewriteRuleTokenStream(adaptor,"token KW_INDEX");
		RewriteRuleTokenStream stream_KW_ALTER=new RewriteRuleTokenStream(adaptor,"token KW_ALTER");
		RewriteRuleTokenStream stream_KW_UPDATE=new RewriteRuleTokenStream(adaptor,"token KW_UPDATE");
		RewriteRuleTokenStream stream_KW_LOCK=new RewriteRuleTokenStream(adaptor,"token KW_LOCK");
		RewriteRuleTokenStream stream_KW_INSERT=new RewriteRuleTokenStream(adaptor,"token KW_INSERT");
		RewriteRuleTokenStream stream_KW_SELECT=new RewriteRuleTokenStream(adaptor,"token KW_SELECT");
		RewriteRuleTokenStream stream_KW_ALL=new RewriteRuleTokenStream(adaptor,"token KW_ALL");

		pushMsg("privilege type", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1732:5: ( KW_ALL -> ^( TOK_PRIV_ALL ) | KW_ALTER -> ^( TOK_PRIV_ALTER_METADATA ) | KW_UPDATE -> ^( TOK_PRIV_ALTER_DATA ) | KW_CREATE -> ^( TOK_PRIV_CREATE ) | KW_DROP -> ^( TOK_PRIV_DROP ) | KW_INDEX -> ^( TOK_PRIV_INDEX ) | KW_LOCK -> ^( TOK_PRIV_LOCK ) | KW_SELECT -> ^( TOK_PRIV_SELECT ) | KW_SHOW_DATABASE -> ^( TOK_PRIV_SHOW_DATABASE ) | KW_INSERT -> ^( TOK_PRIV_INSERT ) | KW_DELETE -> ^( TOK_PRIV_DELETE ) )
			int alt186=11;
			switch ( input.LA(1) ) {
			case KW_ALL:
				{
				alt186=1;
				}
				break;
			case KW_ALTER:
				{
				alt186=2;
				}
				break;
			case KW_UPDATE:
				{
				alt186=3;
				}
				break;
			case KW_CREATE:
				{
				alt186=4;
				}
				break;
			case KW_DROP:
				{
				alt186=5;
				}
				break;
			case KW_INDEX:
				{
				alt186=6;
				}
				break;
			case KW_LOCK:
				{
				alt186=7;
				}
				break;
			case KW_SELECT:
				{
				alt186=8;
				}
				break;
			case KW_SHOW_DATABASE:
				{
				alt186=9;
				}
				break;
			case KW_INSERT:
				{
				alt186=10;
				}
				break;
			case KW_DELETE:
				{
				alt186=11;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 186, 0, input);
				throw nvae;
			}
			switch (alt186) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1732:7: KW_ALL
					{
					KW_ALL604=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_privilegeType9755); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(KW_ALL604);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1732:14: -> ^( TOK_PRIV_ALL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1732:17: ^( TOK_PRIV_ALL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_ALL, "TOK_PRIV_ALL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1733:7: KW_ALTER
					{
					KW_ALTER605=(Token)match(input,KW_ALTER,FOLLOW_KW_ALTER_in_privilegeType9769); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALTER.add(KW_ALTER605);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1733:16: -> ^( TOK_PRIV_ALTER_METADATA )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1733:19: ^( TOK_PRIV_ALTER_METADATA )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_ALTER_METADATA, "TOK_PRIV_ALTER_METADATA"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1734:7: KW_UPDATE
					{
					KW_UPDATE606=(Token)match(input,KW_UPDATE,FOLLOW_KW_UPDATE_in_privilegeType9783); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_UPDATE.add(KW_UPDATE606);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1734:17: -> ^( TOK_PRIV_ALTER_DATA )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1734:20: ^( TOK_PRIV_ALTER_DATA )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_ALTER_DATA, "TOK_PRIV_ALTER_DATA"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1735:7: KW_CREATE
					{
					KW_CREATE607=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_privilegeType9797); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE607);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1735:17: -> ^( TOK_PRIV_CREATE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1735:20: ^( TOK_PRIV_CREATE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_CREATE, "TOK_PRIV_CREATE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1736:7: KW_DROP
					{
					KW_DROP608=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_privilegeType9811); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP608);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1736:15: -> ^( TOK_PRIV_DROP )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1736:18: ^( TOK_PRIV_DROP )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_DROP, "TOK_PRIV_DROP"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1737:7: KW_INDEX
					{
					KW_INDEX609=(Token)match(input,KW_INDEX,FOLLOW_KW_INDEX_in_privilegeType9825); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INDEX.add(KW_INDEX609);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1737:16: -> ^( TOK_PRIV_INDEX )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1737:19: ^( TOK_PRIV_INDEX )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_INDEX, "TOK_PRIV_INDEX"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1738:7: KW_LOCK
					{
					KW_LOCK610=(Token)match(input,KW_LOCK,FOLLOW_KW_LOCK_in_privilegeType9839); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LOCK.add(KW_LOCK610);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1738:15: -> ^( TOK_PRIV_LOCK )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1738:18: ^( TOK_PRIV_LOCK )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_LOCK, "TOK_PRIV_LOCK"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1739:7: KW_SELECT
					{
					KW_SELECT611=(Token)match(input,KW_SELECT,FOLLOW_KW_SELECT_in_privilegeType9853); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SELECT.add(KW_SELECT611);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1739:17: -> ^( TOK_PRIV_SELECT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1739:20: ^( TOK_PRIV_SELECT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_SELECT, "TOK_PRIV_SELECT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1740:7: KW_SHOW_DATABASE
					{
					KW_SHOW_DATABASE612=(Token)match(input,KW_SHOW_DATABASE,FOLLOW_KW_SHOW_DATABASE_in_privilegeType9867); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SHOW_DATABASE.add(KW_SHOW_DATABASE612);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1740:24: -> ^( TOK_PRIV_SHOW_DATABASE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1740:27: ^( TOK_PRIV_SHOW_DATABASE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_SHOW_DATABASE, "TOK_PRIV_SHOW_DATABASE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1741:7: KW_INSERT
					{
					KW_INSERT613=(Token)match(input,KW_INSERT,FOLLOW_KW_INSERT_in_privilegeType9881); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INSERT.add(KW_INSERT613);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1741:17: -> ^( TOK_PRIV_INSERT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1741:20: ^( TOK_PRIV_INSERT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_INSERT, "TOK_PRIV_INSERT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1742:7: KW_DELETE
					{
					KW_DELETE614=(Token)match(input,KW_DELETE,FOLLOW_KW_DELETE_in_privilegeType9895); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DELETE.add(KW_DELETE614);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1742:17: -> ^( TOK_PRIV_DELETE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1742:20: ^( TOK_PRIV_DELETE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIV_DELETE, "TOK_PRIV_DELETE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "privilegeType"


	public static class principalSpecification_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "principalSpecification"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1745:1: principalSpecification : principalName ( COMMA principalName )* -> ^( TOK_PRINCIPAL_NAME ( principalName )+ ) ;
	public final HiveParser.principalSpecification_return principalSpecification() throws RecognitionException {
		HiveParser.principalSpecification_return retval = new HiveParser.principalSpecification_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA616=null;
		ParserRuleReturnScope principalName615 =null;
		ParserRuleReturnScope principalName617 =null;

		ASTNode COMMA616_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_principalName=new RewriteRuleSubtreeStream(adaptor,"rule principalName");

		 pushMsg("user/group/role name list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1748:5: ( principalName ( COMMA principalName )* -> ^( TOK_PRINCIPAL_NAME ( principalName )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1748:7: principalName ( COMMA principalName )*
			{
			pushFollow(FOLLOW_principalName_in_principalSpecification9928);
			principalName615=principalName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_principalName.add(principalName615.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1748:21: ( COMMA principalName )*
			loop187:
			while (true) {
				int alt187=2;
				int LA187_0 = input.LA(1);
				if ( (LA187_0==COMMA) ) {
					alt187=1;
				}

				switch (alt187) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1748:22: COMMA principalName
					{
					COMMA616=(Token)match(input,COMMA,FOLLOW_COMMA_in_principalSpecification9931); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA616);

					pushFollow(FOLLOW_principalName_in_principalSpecification9933);
					principalName617=principalName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_principalName.add(principalName617.getTree());
					}
					break;

				default :
					break loop187;
				}
			}

			// AST REWRITE
			// elements: principalName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1748:44: -> ^( TOK_PRINCIPAL_NAME ( principalName )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1748:47: ^( TOK_PRINCIPAL_NAME ( principalName )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRINCIPAL_NAME, "TOK_PRINCIPAL_NAME"), root_1);
				if ( !(stream_principalName.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_principalName.hasNext() ) {
					adaptor.addChild(root_1, stream_principalName.nextTree());
				}
				stream_principalName.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "principalSpecification"


	public static class principalName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "principalName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1751:1: principalName : ( KW_USER principalIdentifier -> ^( TOK_USER principalIdentifier ) | KW_GROUP principalIdentifier -> ^( TOK_GROUP principalIdentifier ) | KW_ROLE identifier -> ^( TOK_ROLE identifier ) );
	public final HiveParser.principalName_return principalName() throws RecognitionException {
		HiveParser.principalName_return retval = new HiveParser.principalName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_USER618=null;
		Token KW_GROUP620=null;
		Token KW_ROLE622=null;
		ParserRuleReturnScope principalIdentifier619 =null;
		ParserRuleReturnScope principalIdentifier621 =null;
		ParserRuleReturnScope identifier623 =null;

		ASTNode KW_USER618_tree=null;
		ASTNode KW_GROUP620_tree=null;
		ASTNode KW_ROLE622_tree=null;
		RewriteRuleTokenStream stream_KW_ROLE=new RewriteRuleTokenStream(adaptor,"token KW_ROLE");
		RewriteRuleTokenStream stream_KW_USER=new RewriteRuleTokenStream(adaptor,"token KW_USER");
		RewriteRuleTokenStream stream_KW_GROUP=new RewriteRuleTokenStream(adaptor,"token KW_GROUP");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_principalIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule principalIdentifier");

		pushMsg("user|group|role name", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1754:5: ( KW_USER principalIdentifier -> ^( TOK_USER principalIdentifier ) | KW_GROUP principalIdentifier -> ^( TOK_GROUP principalIdentifier ) | KW_ROLE identifier -> ^( TOK_ROLE identifier ) )
			int alt188=3;
			switch ( input.LA(1) ) {
			case KW_USER:
				{
				alt188=1;
				}
				break;
			case KW_GROUP:
				{
				alt188=2;
				}
				break;
			case KW_ROLE:
				{
				alt188=3;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 188, 0, input);
				throw nvae;
			}
			switch (alt188) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1754:7: KW_USER principalIdentifier
					{
					KW_USER618=(Token)match(input,KW_USER,FOLLOW_KW_USER_in_principalName9971); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_USER.add(KW_USER618);

					pushFollow(FOLLOW_principalIdentifier_in_principalName9973);
					principalIdentifier619=principalIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_principalIdentifier.add(principalIdentifier619.getTree());
					// AST REWRITE
					// elements: principalIdentifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1754:35: -> ^( TOK_USER principalIdentifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1754:38: ^( TOK_USER principalIdentifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_USER, "TOK_USER"), root_1);
						adaptor.addChild(root_1, stream_principalIdentifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1755:7: KW_GROUP principalIdentifier
					{
					KW_GROUP620=(Token)match(input,KW_GROUP,FOLLOW_KW_GROUP_in_principalName9989); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_GROUP.add(KW_GROUP620);

					pushFollow(FOLLOW_principalIdentifier_in_principalName9991);
					principalIdentifier621=principalIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_principalIdentifier.add(principalIdentifier621.getTree());
					// AST REWRITE
					// elements: principalIdentifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1755:36: -> ^( TOK_GROUP principalIdentifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1755:39: ^( TOK_GROUP principalIdentifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_GROUP, "TOK_GROUP"), root_1);
						adaptor.addChild(root_1, stream_principalIdentifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1756:7: KW_ROLE identifier
					{
					KW_ROLE622=(Token)match(input,KW_ROLE,FOLLOW_KW_ROLE_in_principalName10007); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ROLE.add(KW_ROLE622);

					pushFollow(FOLLOW_identifier_in_principalName10009);
					identifier623=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier623.getTree());
					// AST REWRITE
					// elements: identifier
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1756:26: -> ^( TOK_ROLE identifier )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1756:29: ^( TOK_ROLE identifier )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ROLE, "TOK_ROLE"), root_1);
						adaptor.addChild(root_1, stream_identifier.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "principalName"


	public static class withGrantOption_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "withGrantOption"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1759:1: withGrantOption : KW_WITH KW_GRANT KW_OPTION -> ^( TOK_GRANT_WITH_OPTION ) ;
	public final HiveParser.withGrantOption_return withGrantOption() throws RecognitionException {
		HiveParser.withGrantOption_return retval = new HiveParser.withGrantOption_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WITH624=null;
		Token KW_GRANT625=null;
		Token KW_OPTION626=null;

		ASTNode KW_WITH624_tree=null;
		ASTNode KW_GRANT625_tree=null;
		ASTNode KW_OPTION626_tree=null;
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_GRANT=new RewriteRuleTokenStream(adaptor,"token KW_GRANT");
		RewriteRuleTokenStream stream_KW_OPTION=new RewriteRuleTokenStream(adaptor,"token KW_OPTION");

		pushMsg("with grant option", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1762:5: ( KW_WITH KW_GRANT KW_OPTION -> ^( TOK_GRANT_WITH_OPTION ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1762:7: KW_WITH KW_GRANT KW_OPTION
			{
			KW_WITH624=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_withGrantOption10044); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH624);

			KW_GRANT625=(Token)match(input,KW_GRANT,FOLLOW_KW_GRANT_in_withGrantOption10046); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_GRANT.add(KW_GRANT625);

			KW_OPTION626=(Token)match(input,KW_OPTION,FOLLOW_KW_OPTION_in_withGrantOption10048); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_OPTION.add(KW_OPTION626);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1763:5: -> ^( TOK_GRANT_WITH_OPTION )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1763:8: ^( TOK_GRANT_WITH_OPTION )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_GRANT_WITH_OPTION, "TOK_GRANT_WITH_OPTION"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "withGrantOption"


	public static class grantOptionFor_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "grantOptionFor"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1766:1: grantOptionFor : KW_GRANT KW_OPTION KW_FOR -> ^( TOK_GRANT_OPTION_FOR ) ;
	public final HiveParser.grantOptionFor_return grantOptionFor() throws RecognitionException {
		HiveParser.grantOptionFor_return retval = new HiveParser.grantOptionFor_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_GRANT627=null;
		Token KW_OPTION628=null;
		Token KW_FOR629=null;

		ASTNode KW_GRANT627_tree=null;
		ASTNode KW_OPTION628_tree=null;
		ASTNode KW_FOR629_tree=null;
		RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,"token KW_FOR");
		RewriteRuleTokenStream stream_KW_GRANT=new RewriteRuleTokenStream(adaptor,"token KW_GRANT");
		RewriteRuleTokenStream stream_KW_OPTION=new RewriteRuleTokenStream(adaptor,"token KW_OPTION");

		pushMsg("grant option for", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1769:5: ( KW_GRANT KW_OPTION KW_FOR -> ^( TOK_GRANT_OPTION_FOR ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1769:7: KW_GRANT KW_OPTION KW_FOR
			{
			KW_GRANT627=(Token)match(input,KW_GRANT,FOLLOW_KW_GRANT_in_grantOptionFor10085); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_GRANT.add(KW_GRANT627);

			KW_OPTION628=(Token)match(input,KW_OPTION,FOLLOW_KW_OPTION_in_grantOptionFor10087); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_OPTION.add(KW_OPTION628);

			KW_FOR629=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_grantOptionFor10089); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOR.add(KW_FOR629);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1770:5: -> ^( TOK_GRANT_OPTION_FOR )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1770:8: ^( TOK_GRANT_OPTION_FOR )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_GRANT_OPTION_FOR, "TOK_GRANT_OPTION_FOR"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "grantOptionFor"


	public static class adminOptionFor_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "adminOptionFor"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1773:1: adminOptionFor : KW_ADMIN KW_OPTION KW_FOR -> ^( TOK_ADMIN_OPTION_FOR ) ;
	public final HiveParser.adminOptionFor_return adminOptionFor() throws RecognitionException {
		HiveParser.adminOptionFor_return retval = new HiveParser.adminOptionFor_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ADMIN630=null;
		Token KW_OPTION631=null;
		Token KW_FOR632=null;

		ASTNode KW_ADMIN630_tree=null;
		ASTNode KW_OPTION631_tree=null;
		ASTNode KW_FOR632_tree=null;
		RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,"token KW_FOR");
		RewriteRuleTokenStream stream_KW_OPTION=new RewriteRuleTokenStream(adaptor,"token KW_OPTION");
		RewriteRuleTokenStream stream_KW_ADMIN=new RewriteRuleTokenStream(adaptor,"token KW_ADMIN");

		pushMsg("admin option for", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1776:5: ( KW_ADMIN KW_OPTION KW_FOR -> ^( TOK_ADMIN_OPTION_FOR ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1776:7: KW_ADMIN KW_OPTION KW_FOR
			{
			KW_ADMIN630=(Token)match(input,KW_ADMIN,FOLLOW_KW_ADMIN_in_adminOptionFor10122); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ADMIN.add(KW_ADMIN630);

			KW_OPTION631=(Token)match(input,KW_OPTION,FOLLOW_KW_OPTION_in_adminOptionFor10124); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_OPTION.add(KW_OPTION631);

			KW_FOR632=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_adminOptionFor10126); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOR.add(KW_FOR632);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1777:5: -> ^( TOK_ADMIN_OPTION_FOR )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1777:8: ^( TOK_ADMIN_OPTION_FOR )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ADMIN_OPTION_FOR, "TOK_ADMIN_OPTION_FOR"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "adminOptionFor"


	public static class withAdminOption_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "withAdminOption"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1780:1: withAdminOption : KW_WITH KW_ADMIN KW_OPTION -> ^( TOK_GRANT_WITH_ADMIN_OPTION ) ;
	public final HiveParser.withAdminOption_return withAdminOption() throws RecognitionException {
		HiveParser.withAdminOption_return retval = new HiveParser.withAdminOption_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WITH633=null;
		Token KW_ADMIN634=null;
		Token KW_OPTION635=null;

		ASTNode KW_WITH633_tree=null;
		ASTNode KW_ADMIN634_tree=null;
		ASTNode KW_OPTION635_tree=null;
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_OPTION=new RewriteRuleTokenStream(adaptor,"token KW_OPTION");
		RewriteRuleTokenStream stream_KW_ADMIN=new RewriteRuleTokenStream(adaptor,"token KW_ADMIN");

		pushMsg("with admin option", state);
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1783:5: ( KW_WITH KW_ADMIN KW_OPTION -> ^( TOK_GRANT_WITH_ADMIN_OPTION ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1783:7: KW_WITH KW_ADMIN KW_OPTION
			{
			KW_WITH633=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_withAdminOption10159); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH633);

			KW_ADMIN634=(Token)match(input,KW_ADMIN,FOLLOW_KW_ADMIN_in_withAdminOption10161); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ADMIN.add(KW_ADMIN634);

			KW_OPTION635=(Token)match(input,KW_OPTION,FOLLOW_KW_OPTION_in_withAdminOption10163); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_OPTION.add(KW_OPTION635);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1784:5: -> ^( TOK_GRANT_WITH_ADMIN_OPTION )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1784:8: ^( TOK_GRANT_WITH_ADMIN_OPTION )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_GRANT_WITH_ADMIN_OPTION, "TOK_GRANT_WITH_ADMIN_OPTION"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) {popMsg(state);}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "withAdminOption"


	public static class metastoreCheck_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "metastoreCheck"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1787:1: metastoreCheck : KW_MSCK (repair= KW_REPAIR )? ( KW_TABLE tableName ( partitionSpec )? ( COMMA partitionSpec )* )? -> ^( TOK_MSCK ( $repair)? ( tableName ( partitionSpec )* )? ) ;
	public final HiveParser.metastoreCheck_return metastoreCheck() throws RecognitionException {
		HiveParser.metastoreCheck_return retval = new HiveParser.metastoreCheck_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token repair=null;
		Token KW_MSCK636=null;
		Token KW_TABLE637=null;
		Token COMMA640=null;
		ParserRuleReturnScope tableName638 =null;
		ParserRuleReturnScope partitionSpec639 =null;
		ParserRuleReturnScope partitionSpec641 =null;

		ASTNode repair_tree=null;
		ASTNode KW_MSCK636_tree=null;
		ASTNode KW_TABLE637_tree=null;
		ASTNode COMMA640_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_REPAIR=new RewriteRuleTokenStream(adaptor,"token KW_REPAIR");
		RewriteRuleTokenStream stream_KW_MSCK=new RewriteRuleTokenStream(adaptor,"token KW_MSCK");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_partitionSpec=new RewriteRuleSubtreeStream(adaptor,"rule partitionSpec");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("metastore check statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:5: ( KW_MSCK (repair= KW_REPAIR )? ( KW_TABLE tableName ( partitionSpec )? ( COMMA partitionSpec )* )? -> ^( TOK_MSCK ( $repair)? ( tableName ( partitionSpec )* )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:7: KW_MSCK (repair= KW_REPAIR )? ( KW_TABLE tableName ( partitionSpec )? ( COMMA partitionSpec )* )?
			{
			KW_MSCK636=(Token)match(input,KW_MSCK,FOLLOW_KW_MSCK_in_metastoreCheck10200); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MSCK.add(KW_MSCK636);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:15: (repair= KW_REPAIR )?
			int alt189=2;
			int LA189_0 = input.LA(1);
			if ( (LA189_0==KW_REPAIR) ) {
				alt189=1;
			}
			switch (alt189) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:16: repair= KW_REPAIR
					{
					repair=(Token)match(input,KW_REPAIR,FOLLOW_KW_REPAIR_in_metastoreCheck10205); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_REPAIR.add(repair);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:35: ( KW_TABLE tableName ( partitionSpec )? ( COMMA partitionSpec )* )?
			int alt192=2;
			int LA192_0 = input.LA(1);
			if ( (LA192_0==KW_TABLE) ) {
				alt192=1;
			}
			switch (alt192) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:36: KW_TABLE tableName ( partitionSpec )? ( COMMA partitionSpec )*
					{
					KW_TABLE637=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_metastoreCheck10210); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE637);

					pushFollow(FOLLOW_tableName_in_metastoreCheck10212);
					tableName638=tableName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableName.add(tableName638.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:55: ( partitionSpec )?
					int alt190=2;
					int LA190_0 = input.LA(1);
					if ( (LA190_0==KW_PARTITION) ) {
						alt190=1;
					}
					switch (alt190) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:55: partitionSpec
							{
							pushFollow(FOLLOW_partitionSpec_in_metastoreCheck10214);
							partitionSpec639=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec639.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:70: ( COMMA partitionSpec )*
					loop191:
					while (true) {
						int alt191=2;
						int LA191_0 = input.LA(1);
						if ( (LA191_0==COMMA) ) {
							alt191=1;
						}

						switch (alt191) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:1790:71: COMMA partitionSpec
							{
							COMMA640=(Token)match(input,COMMA,FOLLOW_COMMA_in_metastoreCheck10218); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_COMMA.add(COMMA640);

							pushFollow(FOLLOW_partitionSpec_in_metastoreCheck10220);
							partitionSpec641=partitionSpec();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_partitionSpec.add(partitionSpec641.getTree());
							}
							break;

						default :
							break loop191;
						}
					}

					}
					break;

			}

			// AST REWRITE
			// elements: repair, tableName, partitionSpec
			// token labels: repair
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_repair=new RewriteRuleTokenStream(adaptor,"token repair",repair);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1791:5: -> ^( TOK_MSCK ( $repair)? ( tableName ( partitionSpec )* )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1791:8: ^( TOK_MSCK ( $repair)? ( tableName ( partitionSpec )* )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_MSCK, "TOK_MSCK"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1791:20: ( $repair)?
				if ( stream_repair.hasNext() ) {
					adaptor.addChild(root_1, stream_repair.nextNode());
				}
				stream_repair.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1791:28: ( tableName ( partitionSpec )* )?
				if ( stream_tableName.hasNext()||stream_partitionSpec.hasNext() ) {
					adaptor.addChild(root_1, stream_tableName.nextTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1791:39: ( partitionSpec )*
					while ( stream_partitionSpec.hasNext() ) {
						adaptor.addChild(root_1, stream_partitionSpec.nextTree());
					}
					stream_partitionSpec.reset();

				}
				stream_tableName.reset();
				stream_partitionSpec.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "metastoreCheck"


	public static class resourceList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "resourceList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1794:1: resourceList : resource ( COMMA resource )* -> ^( TOK_RESOURCE_LIST ( resource )+ ) ;
	public final HiveParser.resourceList_return resourceList() throws RecognitionException {
		HiveParser.resourceList_return retval = new HiveParser.resourceList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA643=null;
		ParserRuleReturnScope resource642 =null;
		ParserRuleReturnScope resource644 =null;

		ASTNode COMMA643_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");

		 pushMsg("resource list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1797:3: ( resource ( COMMA resource )* -> ^( TOK_RESOURCE_LIST ( resource )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1798:3: resource ( COMMA resource )*
			{
			pushFollow(FOLLOW_resource_in_resourceList10273);
			resource642=resource();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_resource.add(resource642.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1798:12: ( COMMA resource )*
			loop193:
			while (true) {
				int alt193=2;
				int LA193_0 = input.LA(1);
				if ( (LA193_0==COMMA) ) {
					alt193=1;
				}

				switch (alt193) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1798:13: COMMA resource
					{
					COMMA643=(Token)match(input,COMMA,FOLLOW_COMMA_in_resourceList10276); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA643);

					pushFollow(FOLLOW_resource_in_resourceList10278);
					resource644=resource();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_resource.add(resource644.getTree());
					}
					break;

				default :
					break loop193;
				}
			}

			// AST REWRITE
			// elements: resource
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1798:30: -> ^( TOK_RESOURCE_LIST ( resource )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1798:33: ^( TOK_RESOURCE_LIST ( resource )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RESOURCE_LIST, "TOK_RESOURCE_LIST"), root_1);
				if ( !(stream_resource.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_resource.hasNext() ) {
					adaptor.addChild(root_1, stream_resource.nextTree());
				}
				stream_resource.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "resourceList"


	public static class resource_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "resource"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1801:1: resource : resType= resourceType resPath= StringLiteral -> ^( TOK_RESOURCE_URI $resType $resPath) ;
	public final HiveParser.resource_return resource() throws RecognitionException {
		HiveParser.resource_return retval = new HiveParser.resource_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token resPath=null;
		ParserRuleReturnScope resType =null;

		ASTNode resPath_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleSubtreeStream stream_resourceType=new RewriteRuleSubtreeStream(adaptor,"rule resourceType");

		 pushMsg("resource", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1804:3: (resType= resourceType resPath= StringLiteral -> ^( TOK_RESOURCE_URI $resType $resPath) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1805:3: resType= resourceType resPath= StringLiteral
			{
			pushFollow(FOLLOW_resourceType_in_resource10316);
			resType=resourceType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_resourceType.add(resType.getTree());
			resPath=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_resource10320); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(resPath);

			// AST REWRITE
			// elements: resPath, resType
			// token labels: resPath
			// rule labels: resType, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_resPath=new RewriteRuleTokenStream(adaptor,"token resPath",resPath);
			RewriteRuleSubtreeStream stream_resType=new RewriteRuleSubtreeStream(adaptor,"rule resType",resType!=null?resType.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1805:46: -> ^( TOK_RESOURCE_URI $resType $resPath)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1805:49: ^( TOK_RESOURCE_URI $resType $resPath)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RESOURCE_URI, "TOK_RESOURCE_URI"), root_1);
				adaptor.addChild(root_1, stream_resType.nextTree());
				adaptor.addChild(root_1, stream_resPath.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "resource"


	public static class resourceType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "resourceType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1808:1: resourceType : ( KW_JAR -> ^( TOK_JAR ) | KW_FILE -> ^( TOK_FILE ) | KW_ARCHIVE -> ^( TOK_ARCHIVE ) );
	public final HiveParser.resourceType_return resourceType() throws RecognitionException {
		HiveParser.resourceType_return retval = new HiveParser.resourceType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_JAR645=null;
		Token KW_FILE646=null;
		Token KW_ARCHIVE647=null;

		ASTNode KW_JAR645_tree=null;
		ASTNode KW_FILE646_tree=null;
		ASTNode KW_ARCHIVE647_tree=null;
		RewriteRuleTokenStream stream_KW_ARCHIVE=new RewriteRuleTokenStream(adaptor,"token KW_ARCHIVE");
		RewriteRuleTokenStream stream_KW_JAR=new RewriteRuleTokenStream(adaptor,"token KW_JAR");
		RewriteRuleTokenStream stream_KW_FILE=new RewriteRuleTokenStream(adaptor,"token KW_FILE");

		 pushMsg("resource type", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1811:3: ( KW_JAR -> ^( TOK_JAR ) | KW_FILE -> ^( TOK_FILE ) | KW_ARCHIVE -> ^( TOK_ARCHIVE ) )
			int alt194=3;
			switch ( input.LA(1) ) {
			case KW_JAR:
				{
				alt194=1;
				}
				break;
			case KW_FILE:
				{
				alt194=2;
				}
				break;
			case KW_ARCHIVE:
				{
				alt194=3;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 194, 0, input);
				throw nvae;
			}
			switch (alt194) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1812:3: KW_JAR
					{
					KW_JAR645=(Token)match(input,KW_JAR,FOLLOW_KW_JAR_in_resourceType10357); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_JAR.add(KW_JAR645);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1812:10: -> ^( TOK_JAR )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1812:13: ^( TOK_JAR )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_JAR, "TOK_JAR"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1814:3: KW_FILE
					{
					KW_FILE646=(Token)match(input,KW_FILE,FOLLOW_KW_FILE_in_resourceType10371); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_FILE.add(KW_FILE646);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1814:11: -> ^( TOK_FILE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1814:14: ^( TOK_FILE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FILE, "TOK_FILE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1816:3: KW_ARCHIVE
					{
					KW_ARCHIVE647=(Token)match(input,KW_ARCHIVE,FOLLOW_KW_ARCHIVE_in_resourceType10385); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ARCHIVE.add(KW_ARCHIVE647);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1816:14: -> ^( TOK_ARCHIVE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1816:17: ^( TOK_ARCHIVE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ARCHIVE, "TOK_ARCHIVE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "resourceType"


	public static class createFunctionStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createFunctionStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1819:1: createFunctionStatement : KW_CREATE (temp= KW_TEMPORARY )? KW_FUNCTION functionIdentifier KW_AS StringLiteral ( KW_USING rList= resourceList )? -> {$temp != null}? ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? TOK_TEMPORARY ) -> ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? ) ;
	public final HiveParser.createFunctionStatement_return createFunctionStatement() throws RecognitionException {
		HiveParser.createFunctionStatement_return retval = new HiveParser.createFunctionStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token temp=null;
		Token KW_CREATE648=null;
		Token KW_FUNCTION649=null;
		Token KW_AS651=null;
		Token StringLiteral652=null;
		Token KW_USING653=null;
		ParserRuleReturnScope rList =null;
		ParserRuleReturnScope functionIdentifier650 =null;

		ASTNode temp_tree=null;
		ASTNode KW_CREATE648_tree=null;
		ASTNode KW_FUNCTION649_tree=null;
		ASTNode KW_AS651_tree=null;
		ASTNode StringLiteral652_tree=null;
		ASTNode KW_USING653_tree=null;
		RewriteRuleTokenStream stream_KW_TEMPORARY=new RewriteRuleTokenStream(adaptor,"token KW_TEMPORARY");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_USING=new RewriteRuleTokenStream(adaptor,"token KW_USING");
		RewriteRuleTokenStream stream_KW_FUNCTION=new RewriteRuleTokenStream(adaptor,"token KW_FUNCTION");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_functionIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule functionIdentifier");
		RewriteRuleSubtreeStream stream_resourceList=new RewriteRuleSubtreeStream(adaptor,"rule resourceList");

		 pushMsg("create function statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1822:5: ( KW_CREATE (temp= KW_TEMPORARY )? KW_FUNCTION functionIdentifier KW_AS StringLiteral ( KW_USING rList= resourceList )? -> {$temp != null}? ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? TOK_TEMPORARY ) -> ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1822:7: KW_CREATE (temp= KW_TEMPORARY )? KW_FUNCTION functionIdentifier KW_AS StringLiteral ( KW_USING rList= resourceList )?
			{
			KW_CREATE648=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createFunctionStatement10416); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE648);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1822:17: (temp= KW_TEMPORARY )?
			int alt195=2;
			int LA195_0 = input.LA(1);
			if ( (LA195_0==KW_TEMPORARY) ) {
				alt195=1;
			}
			switch (alt195) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1822:18: temp= KW_TEMPORARY
					{
					temp=(Token)match(input,KW_TEMPORARY,FOLLOW_KW_TEMPORARY_in_createFunctionStatement10421); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TEMPORARY.add(temp);

					}
					break;

			}

			KW_FUNCTION649=(Token)match(input,KW_FUNCTION,FOLLOW_KW_FUNCTION_in_createFunctionStatement10425); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FUNCTION.add(KW_FUNCTION649);

			pushFollow(FOLLOW_functionIdentifier_in_createFunctionStatement10427);
			functionIdentifier650=functionIdentifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_functionIdentifier.add(functionIdentifier650.getTree());
			KW_AS651=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_createFunctionStatement10429); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS651);

			StringLiteral652=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_createFunctionStatement10431); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(StringLiteral652);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1823:7: ( KW_USING rList= resourceList )?
			int alt196=2;
			int LA196_0 = input.LA(1);
			if ( (LA196_0==KW_USING) ) {
				alt196=1;
			}
			switch (alt196) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1823:8: KW_USING rList= resourceList
					{
					KW_USING653=(Token)match(input,KW_USING,FOLLOW_KW_USING_in_createFunctionStatement10440); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_USING.add(KW_USING653);

					pushFollow(FOLLOW_resourceList_in_createFunctionStatement10444);
					rList=resourceList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_resourceList.add(rList.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: StringLiteral, functionIdentifier, rList, rList, functionIdentifier, StringLiteral
			// token labels: 
			// rule labels: rList, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_rList=new RewriteRuleSubtreeStream(adaptor,"rule rList",rList!=null?rList.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1824:5: -> {$temp != null}? ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? TOK_TEMPORARY )
			if (temp != null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1824:25: ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? TOK_TEMPORARY )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEFUNCTION, "TOK_CREATEFUNCTION"), root_1);
				adaptor.addChild(root_1, stream_functionIdentifier.nextTree());
				adaptor.addChild(root_1, stream_StringLiteral.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1824:80: ( $rList)?
				if ( stream_rList.hasNext() ) {
					adaptor.addChild(root_1, stream_rList.nextTree());
				}
				stream_rList.reset();

				adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_TEMPORARY, "TOK_TEMPORARY"));
				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1825:5: -> ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1825:25: ^( TOK_CREATEFUNCTION functionIdentifier StringLiteral ( $rList)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEFUNCTION, "TOK_CREATEFUNCTION"), root_1);
				adaptor.addChild(root_1, stream_functionIdentifier.nextTree());
				adaptor.addChild(root_1, stream_StringLiteral.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1825:80: ( $rList)?
				if ( stream_rList.hasNext() ) {
					adaptor.addChild(root_1, stream_rList.nextTree());
				}
				stream_rList.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createFunctionStatement"


	public static class dropFunctionStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropFunctionStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1828:1: dropFunctionStatement : KW_DROP (temp= KW_TEMPORARY )? KW_FUNCTION ( ifExists )? functionIdentifier -> {$temp != null}? ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? TOK_TEMPORARY ) -> ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? ) ;
	public final HiveParser.dropFunctionStatement_return dropFunctionStatement() throws RecognitionException {
		HiveParser.dropFunctionStatement_return retval = new HiveParser.dropFunctionStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token temp=null;
		Token KW_DROP654=null;
		Token KW_FUNCTION655=null;
		ParserRuleReturnScope ifExists656 =null;
		ParserRuleReturnScope functionIdentifier657 =null;

		ASTNode temp_tree=null;
		ASTNode KW_DROP654_tree=null;
		ASTNode KW_FUNCTION655_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_TEMPORARY=new RewriteRuleTokenStream(adaptor,"token KW_TEMPORARY");
		RewriteRuleTokenStream stream_KW_FUNCTION=new RewriteRuleTokenStream(adaptor,"token KW_FUNCTION");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");
		RewriteRuleSubtreeStream stream_functionIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule functionIdentifier");

		 pushMsg("drop function statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1831:5: ( KW_DROP (temp= KW_TEMPORARY )? KW_FUNCTION ( ifExists )? functionIdentifier -> {$temp != null}? ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? TOK_TEMPORARY ) -> ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1831:7: KW_DROP (temp= KW_TEMPORARY )? KW_FUNCTION ( ifExists )? functionIdentifier
			{
			KW_DROP654=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropFunctionStatement10530); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP654);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1831:15: (temp= KW_TEMPORARY )?
			int alt197=2;
			int LA197_0 = input.LA(1);
			if ( (LA197_0==KW_TEMPORARY) ) {
				alt197=1;
			}
			switch (alt197) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1831:16: temp= KW_TEMPORARY
					{
					temp=(Token)match(input,KW_TEMPORARY,FOLLOW_KW_TEMPORARY_in_dropFunctionStatement10535); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TEMPORARY.add(temp);

					}
					break;

			}

			KW_FUNCTION655=(Token)match(input,KW_FUNCTION,FOLLOW_KW_FUNCTION_in_dropFunctionStatement10539); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FUNCTION.add(KW_FUNCTION655);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1831:48: ( ifExists )?
			int alt198=2;
			int LA198_0 = input.LA(1);
			if ( (LA198_0==KW_IF) ) {
				alt198=1;
			}
			switch (alt198) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1831:48: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropFunctionStatement10541);
					ifExists656=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists656.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_functionIdentifier_in_dropFunctionStatement10544);
			functionIdentifier657=functionIdentifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_functionIdentifier.add(functionIdentifier657.getTree());
			// AST REWRITE
			// elements: ifExists, functionIdentifier, functionIdentifier, ifExists
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1832:5: -> {$temp != null}? ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? TOK_TEMPORARY )
			if (temp != null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1832:25: ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? TOK_TEMPORARY )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPFUNCTION, "TOK_DROPFUNCTION"), root_1);
				adaptor.addChild(root_1, stream_functionIdentifier.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1832:63: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_TEMPORARY, "TOK_TEMPORARY"));
				adaptor.addChild(root_0, root_1);
				}

			}

			else // 1833:5: -> ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1833:25: ^( TOK_DROPFUNCTION functionIdentifier ( ifExists )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPFUNCTION, "TOK_DROPFUNCTION"), root_1);
				adaptor.addChild(root_1, stream_functionIdentifier.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1833:63: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropFunctionStatement"


	public static class reloadFunctionStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "reloadFunctionStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1836:1: reloadFunctionStatement : KW_RELOAD KW_FUNCTION -> ^( TOK_RELOADFUNCTION ) ;
	public final HiveParser.reloadFunctionStatement_return reloadFunctionStatement() throws RecognitionException {
		HiveParser.reloadFunctionStatement_return retval = new HiveParser.reloadFunctionStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RELOAD658=null;
		Token KW_FUNCTION659=null;

		ASTNode KW_RELOAD658_tree=null;
		ASTNode KW_FUNCTION659_tree=null;
		RewriteRuleTokenStream stream_KW_FUNCTION=new RewriteRuleTokenStream(adaptor,"token KW_FUNCTION");
		RewriteRuleTokenStream stream_KW_RELOAD=new RewriteRuleTokenStream(adaptor,"token KW_RELOAD");

		 pushMsg("reload function statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1839:5: ( KW_RELOAD KW_FUNCTION -> ^( TOK_RELOADFUNCTION ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1839:7: KW_RELOAD KW_FUNCTION
			{
			KW_RELOAD658=(Token)match(input,KW_RELOAD,FOLLOW_KW_RELOAD_in_reloadFunctionStatement10622); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_RELOAD.add(KW_RELOAD658);

			KW_FUNCTION659=(Token)match(input,KW_FUNCTION,FOLLOW_KW_FUNCTION_in_reloadFunctionStatement10624); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FUNCTION.add(KW_FUNCTION659);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1839:29: -> ^( TOK_RELOADFUNCTION )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1839:32: ^( TOK_RELOADFUNCTION )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RELOADFUNCTION, "TOK_RELOADFUNCTION"), root_1);
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "reloadFunctionStatement"


	public static class createMacroStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createMacroStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1841:1: createMacroStatement : KW_CREATE KW_TEMPORARY KW_MACRO Identifier LPAREN ( columnNameTypeList )? RPAREN expression -> ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression ) ;
	public final HiveParser.createMacroStatement_return createMacroStatement() throws RecognitionException {
		HiveParser.createMacroStatement_return retval = new HiveParser.createMacroStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CREATE660=null;
		Token KW_TEMPORARY661=null;
		Token KW_MACRO662=null;
		Token Identifier663=null;
		Token LPAREN664=null;
		Token RPAREN666=null;
		ParserRuleReturnScope columnNameTypeList665 =null;
		ParserRuleReturnScope expression667 =null;

		ASTNode KW_CREATE660_tree=null;
		ASTNode KW_TEMPORARY661_tree=null;
		ASTNode KW_MACRO662_tree=null;
		ASTNode Identifier663_tree=null;
		ASTNode LPAREN664_tree=null;
		ASTNode RPAREN666_tree=null;
		RewriteRuleTokenStream stream_KW_TEMPORARY=new RewriteRuleTokenStream(adaptor,"token KW_TEMPORARY");
		RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,"token Identifier");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_MACRO=new RewriteRuleTokenStream(adaptor,"token KW_MACRO");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
		RewriteRuleSubtreeStream stream_columnNameTypeList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameTypeList");

		 pushMsg("create macro statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1844:5: ( KW_CREATE KW_TEMPORARY KW_MACRO Identifier LPAREN ( columnNameTypeList )? RPAREN expression -> ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1844:7: KW_CREATE KW_TEMPORARY KW_MACRO Identifier LPAREN ( columnNameTypeList )? RPAREN expression
			{
			KW_CREATE660=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createMacroStatement10652); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE660);

			KW_TEMPORARY661=(Token)match(input,KW_TEMPORARY,FOLLOW_KW_TEMPORARY_in_createMacroStatement10654); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TEMPORARY.add(KW_TEMPORARY661);

			KW_MACRO662=(Token)match(input,KW_MACRO,FOLLOW_KW_MACRO_in_createMacroStatement10656); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MACRO.add(KW_MACRO662);

			Identifier663=(Token)match(input,Identifier,FOLLOW_Identifier_in_createMacroStatement10658); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_Identifier.add(Identifier663);

			LPAREN664=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_createMacroStatement10666); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN664);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1845:14: ( columnNameTypeList )?
			int alt199=2;
			int LA199_0 = input.LA(1);
			if ( (LA199_0==Identifier||(LA199_0 >= KW_ABORT && LA199_0 <= KW_AFTER)||LA199_0==KW_ANALYZE||LA199_0==KW_ARCHIVE||LA199_0==KW_ASC||(LA199_0 >= KW_AUTOCOMMIT && LA199_0 <= KW_BEFORE)||(LA199_0 >= KW_BUCKET && LA199_0 <= KW_BUCKETS)||(LA199_0 >= KW_CACHE && LA199_0 <= KW_CASCADE)||LA199_0==KW_CHANGE||(LA199_0 >= KW_CLUSTER && LA199_0 <= KW_COLLECTION)||(LA199_0 >= KW_COLUMNS && LA199_0 <= KW_COMMENT)||(LA199_0 >= KW_COMPACT && LA199_0 <= KW_CONCATENATE)||LA199_0==KW_CONTINUE||LA199_0==KW_DATA||LA199_0==KW_DATABASES||(LA199_0 >= KW_DATETIME && LA199_0 <= KW_DBPROPERTIES)||(LA199_0 >= KW_DEFERRED && LA199_0 <= KW_DEFINED)||(LA199_0 >= KW_DELIMITED && LA199_0 <= KW_DESC)||(LA199_0 >= KW_DETAIL && LA199_0 <= KW_DISABLE)||LA199_0==KW_DISTRIBUTE||LA199_0==KW_DOW||(LA199_0 >= KW_DUMP && LA199_0 <= KW_ELEM_TYPE)||LA199_0==KW_ENABLE||LA199_0==KW_ESCAPED||LA199_0==KW_EXCLUSIVE||(LA199_0 >= KW_EXPLAIN && LA199_0 <= KW_EXPRESSION)||(LA199_0 >= KW_FIELDS && LA199_0 <= KW_FIRST)||(LA199_0 >= KW_FORMAT && LA199_0 <= KW_FORMATTED)||LA199_0==KW_FUNCTIONS||(LA199_0 >= KW_HOUR && LA199_0 <= KW_IDXPROPERTIES)||(LA199_0 >= KW_INDEX && LA199_0 <= KW_INDEXES)||(LA199_0 >= KW_INPATH && LA199_0 <= KW_INPUTFORMAT)||(LA199_0 >= KW_ISOLATION && LA199_0 <= KW_JAR)||(LA199_0 >= KW_KEY && LA199_0 <= KW_LAST)||LA199_0==KW_LEVEL||(LA199_0 >= KW_LIMIT && LA199_0 <= KW_LOAD)||(LA199_0 >= KW_LOCATION && LA199_0 <= KW_LONG)||(LA199_0 >= KW_MAPJOIN && LA199_0 <= KW_MATERIALIZED)||LA199_0==KW_METADATA||(LA199_0 >= KW_MINUTE && LA199_0 <= KW_MONTH)||LA199_0==KW_MSCK||(LA199_0 >= KW_NORELY && LA199_0 <= KW_NOSCAN)||LA199_0==KW_NOVALIDATE||LA199_0==KW_NULLS||LA199_0==KW_OFFSET||(LA199_0 >= KW_OPERATOR && LA199_0 <= KW_OPTION)||(LA199_0 >= KW_OUTPUTDRIVER && LA199_0 <= KW_OUTPUTFORMAT)||(LA199_0 >= KW_OVERWRITE && LA199_0 <= KW_OWNER)||(LA199_0 >= KW_PARTITIONED && LA199_0 <= KW_PARTITIONS)||LA199_0==KW_PLUS||LA199_0==KW_PRETTY||LA199_0==KW_PRINCIPALS||(LA199_0 >= KW_PURGE && LA199_0 <= KW_QUARTER)||LA199_0==KW_READ||(LA199_0 >= KW_REBUILD && LA199_0 <= KW_RECORDWRITER)||(LA199_0 >= KW_RELOAD && LA199_0 <= KW_RESTRICT)||LA199_0==KW_REWRITE||(LA199_0 >= KW_ROLE && LA199_0 <= KW_ROLES)||(LA199_0 >= KW_SCHEMA && LA199_0 <= KW_SECOND)||(LA199_0 >= KW_SEMI && LA199_0 <= KW_SERVER)||(LA199_0 >= KW_SETS && LA199_0 <= KW_SKEWED)||(LA199_0 >= KW_SNAPSHOT && LA199_0 <= KW_SSL)||(LA199_0 >= KW_STATISTICS && LA199_0 <= KW_SUMMARY)||LA199_0==KW_TABLES||(LA199_0 >= KW_TBLPROPERTIES && LA199_0 <= KW_TERMINATED)||LA199_0==KW_TINYINT||(LA199_0 >= KW_TOUCH && LA199_0 <= KW_TRANSACTIONS)||LA199_0==KW_UNARCHIVE||LA199_0==KW_UNDO||LA199_0==KW_UNIONTYPE||(LA199_0 >= KW_UNLOCK && LA199_0 <= KW_UNSIGNED)||(LA199_0 >= KW_URI && LA199_0 <= KW_USE)||(LA199_0 >= KW_UTC && LA199_0 <= KW_VALIDATE)||LA199_0==KW_VALUE_TYPE||(LA199_0 >= KW_VECTORIZATION && LA199_0 <= KW_WEEK)||LA199_0==KW_WHILE||(LA199_0 >= KW_WORK && LA199_0 <= KW_YEAR)||LA199_0==KW_BATCH||LA199_0==KW_DAYOFWEEK||LA199_0==KW_HOLD_DDLTIME||LA199_0==KW_IGNORE||LA199_0==KW_NO_DROP||LA199_0==KW_OFFLINE||LA199_0==KW_PROTECTION||LA199_0==KW_READONLY) ) {
				alt199=1;
			}
			switch (alt199) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1845:14: columnNameTypeList
					{
					pushFollow(FOLLOW_columnNameTypeList_in_createMacroStatement10668);
					columnNameTypeList665=columnNameTypeList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameTypeList.add(columnNameTypeList665.getTree());
					}
					break;

			}

			RPAREN666=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_createMacroStatement10671); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN666);

			pushFollow(FOLLOW_expression_in_createMacroStatement10673);
			expression667=expression();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_expression.add(expression667.getTree());
			// AST REWRITE
			// elements: Identifier, columnNameTypeList, expression
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1846:5: -> ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1846:8: ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEMACRO, "TOK_CREATEMACRO"), root_1);
				adaptor.addChild(root_1, stream_Identifier.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1846:37: ( columnNameTypeList )?
				if ( stream_columnNameTypeList.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameTypeList.nextTree());
				}
				stream_columnNameTypeList.reset();

				adaptor.addChild(root_1, stream_expression.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createMacroStatement"


	public static class dropMacroStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropMacroStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1849:1: dropMacroStatement : KW_DROP KW_TEMPORARY KW_MACRO ( ifExists )? Identifier -> ^( TOK_DROPMACRO Identifier ( ifExists )? ) ;
	public final HiveParser.dropMacroStatement_return dropMacroStatement() throws RecognitionException {
		HiveParser.dropMacroStatement_return retval = new HiveParser.dropMacroStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP668=null;
		Token KW_TEMPORARY669=null;
		Token KW_MACRO670=null;
		Token Identifier672=null;
		ParserRuleReturnScope ifExists671 =null;

		ASTNode KW_DROP668_tree=null;
		ASTNode KW_TEMPORARY669_tree=null;
		ASTNode KW_MACRO670_tree=null;
		ASTNode Identifier672_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_TEMPORARY=new RewriteRuleTokenStream(adaptor,"token KW_TEMPORARY");
		RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,"token Identifier");
		RewriteRuleTokenStream stream_KW_MACRO=new RewriteRuleTokenStream(adaptor,"token KW_MACRO");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");

		 pushMsg("drop macro statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1852:5: ( KW_DROP KW_TEMPORARY KW_MACRO ( ifExists )? Identifier -> ^( TOK_DROPMACRO Identifier ( ifExists )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1852:7: KW_DROP KW_TEMPORARY KW_MACRO ( ifExists )? Identifier
			{
			KW_DROP668=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropMacroStatement10717); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP668);

			KW_TEMPORARY669=(Token)match(input,KW_TEMPORARY,FOLLOW_KW_TEMPORARY_in_dropMacroStatement10719); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TEMPORARY.add(KW_TEMPORARY669);

			KW_MACRO670=(Token)match(input,KW_MACRO,FOLLOW_KW_MACRO_in_dropMacroStatement10721); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MACRO.add(KW_MACRO670);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1852:37: ( ifExists )?
			int alt200=2;
			int LA200_0 = input.LA(1);
			if ( (LA200_0==KW_IF) ) {
				alt200=1;
			}
			switch (alt200) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1852:37: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropMacroStatement10723);
					ifExists671=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists671.getTree());
					}
					break;

			}

			Identifier672=(Token)match(input,Identifier,FOLLOW_Identifier_in_dropMacroStatement10726); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_Identifier.add(Identifier672);

			// AST REWRITE
			// elements: ifExists, Identifier
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1853:5: -> ^( TOK_DROPMACRO Identifier ( ifExists )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1853:8: ^( TOK_DROPMACRO Identifier ( ifExists )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPMACRO, "TOK_DROPMACRO"), root_1);
				adaptor.addChild(root_1, stream_Identifier.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1853:35: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropMacroStatement"


	public static class createViewStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createViewStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1856:1: createViewStatement : KW_CREATE ( orReplace )? KW_VIEW ( ifNotExists )? name= tableName ( LPAREN columnNameCommentList RPAREN )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? KW_AS selectStatementWithCTE -> ^( TOK_CREATEVIEW $name ( orReplace )? ( ifNotExists )? ( columnNameCommentList )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? selectStatementWithCTE ) ;
	public final HiveParser.createViewStatement_return createViewStatement() throws RecognitionException {
		HiveParser.createViewStatement_return retval = new HiveParser.createViewStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CREATE673=null;
		Token KW_VIEW675=null;
		Token LPAREN677=null;
		Token RPAREN679=null;
		Token KW_AS683=null;
		ParserRuleReturnScope name =null;
		ParserRuleReturnScope orReplace674 =null;
		ParserRuleReturnScope ifNotExists676 =null;
		ParserRuleReturnScope columnNameCommentList678 =null;
		ParserRuleReturnScope tableComment680 =null;
		ParserRuleReturnScope viewPartition681 =null;
		ParserRuleReturnScope tablePropertiesPrefixed682 =null;
		ParserRuleReturnScope selectStatementWithCTE684 =null;

		ASTNode KW_CREATE673_tree=null;
		ASTNode KW_VIEW675_tree=null;
		ASTNode LPAREN677_tree=null;
		ASTNode RPAREN679_tree=null;
		ASTNode KW_AS683_tree=null;
		RewriteRuleTokenStream stream_KW_VIEW=new RewriteRuleTokenStream(adaptor,"token KW_VIEW");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_columnNameCommentList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameCommentList");
		RewriteRuleSubtreeStream stream_selectStatementWithCTE=new RewriteRuleSubtreeStream(adaptor,"rule selectStatementWithCTE");
		RewriteRuleSubtreeStream stream_orReplace=new RewriteRuleSubtreeStream(adaptor,"rule orReplace");
		RewriteRuleSubtreeStream stream_tablePropertiesPrefixed=new RewriteRuleSubtreeStream(adaptor,"rule tablePropertiesPrefixed");
		RewriteRuleSubtreeStream stream_ifNotExists=new RewriteRuleSubtreeStream(adaptor,"rule ifNotExists");
		RewriteRuleSubtreeStream stream_tableComment=new RewriteRuleSubtreeStream(adaptor,"rule tableComment");
		RewriteRuleSubtreeStream stream_viewPartition=new RewriteRuleSubtreeStream(adaptor,"rule viewPartition");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");


		    pushMsg("create view statement", state);

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1861:5: ( KW_CREATE ( orReplace )? KW_VIEW ( ifNotExists )? name= tableName ( LPAREN columnNameCommentList RPAREN )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? KW_AS selectStatementWithCTE -> ^( TOK_CREATEVIEW $name ( orReplace )? ( ifNotExists )? ( columnNameCommentList )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? selectStatementWithCTE ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1861:7: KW_CREATE ( orReplace )? KW_VIEW ( ifNotExists )? name= tableName ( LPAREN columnNameCommentList RPAREN )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? KW_AS selectStatementWithCTE
			{
			KW_CREATE673=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createViewStatement10768); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE673);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1861:17: ( orReplace )?
			int alt201=2;
			int LA201_0 = input.LA(1);
			if ( (LA201_0==KW_OR) ) {
				alt201=1;
			}
			switch (alt201) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1861:18: orReplace
					{
					pushFollow(FOLLOW_orReplace_in_createViewStatement10771);
					orReplace674=orReplace();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_orReplace.add(orReplace674.getTree());
					}
					break;

			}

			KW_VIEW675=(Token)match(input,KW_VIEW,FOLLOW_KW_VIEW_in_createViewStatement10775); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_VIEW.add(KW_VIEW675);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1861:38: ( ifNotExists )?
			int alt202=2;
			int LA202_0 = input.LA(1);
			if ( (LA202_0==KW_IF) ) {
				alt202=1;
			}
			switch (alt202) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1861:39: ifNotExists
					{
					pushFollow(FOLLOW_ifNotExists_in_createViewStatement10778);
					ifNotExists676=ifNotExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifNotExists.add(ifNotExists676.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_tableName_in_createViewStatement10784);
			name=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(name.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1862:9: ( LPAREN columnNameCommentList RPAREN )?
			int alt203=2;
			int LA203_0 = input.LA(1);
			if ( (LA203_0==LPAREN) ) {
				alt203=1;
			}
			switch (alt203) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1862:10: LPAREN columnNameCommentList RPAREN
					{
					LPAREN677=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_createViewStatement10795); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN677);

					pushFollow(FOLLOW_columnNameCommentList_in_createViewStatement10797);
					columnNameCommentList678=columnNameCommentList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameCommentList.add(columnNameCommentList678.getTree());
					RPAREN679=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_createViewStatement10799); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN679);

					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1862:48: ( tableComment )?
			int alt204=2;
			int LA204_0 = input.LA(1);
			if ( (LA204_0==KW_COMMENT) ) {
				alt204=1;
			}
			switch (alt204) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1862:48: tableComment
					{
					pushFollow(FOLLOW_tableComment_in_createViewStatement10803);
					tableComment680=tableComment();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableComment.add(tableComment680.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1862:62: ( viewPartition )?
			int alt205=2;
			int LA205_0 = input.LA(1);
			if ( (LA205_0==KW_PARTITIONED) ) {
				alt205=1;
			}
			switch (alt205) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1862:62: viewPartition
					{
					pushFollow(FOLLOW_viewPartition_in_createViewStatement10806);
					viewPartition681=viewPartition();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_viewPartition.add(viewPartition681.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1863:9: ( tablePropertiesPrefixed )?
			int alt206=2;
			int LA206_0 = input.LA(1);
			if ( (LA206_0==KW_TBLPROPERTIES) ) {
				alt206=1;
			}
			switch (alt206) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1863:9: tablePropertiesPrefixed
					{
					pushFollow(FOLLOW_tablePropertiesPrefixed_in_createViewStatement10817);
					tablePropertiesPrefixed682=tablePropertiesPrefixed();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tablePropertiesPrefixed.add(tablePropertiesPrefixed682.getTree());
					}
					break;

			}

			KW_AS683=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_createViewStatement10828); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS683);

			pushFollow(FOLLOW_selectStatementWithCTE_in_createViewStatement10838);
			selectStatementWithCTE684=selectStatementWithCTE();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_selectStatementWithCTE.add(selectStatementWithCTE684.getTree());
			// AST REWRITE
			// elements: name, tablePropertiesPrefixed, tableComment, viewPartition, columnNameCommentList, selectStatementWithCTE, ifNotExists, orReplace
			// token labels: 
			// rule labels: name, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name",name!=null?name.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1866:5: -> ^( TOK_CREATEVIEW $name ( orReplace )? ( ifNotExists )? ( columnNameCommentList )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? selectStatementWithCTE )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1866:8: ^( TOK_CREATEVIEW $name ( orReplace )? ( ifNotExists )? ( columnNameCommentList )? ( tableComment )? ( viewPartition )? ( tablePropertiesPrefixed )? selectStatementWithCTE )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATEVIEW, "TOK_CREATEVIEW"), root_1);
				adaptor.addChild(root_1, stream_name.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1866:31: ( orReplace )?
				if ( stream_orReplace.hasNext() ) {
					adaptor.addChild(root_1, stream_orReplace.nextTree());
				}
				stream_orReplace.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1867:10: ( ifNotExists )?
				if ( stream_ifNotExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifNotExists.nextTree());
				}
				stream_ifNotExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1868:10: ( columnNameCommentList )?
				if ( stream_columnNameCommentList.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameCommentList.nextTree());
				}
				stream_columnNameCommentList.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1869:10: ( tableComment )?
				if ( stream_tableComment.hasNext() ) {
					adaptor.addChild(root_1, stream_tableComment.nextTree());
				}
				stream_tableComment.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1870:10: ( viewPartition )?
				if ( stream_viewPartition.hasNext() ) {
					adaptor.addChild(root_1, stream_viewPartition.nextTree());
				}
				stream_viewPartition.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1871:10: ( tablePropertiesPrefixed )?
				if ( stream_tablePropertiesPrefixed.hasNext() ) {
					adaptor.addChild(root_1, stream_tablePropertiesPrefixed.nextTree());
				}
				stream_tablePropertiesPrefixed.reset();

				adaptor.addChild(root_1, stream_selectStatementWithCTE.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createViewStatement"


	public static class createMaterializedViewStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "createMaterializedViewStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1876:1: createMaterializedViewStatement : KW_CREATE KW_MATERIALIZED KW_VIEW ( ifNotExists )? name= tableName ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? KW_AS selectStatementWithCTE -> ^( TOK_CREATE_MATERIALIZED_VIEW $name ( ifNotExists )? ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? selectStatementWithCTE ) ;
	public final HiveParser.createMaterializedViewStatement_return createMaterializedViewStatement() throws RecognitionException {
		HiveParser.createMaterializedViewStatement_return retval = new HiveParser.createMaterializedViewStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CREATE685=null;
		Token KW_MATERIALIZED686=null;
		Token KW_VIEW687=null;
		Token KW_AS695=null;
		ParserRuleReturnScope name =null;
		ParserRuleReturnScope ifNotExists688 =null;
		ParserRuleReturnScope rewriteEnabled689 =null;
		ParserRuleReturnScope tableComment690 =null;
		ParserRuleReturnScope tableRowFormat691 =null;
		ParserRuleReturnScope tableFileFormat692 =null;
		ParserRuleReturnScope tableLocation693 =null;
		ParserRuleReturnScope tablePropertiesPrefixed694 =null;
		ParserRuleReturnScope selectStatementWithCTE696 =null;

		ASTNode KW_CREATE685_tree=null;
		ASTNode KW_MATERIALIZED686_tree=null;
		ASTNode KW_VIEW687_tree=null;
		ASTNode KW_AS695_tree=null;
		RewriteRuleTokenStream stream_KW_VIEW=new RewriteRuleTokenStream(adaptor,"token KW_VIEW");
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_KW_MATERIALIZED=new RewriteRuleTokenStream(adaptor,"token KW_MATERIALIZED");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_tableRowFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormat");
		RewriteRuleSubtreeStream stream_selectStatementWithCTE=new RewriteRuleSubtreeStream(adaptor,"rule selectStatementWithCTE");
		RewriteRuleSubtreeStream stream_tableLocation=new RewriteRuleSubtreeStream(adaptor,"rule tableLocation");
		RewriteRuleSubtreeStream stream_rewriteEnabled=new RewriteRuleSubtreeStream(adaptor,"rule rewriteEnabled");
		RewriteRuleSubtreeStream stream_tablePropertiesPrefixed=new RewriteRuleSubtreeStream(adaptor,"rule tablePropertiesPrefixed");
		RewriteRuleSubtreeStream stream_ifNotExists=new RewriteRuleSubtreeStream(adaptor,"rule ifNotExists");
		RewriteRuleSubtreeStream stream_tableFileFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableFileFormat");
		RewriteRuleSubtreeStream stream_tableComment=new RewriteRuleSubtreeStream(adaptor,"rule tableComment");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");


		    pushMsg("create materialized view statement", state);

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1881:5: ( KW_CREATE KW_MATERIALIZED KW_VIEW ( ifNotExists )? name= tableName ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? KW_AS selectStatementWithCTE -> ^( TOK_CREATE_MATERIALIZED_VIEW $name ( ifNotExists )? ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? selectStatementWithCTE ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1881:7: KW_CREATE KW_MATERIALIZED KW_VIEW ( ifNotExists )? name= tableName ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? KW_AS selectStatementWithCTE
			{
			KW_CREATE685=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createMaterializedViewStatement10961); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CREATE.add(KW_CREATE685);

			KW_MATERIALIZED686=(Token)match(input,KW_MATERIALIZED,FOLLOW_KW_MATERIALIZED_in_createMaterializedViewStatement10963); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MATERIALIZED.add(KW_MATERIALIZED686);

			KW_VIEW687=(Token)match(input,KW_VIEW,FOLLOW_KW_VIEW_in_createMaterializedViewStatement10965); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_VIEW.add(KW_VIEW687);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1881:41: ( ifNotExists )?
			int alt207=2;
			int LA207_0 = input.LA(1);
			if ( (LA207_0==KW_IF) ) {
				alt207=1;
			}
			switch (alt207) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1881:42: ifNotExists
					{
					pushFollow(FOLLOW_ifNotExists_in_createMaterializedViewStatement10968);
					ifNotExists688=ifNotExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifNotExists.add(ifNotExists688.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_tableName_in_createMaterializedViewStatement10974);
			name=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(name.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:9: ( rewriteEnabled )?
			int alt208=2;
			int LA208_0 = input.LA(1);
			if ( (LA208_0==KW_ENABLE) ) {
				alt208=1;
			}
			switch (alt208) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:9: rewriteEnabled
					{
					pushFollow(FOLLOW_rewriteEnabled_in_createMaterializedViewStatement10984);
					rewriteEnabled689=rewriteEnabled();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_rewriteEnabled.add(rewriteEnabled689.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:25: ( tableComment )?
			int alt209=2;
			int LA209_0 = input.LA(1);
			if ( (LA209_0==KW_COMMENT) ) {
				alt209=1;
			}
			switch (alt209) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:25: tableComment
					{
					pushFollow(FOLLOW_tableComment_in_createMaterializedViewStatement10987);
					tableComment690=tableComment();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableComment.add(tableComment690.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:39: ( tableRowFormat )?
			int alt210=2;
			int LA210_0 = input.LA(1);
			if ( (LA210_0==KW_ROW) ) {
				alt210=1;
			}
			switch (alt210) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:39: tableRowFormat
					{
					pushFollow(FOLLOW_tableRowFormat_in_createMaterializedViewStatement10990);
					tableRowFormat691=tableRowFormat();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowFormat.add(tableRowFormat691.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:55: ( tableFileFormat )?
			int alt211=2;
			int LA211_0 = input.LA(1);
			if ( (LA211_0==KW_STORED) ) {
				alt211=1;
			}
			switch (alt211) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:55: tableFileFormat
					{
					pushFollow(FOLLOW_tableFileFormat_in_createMaterializedViewStatement10993);
					tableFileFormat692=tableFileFormat();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableFileFormat.add(tableFileFormat692.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:72: ( tableLocation )?
			int alt212=2;
			int LA212_0 = input.LA(1);
			if ( (LA212_0==KW_LOCATION) ) {
				alt212=1;
			}
			switch (alt212) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1882:72: tableLocation
					{
					pushFollow(FOLLOW_tableLocation_in_createMaterializedViewStatement10996);
					tableLocation693=tableLocation();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableLocation.add(tableLocation693.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1883:9: ( tablePropertiesPrefixed )?
			int alt213=2;
			int LA213_0 = input.LA(1);
			if ( (LA213_0==KW_TBLPROPERTIES) ) {
				alt213=1;
			}
			switch (alt213) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1883:9: tablePropertiesPrefixed
					{
					pushFollow(FOLLOW_tablePropertiesPrefixed_in_createMaterializedViewStatement11007);
					tablePropertiesPrefixed694=tablePropertiesPrefixed();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tablePropertiesPrefixed.add(tablePropertiesPrefixed694.getTree());
					}
					break;

			}

			KW_AS695=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_createMaterializedViewStatement11010); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS695);

			pushFollow(FOLLOW_selectStatementWithCTE_in_createMaterializedViewStatement11012);
			selectStatementWithCTE696=selectStatementWithCTE();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_selectStatementWithCTE.add(selectStatementWithCTE696.getTree());
			// AST REWRITE
			// elements: name, selectStatementWithCTE, tablePropertiesPrefixed, rewriteEnabled, tableFileFormat, tableComment, tableRowFormat, tableLocation, ifNotExists
			// token labels: 
			// rule labels: name, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name",name!=null?name.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1884:5: -> ^( TOK_CREATE_MATERIALIZED_VIEW $name ( ifNotExists )? ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? selectStatementWithCTE )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1884:8: ^( TOK_CREATE_MATERIALIZED_VIEW $name ( ifNotExists )? ( rewriteEnabled )? ( tableComment )? ( tableRowFormat )? ( tableFileFormat )? ( tableLocation )? ( tablePropertiesPrefixed )? selectStatementWithCTE )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CREATE_MATERIALIZED_VIEW, "TOK_CREATE_MATERIALIZED_VIEW"), root_1);
				adaptor.addChild(root_1, stream_name.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1885:10: ( ifNotExists )?
				if ( stream_ifNotExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifNotExists.nextTree());
				}
				stream_ifNotExists.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1886:10: ( rewriteEnabled )?
				if ( stream_rewriteEnabled.hasNext() ) {
					adaptor.addChild(root_1, stream_rewriteEnabled.nextTree());
				}
				stream_rewriteEnabled.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1887:10: ( tableComment )?
				if ( stream_tableComment.hasNext() ) {
					adaptor.addChild(root_1, stream_tableComment.nextTree());
				}
				stream_tableComment.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1888:10: ( tableRowFormat )?
				if ( stream_tableRowFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormat.nextTree());
				}
				stream_tableRowFormat.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1889:10: ( tableFileFormat )?
				if ( stream_tableFileFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableFileFormat.nextTree());
				}
				stream_tableFileFormat.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1890:10: ( tableLocation )?
				if ( stream_tableLocation.hasNext() ) {
					adaptor.addChild(root_1, stream_tableLocation.nextTree());
				}
				stream_tableLocation.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1891:10: ( tablePropertiesPrefixed )?
				if ( stream_tablePropertiesPrefixed.hasNext() ) {
					adaptor.addChild(root_1, stream_tablePropertiesPrefixed.nextTree());
				}
				stream_tablePropertiesPrefixed.reset();

				adaptor.addChild(root_1, stream_selectStatementWithCTE.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "createMaterializedViewStatement"


	public static class viewPartition_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "viewPartition"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1896:1: viewPartition : KW_PARTITIONED KW_ON LPAREN columnNameList RPAREN -> ^( TOK_VIEWPARTCOLS columnNameList ) ;
	public final HiveParser.viewPartition_return viewPartition() throws RecognitionException {
		HiveParser.viewPartition_return retval = new HiveParser.viewPartition_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_PARTITIONED697=null;
		Token KW_ON698=null;
		Token LPAREN699=null;
		Token RPAREN701=null;
		ParserRuleReturnScope columnNameList700 =null;

		ASTNode KW_PARTITIONED697_tree=null;
		ASTNode KW_ON698_tree=null;
		ASTNode LPAREN699_tree=null;
		ASTNode RPAREN701_tree=null;
		RewriteRuleTokenStream stream_KW_PARTITIONED=new RewriteRuleTokenStream(adaptor,"token KW_PARTITIONED");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");

		 pushMsg("view partition specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1899:5: ( KW_PARTITIONED KW_ON LPAREN columnNameList RPAREN -> ^( TOK_VIEWPARTCOLS columnNameList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1899:7: KW_PARTITIONED KW_ON LPAREN columnNameList RPAREN
			{
			KW_PARTITIONED697=(Token)match(input,KW_PARTITIONED,FOLLOW_KW_PARTITIONED_in_viewPartition11157); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_PARTITIONED.add(KW_PARTITIONED697);

			KW_ON698=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_viewPartition11159); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON698);

			LPAREN699=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_viewPartition11161); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN699);

			pushFollow(FOLLOW_columnNameList_in_viewPartition11163);
			columnNameList700=columnNameList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameList.add(columnNameList700.getTree());
			RPAREN701=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_viewPartition11165); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN701);

			// AST REWRITE
			// elements: columnNameList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1900:5: -> ^( TOK_VIEWPARTCOLS columnNameList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1900:8: ^( TOK_VIEWPARTCOLS columnNameList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_VIEWPARTCOLS, "TOK_VIEWPARTCOLS"), root_1);
				adaptor.addChild(root_1, stream_columnNameList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "viewPartition"


	public static class dropViewStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropViewStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1903:1: dropViewStatement : KW_DROP KW_VIEW ( ifExists )? viewName -> ^( TOK_DROPVIEW viewName ( ifExists )? ) ;
	public final HiveParser.dropViewStatement_return dropViewStatement() throws RecognitionException {
		HiveParser.dropViewStatement_return retval = new HiveParser.dropViewStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP702=null;
		Token KW_VIEW703=null;
		ParserRuleReturnScope ifExists704 =null;
		ParserRuleReturnScope viewName705 =null;

		ASTNode KW_DROP702_tree=null;
		ASTNode KW_VIEW703_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_VIEW=new RewriteRuleTokenStream(adaptor,"token KW_VIEW");
		RewriteRuleSubtreeStream stream_viewName=new RewriteRuleSubtreeStream(adaptor,"rule viewName");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");

		 pushMsg("drop view statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1906:5: ( KW_DROP KW_VIEW ( ifExists )? viewName -> ^( TOK_DROPVIEW viewName ( ifExists )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1906:7: KW_DROP KW_VIEW ( ifExists )? viewName
			{
			KW_DROP702=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropViewStatement11204); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP702);

			KW_VIEW703=(Token)match(input,KW_VIEW,FOLLOW_KW_VIEW_in_dropViewStatement11206); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_VIEW.add(KW_VIEW703);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1906:23: ( ifExists )?
			int alt214=2;
			int LA214_0 = input.LA(1);
			if ( (LA214_0==KW_IF) ) {
				alt214=1;
			}
			switch (alt214) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1906:23: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropViewStatement11208);
					ifExists704=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists704.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_viewName_in_dropViewStatement11211);
			viewName705=viewName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_viewName.add(viewName705.getTree());
			// AST REWRITE
			// elements: viewName, ifExists
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1906:42: -> ^( TOK_DROPVIEW viewName ( ifExists )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1906:45: ^( TOK_DROPVIEW viewName ( ifExists )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROPVIEW, "TOK_DROPVIEW"), root_1);
				adaptor.addChild(root_1, stream_viewName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1906:69: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropViewStatement"


	public static class dropMaterializedViewStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "dropMaterializedViewStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1909:1: dropMaterializedViewStatement : KW_DROP KW_MATERIALIZED KW_VIEW ( ifExists )? viewName -> ^( TOK_DROP_MATERIALIZED_VIEW viewName ( ifExists )? ) ;
	public final HiveParser.dropMaterializedViewStatement_return dropMaterializedViewStatement() throws RecognitionException {
		HiveParser.dropMaterializedViewStatement_return retval = new HiveParser.dropMaterializedViewStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DROP706=null;
		Token KW_MATERIALIZED707=null;
		Token KW_VIEW708=null;
		ParserRuleReturnScope ifExists709 =null;
		ParserRuleReturnScope viewName710 =null;

		ASTNode KW_DROP706_tree=null;
		ASTNode KW_MATERIALIZED707_tree=null;
		ASTNode KW_VIEW708_tree=null;
		RewriteRuleTokenStream stream_KW_DROP=new RewriteRuleTokenStream(adaptor,"token KW_DROP");
		RewriteRuleTokenStream stream_KW_VIEW=new RewriteRuleTokenStream(adaptor,"token KW_VIEW");
		RewriteRuleTokenStream stream_KW_MATERIALIZED=new RewriteRuleTokenStream(adaptor,"token KW_MATERIALIZED");
		RewriteRuleSubtreeStream stream_viewName=new RewriteRuleSubtreeStream(adaptor,"rule viewName");
		RewriteRuleSubtreeStream stream_ifExists=new RewriteRuleSubtreeStream(adaptor,"rule ifExists");

		 pushMsg("drop materialized view statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1912:5: ( KW_DROP KW_MATERIALIZED KW_VIEW ( ifExists )? viewName -> ^( TOK_DROP_MATERIALIZED_VIEW viewName ( ifExists )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1912:7: KW_DROP KW_MATERIALIZED KW_VIEW ( ifExists )? viewName
			{
			KW_DROP706=(Token)match(input,KW_DROP,FOLLOW_KW_DROP_in_dropMaterializedViewStatement11249); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DROP.add(KW_DROP706);

			KW_MATERIALIZED707=(Token)match(input,KW_MATERIALIZED,FOLLOW_KW_MATERIALIZED_in_dropMaterializedViewStatement11251); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MATERIALIZED.add(KW_MATERIALIZED707);

			KW_VIEW708=(Token)match(input,KW_VIEW,FOLLOW_KW_VIEW_in_dropMaterializedViewStatement11253); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_VIEW.add(KW_VIEW708);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1912:39: ( ifExists )?
			int alt215=2;
			int LA215_0 = input.LA(1);
			if ( (LA215_0==KW_IF) ) {
				alt215=1;
			}
			switch (alt215) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1912:39: ifExists
					{
					pushFollow(FOLLOW_ifExists_in_dropMaterializedViewStatement11255);
					ifExists709=ifExists();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_ifExists.add(ifExists709.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_viewName_in_dropMaterializedViewStatement11258);
			viewName710=viewName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_viewName.add(viewName710.getTree());
			// AST REWRITE
			// elements: ifExists, viewName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1912:58: -> ^( TOK_DROP_MATERIALIZED_VIEW viewName ( ifExists )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1912:61: ^( TOK_DROP_MATERIALIZED_VIEW viewName ( ifExists )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DROP_MATERIALIZED_VIEW, "TOK_DROP_MATERIALIZED_VIEW"), root_1);
				adaptor.addChild(root_1, stream_viewName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1912:99: ( ifExists )?
				if ( stream_ifExists.hasNext() ) {
					adaptor.addChild(root_1, stream_ifExists.nextTree());
				}
				stream_ifExists.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dropMaterializedViewStatement"


	public static class showFunctionIdentifier_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showFunctionIdentifier"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1915:1: showFunctionIdentifier : ( functionIdentifier | StringLiteral );
	public final HiveParser.showFunctionIdentifier_return showFunctionIdentifier() throws RecognitionException {
		HiveParser.showFunctionIdentifier_return retval = new HiveParser.showFunctionIdentifier_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token StringLiteral712=null;
		ParserRuleReturnScope functionIdentifier711 =null;

		ASTNode StringLiteral712_tree=null;

		 pushMsg("identifier for show function statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1918:5: ( functionIdentifier | StringLiteral )
			int alt216=2;
			int LA216_0 = input.LA(1);
			if ( (LA216_0==Identifier||(LA216_0 >= KW_ABORT && LA216_0 <= KW_AFTER)||LA216_0==KW_ANALYZE||LA216_0==KW_ARCHIVE||LA216_0==KW_ASC||(LA216_0 >= KW_AUTOCOMMIT && LA216_0 <= KW_BEFORE)||(LA216_0 >= KW_BUCKET && LA216_0 <= KW_BUCKETS)||(LA216_0 >= KW_CACHE && LA216_0 <= KW_CASCADE)||LA216_0==KW_CHANGE||(LA216_0 >= KW_CLUSTER && LA216_0 <= KW_COLLECTION)||(LA216_0 >= KW_COLUMNS && LA216_0 <= KW_COMMENT)||(LA216_0 >= KW_COMPACT && LA216_0 <= KW_CONCATENATE)||LA216_0==KW_CONTINUE||LA216_0==KW_DATA||LA216_0==KW_DATABASES||(LA216_0 >= KW_DATETIME && LA216_0 <= KW_DBPROPERTIES)||(LA216_0 >= KW_DEFERRED && LA216_0 <= KW_DEFINED)||(LA216_0 >= KW_DELIMITED && LA216_0 <= KW_DESC)||(LA216_0 >= KW_DETAIL && LA216_0 <= KW_DISABLE)||LA216_0==KW_DISTRIBUTE||LA216_0==KW_DOW||(LA216_0 >= KW_DUMP && LA216_0 <= KW_ELEM_TYPE)||LA216_0==KW_ENABLE||LA216_0==KW_ESCAPED||LA216_0==KW_EXCLUSIVE||(LA216_0 >= KW_EXPLAIN && LA216_0 <= KW_EXPRESSION)||(LA216_0 >= KW_FIELDS && LA216_0 <= KW_FIRST)||(LA216_0 >= KW_FORMAT && LA216_0 <= KW_FORMATTED)||LA216_0==KW_FUNCTIONS||(LA216_0 >= KW_HOUR && LA216_0 <= KW_IDXPROPERTIES)||(LA216_0 >= KW_INDEX && LA216_0 <= KW_INDEXES)||(LA216_0 >= KW_INPATH && LA216_0 <= KW_INPUTFORMAT)||(LA216_0 >= KW_ISOLATION && LA216_0 <= KW_JAR)||(LA216_0 >= KW_KEY && LA216_0 <= KW_LAST)||LA216_0==KW_LEVEL||(LA216_0 >= KW_LIMIT && LA216_0 <= KW_LOAD)||(LA216_0 >= KW_LOCATION && LA216_0 <= KW_LONG)||(LA216_0 >= KW_MAPJOIN && LA216_0 <= KW_MATERIALIZED)||LA216_0==KW_METADATA||(LA216_0 >= KW_MINUTE && LA216_0 <= KW_MONTH)||LA216_0==KW_MSCK||(LA216_0 >= KW_NORELY && LA216_0 <= KW_NOSCAN)||LA216_0==KW_NOVALIDATE||LA216_0==KW_NULLS||LA216_0==KW_OFFSET||(LA216_0 >= KW_OPERATOR && LA216_0 <= KW_OPTION)||(LA216_0 >= KW_OUTPUTDRIVER && LA216_0 <= KW_OUTPUTFORMAT)||(LA216_0 >= KW_OVERWRITE && LA216_0 <= KW_OWNER)||(LA216_0 >= KW_PARTITIONED && LA216_0 <= KW_PARTITIONS)||LA216_0==KW_PLUS||LA216_0==KW_PRETTY||LA216_0==KW_PRINCIPALS||(LA216_0 >= KW_PURGE && LA216_0 <= KW_QUARTER)||LA216_0==KW_READ||(LA216_0 >= KW_REBUILD && LA216_0 <= KW_RECORDWRITER)||(LA216_0 >= KW_RELOAD && LA216_0 <= KW_RESTRICT)||LA216_0==KW_REWRITE||(LA216_0 >= KW_ROLE && LA216_0 <= KW_ROLES)||(LA216_0 >= KW_SCHEMA && LA216_0 <= KW_SECOND)||(LA216_0 >= KW_SEMI && LA216_0 <= KW_SERVER)||(LA216_0 >= KW_SETS && LA216_0 <= KW_SKEWED)||(LA216_0 >= KW_SNAPSHOT && LA216_0 <= KW_SSL)||(LA216_0 >= KW_STATISTICS && LA216_0 <= KW_SUMMARY)||LA216_0==KW_TABLES||(LA216_0 >= KW_TBLPROPERTIES && LA216_0 <= KW_TERMINATED)||LA216_0==KW_TINYINT||(LA216_0 >= KW_TOUCH && LA216_0 <= KW_TRANSACTIONS)||LA216_0==KW_UNARCHIVE||LA216_0==KW_UNDO||LA216_0==KW_UNIONTYPE||(LA216_0 >= KW_UNLOCK && LA216_0 <= KW_UNSIGNED)||(LA216_0 >= KW_URI && LA216_0 <= KW_USE)||(LA216_0 >= KW_UTC && LA216_0 <= KW_VALIDATE)||LA216_0==KW_VALUE_TYPE||(LA216_0 >= KW_VECTORIZATION && LA216_0 <= KW_WEEK)||LA216_0==KW_WHILE||(LA216_0 >= KW_WORK && LA216_0 <= KW_YEAR)||LA216_0==KW_BATCH||LA216_0==KW_DAYOFWEEK||LA216_0==KW_HOLD_DDLTIME||LA216_0==KW_IGNORE||LA216_0==KW_NO_DROP||LA216_0==KW_OFFLINE||LA216_0==KW_PROTECTION||LA216_0==KW_READONLY) ) {
				alt216=1;
			}
			else if ( (LA216_0==StringLiteral) ) {
				alt216=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 216, 0, input);
				throw nvae;
			}

			switch (alt216) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1918:7: functionIdentifier
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_functionIdentifier_in_showFunctionIdentifier11296);
					functionIdentifier711=functionIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, functionIdentifier711.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1919:7: StringLiteral
					{
					root_0 = (ASTNode)adaptor.nil();


					StringLiteral712=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_showFunctionIdentifier11304); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					StringLiteral712_tree = (ASTNode)adaptor.create(StringLiteral712);
					adaptor.addChild(root_0, StringLiteral712_tree);
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showFunctionIdentifier"


	public static class showStmtIdentifier_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "showStmtIdentifier"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1922:1: showStmtIdentifier : ( identifier | StringLiteral );
	public final HiveParser.showStmtIdentifier_return showStmtIdentifier() throws RecognitionException {
		HiveParser.showStmtIdentifier_return retval = new HiveParser.showStmtIdentifier_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token StringLiteral714=null;
		ParserRuleReturnScope identifier713 =null;

		ASTNode StringLiteral714_tree=null;

		 pushMsg("identifier for show statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1925:5: ( identifier | StringLiteral )
			int alt217=2;
			int LA217_0 = input.LA(1);
			if ( (LA217_0==Identifier||(LA217_0 >= KW_ABORT && LA217_0 <= KW_AFTER)||LA217_0==KW_ANALYZE||LA217_0==KW_ARCHIVE||LA217_0==KW_ASC||(LA217_0 >= KW_AUTOCOMMIT && LA217_0 <= KW_BEFORE)||(LA217_0 >= KW_BUCKET && LA217_0 <= KW_BUCKETS)||(LA217_0 >= KW_CACHE && LA217_0 <= KW_CASCADE)||LA217_0==KW_CHANGE||(LA217_0 >= KW_CLUSTER && LA217_0 <= KW_COLLECTION)||(LA217_0 >= KW_COLUMNS && LA217_0 <= KW_COMMENT)||(LA217_0 >= KW_COMPACT && LA217_0 <= KW_CONCATENATE)||LA217_0==KW_CONTINUE||LA217_0==KW_DATA||LA217_0==KW_DATABASES||(LA217_0 >= KW_DATETIME && LA217_0 <= KW_DBPROPERTIES)||(LA217_0 >= KW_DEFERRED && LA217_0 <= KW_DEFINED)||(LA217_0 >= KW_DELIMITED && LA217_0 <= KW_DESC)||(LA217_0 >= KW_DETAIL && LA217_0 <= KW_DISABLE)||LA217_0==KW_DISTRIBUTE||LA217_0==KW_DOW||(LA217_0 >= KW_DUMP && LA217_0 <= KW_ELEM_TYPE)||LA217_0==KW_ENABLE||LA217_0==KW_ESCAPED||LA217_0==KW_EXCLUSIVE||(LA217_0 >= KW_EXPLAIN && LA217_0 <= KW_EXPRESSION)||(LA217_0 >= KW_FIELDS && LA217_0 <= KW_FIRST)||(LA217_0 >= KW_FORMAT && LA217_0 <= KW_FORMATTED)||LA217_0==KW_FUNCTIONS||(LA217_0 >= KW_HOUR && LA217_0 <= KW_IDXPROPERTIES)||(LA217_0 >= KW_INDEX && LA217_0 <= KW_INDEXES)||(LA217_0 >= KW_INPATH && LA217_0 <= KW_INPUTFORMAT)||(LA217_0 >= KW_ISOLATION && LA217_0 <= KW_JAR)||(LA217_0 >= KW_KEY && LA217_0 <= KW_LAST)||LA217_0==KW_LEVEL||(LA217_0 >= KW_LIMIT && LA217_0 <= KW_LOAD)||(LA217_0 >= KW_LOCATION && LA217_0 <= KW_LONG)||(LA217_0 >= KW_MAPJOIN && LA217_0 <= KW_MATERIALIZED)||LA217_0==KW_METADATA||(LA217_0 >= KW_MINUTE && LA217_0 <= KW_MONTH)||LA217_0==KW_MSCK||(LA217_0 >= KW_NORELY && LA217_0 <= KW_NOSCAN)||LA217_0==KW_NOVALIDATE||LA217_0==KW_NULLS||LA217_0==KW_OFFSET||(LA217_0 >= KW_OPERATOR && LA217_0 <= KW_OPTION)||(LA217_0 >= KW_OUTPUTDRIVER && LA217_0 <= KW_OUTPUTFORMAT)||(LA217_0 >= KW_OVERWRITE && LA217_0 <= KW_OWNER)||(LA217_0 >= KW_PARTITIONED && LA217_0 <= KW_PARTITIONS)||LA217_0==KW_PLUS||LA217_0==KW_PRETTY||LA217_0==KW_PRINCIPALS||(LA217_0 >= KW_PURGE && LA217_0 <= KW_QUARTER)||LA217_0==KW_READ||(LA217_0 >= KW_REBUILD && LA217_0 <= KW_RECORDWRITER)||(LA217_0 >= KW_RELOAD && LA217_0 <= KW_RESTRICT)||LA217_0==KW_REWRITE||(LA217_0 >= KW_ROLE && LA217_0 <= KW_ROLES)||(LA217_0 >= KW_SCHEMA && LA217_0 <= KW_SECOND)||(LA217_0 >= KW_SEMI && LA217_0 <= KW_SERVER)||(LA217_0 >= KW_SETS && LA217_0 <= KW_SKEWED)||(LA217_0 >= KW_SNAPSHOT && LA217_0 <= KW_SSL)||(LA217_0 >= KW_STATISTICS && LA217_0 <= KW_SUMMARY)||LA217_0==KW_TABLES||(LA217_0 >= KW_TBLPROPERTIES && LA217_0 <= KW_TERMINATED)||LA217_0==KW_TINYINT||(LA217_0 >= KW_TOUCH && LA217_0 <= KW_TRANSACTIONS)||LA217_0==KW_UNARCHIVE||LA217_0==KW_UNDO||LA217_0==KW_UNIONTYPE||(LA217_0 >= KW_UNLOCK && LA217_0 <= KW_UNSIGNED)||(LA217_0 >= KW_URI && LA217_0 <= KW_USE)||(LA217_0 >= KW_UTC && LA217_0 <= KW_VALIDATE)||LA217_0==KW_VALUE_TYPE||(LA217_0 >= KW_VECTORIZATION && LA217_0 <= KW_WEEK)||LA217_0==KW_WHILE||(LA217_0 >= KW_WORK && LA217_0 <= KW_YEAR)||LA217_0==KW_BATCH||LA217_0==KW_DAYOFWEEK||LA217_0==KW_HOLD_DDLTIME||LA217_0==KW_IGNORE||LA217_0==KW_NO_DROP||LA217_0==KW_OFFLINE||LA217_0==KW_PROTECTION||LA217_0==KW_READONLY) ) {
				alt217=1;
			}
			else if ( (LA217_0==StringLiteral) ) {
				alt217=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 217, 0, input);
				throw nvae;
			}

			switch (alt217) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1925:7: identifier
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_identifier_in_showStmtIdentifier11331);
					identifier713=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier713.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1926:7: StringLiteral
					{
					root_0 = (ASTNode)adaptor.nil();


					StringLiteral714=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_showStmtIdentifier11339); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					StringLiteral714_tree = (ASTNode)adaptor.create(StringLiteral714);
					adaptor.addChild(root_0, StringLiteral714_tree);
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "showStmtIdentifier"


	public static class tableComment_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableComment"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1929:1: tableComment : KW_COMMENT comment= StringLiteral -> ^( TOK_TABLECOMMENT $comment) ;
	public final HiveParser.tableComment_return tableComment() throws RecognitionException {
		HiveParser.tableComment_return retval = new HiveParser.tableComment_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_COMMENT715=null;

		ASTNode comment_tree=null;
		ASTNode KW_COMMENT715_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");

		 pushMsg("table's comment", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1932:5: ( KW_COMMENT comment= StringLiteral -> ^( TOK_TABLECOMMENT $comment) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1933:7: KW_COMMENT comment= StringLiteral
			{
			KW_COMMENT715=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_tableComment11372); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT715);

			comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableComment11376); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

			// AST REWRITE
			// elements: comment
			// token labels: comment
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1933:41: -> ^( TOK_TABLECOMMENT $comment)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1933:44: ^( TOK_TABLECOMMENT $comment)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLECOMMENT, "TOK_TABLECOMMENT"), root_1);
				adaptor.addChild(root_1, stream_comment.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableComment"


	public static class tablePartition_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tablePartition"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1936:1: tablePartition : KW_PARTITIONED KW_BY LPAREN columnNameTypeList RPAREN -> ^( TOK_TABLEPARTCOLS columnNameTypeList ) ;
	public final HiveParser.tablePartition_return tablePartition() throws RecognitionException {
		HiveParser.tablePartition_return retval = new HiveParser.tablePartition_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_PARTITIONED716=null;
		Token KW_BY717=null;
		Token LPAREN718=null;
		Token RPAREN720=null;
		ParserRuleReturnScope columnNameTypeList719 =null;

		ASTNode KW_PARTITIONED716_tree=null;
		ASTNode KW_BY717_tree=null;
		ASTNode LPAREN718_tree=null;
		ASTNode RPAREN720_tree=null;
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_KW_PARTITIONED=new RewriteRuleTokenStream(adaptor,"token KW_PARTITIONED");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_columnNameTypeList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameTypeList");

		 pushMsg("table partition specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1939:5: ( KW_PARTITIONED KW_BY LPAREN columnNameTypeList RPAREN -> ^( TOK_TABLEPARTCOLS columnNameTypeList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1939:7: KW_PARTITIONED KW_BY LPAREN columnNameTypeList RPAREN
			{
			KW_PARTITIONED716=(Token)match(input,KW_PARTITIONED,FOLLOW_KW_PARTITIONED_in_tablePartition11413); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_PARTITIONED.add(KW_PARTITIONED716);

			KW_BY717=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tablePartition11415); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY717);

			LPAREN718=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tablePartition11417); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN718);

			pushFollow(FOLLOW_columnNameTypeList_in_tablePartition11419);
			columnNameTypeList719=columnNameTypeList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameTypeList.add(columnNameTypeList719.getTree());
			RPAREN720=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tablePartition11421); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN720);

			// AST REWRITE
			// elements: columnNameTypeList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1940:5: -> ^( TOK_TABLEPARTCOLS columnNameTypeList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1940:8: ^( TOK_TABLEPARTCOLS columnNameTypeList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEPARTCOLS, "TOK_TABLEPARTCOLS"), root_1);
				adaptor.addChild(root_1, stream_columnNameTypeList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tablePartition"


	public static class tableBuckets_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableBuckets"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1943:1: tableBuckets : KW_CLUSTERED KW_BY LPAREN bucketCols= columnNameList RPAREN ( KW_SORTED KW_BY LPAREN sortCols= columnNameOrderList RPAREN )? KW_INTO num= Number KW_BUCKETS -> ^( TOK_ALTERTABLE_BUCKETS $bucketCols ( $sortCols)? $num) ;
	public final HiveParser.tableBuckets_return tableBuckets() throws RecognitionException {
		HiveParser.tableBuckets_return retval = new HiveParser.tableBuckets_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token num=null;
		Token KW_CLUSTERED721=null;
		Token KW_BY722=null;
		Token LPAREN723=null;
		Token RPAREN724=null;
		Token KW_SORTED725=null;
		Token KW_BY726=null;
		Token LPAREN727=null;
		Token RPAREN728=null;
		Token KW_INTO729=null;
		Token KW_BUCKETS730=null;
		ParserRuleReturnScope bucketCols =null;
		ParserRuleReturnScope sortCols =null;

		ASTNode num_tree=null;
		ASTNode KW_CLUSTERED721_tree=null;
		ASTNode KW_BY722_tree=null;
		ASTNode LPAREN723_tree=null;
		ASTNode RPAREN724_tree=null;
		ASTNode KW_SORTED725_tree=null;
		ASTNode KW_BY726_tree=null;
		ASTNode LPAREN727_tree=null;
		ASTNode RPAREN728_tree=null;
		ASTNode KW_INTO729_tree=null;
		ASTNode KW_BUCKETS730_tree=null;
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_KW_SORTED=new RewriteRuleTokenStream(adaptor,"token KW_SORTED");
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_INTO=new RewriteRuleTokenStream(adaptor,"token KW_INTO");
		RewriteRuleTokenStream stream_KW_BUCKETS=new RewriteRuleTokenStream(adaptor,"token KW_BUCKETS");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_CLUSTERED=new RewriteRuleTokenStream(adaptor,"token KW_CLUSTERED");
		RewriteRuleSubtreeStream stream_columnNameOrderList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameOrderList");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");

		 pushMsg("table buckets specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1946:5: ( KW_CLUSTERED KW_BY LPAREN bucketCols= columnNameList RPAREN ( KW_SORTED KW_BY LPAREN sortCols= columnNameOrderList RPAREN )? KW_INTO num= Number KW_BUCKETS -> ^( TOK_ALTERTABLE_BUCKETS $bucketCols ( $sortCols)? $num) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1947:7: KW_CLUSTERED KW_BY LPAREN bucketCols= columnNameList RPAREN ( KW_SORTED KW_BY LPAREN sortCols= columnNameOrderList RPAREN )? KW_INTO num= Number KW_BUCKETS
			{
			KW_CLUSTERED721=(Token)match(input,KW_CLUSTERED,FOLLOW_KW_CLUSTERED_in_tableBuckets11466); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CLUSTERED.add(KW_CLUSTERED721);

			KW_BY722=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableBuckets11468); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY722);

			LPAREN723=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tableBuckets11470); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN723);

			pushFollow(FOLLOW_columnNameList_in_tableBuckets11474);
			bucketCols=columnNameList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameList.add(bucketCols.getTree());
			RPAREN724=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tableBuckets11476); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN724);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1947:66: ( KW_SORTED KW_BY LPAREN sortCols= columnNameOrderList RPAREN )?
			int alt218=2;
			int LA218_0 = input.LA(1);
			if ( (LA218_0==KW_SORTED) ) {
				alt218=1;
			}
			switch (alt218) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1947:67: KW_SORTED KW_BY LPAREN sortCols= columnNameOrderList RPAREN
					{
					KW_SORTED725=(Token)match(input,KW_SORTED,FOLLOW_KW_SORTED_in_tableBuckets11479); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SORTED.add(KW_SORTED725);

					KW_BY726=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableBuckets11481); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY726);

					LPAREN727=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tableBuckets11483); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN727);

					pushFollow(FOLLOW_columnNameOrderList_in_tableBuckets11487);
					sortCols=columnNameOrderList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameOrderList.add(sortCols.getTree());
					RPAREN728=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tableBuckets11489); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN728);

					}
					break;

			}

			KW_INTO729=(Token)match(input,KW_INTO,FOLLOW_KW_INTO_in_tableBuckets11493); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INTO.add(KW_INTO729);

			num=(Token)match(input,Number,FOLLOW_Number_in_tableBuckets11497); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_Number.add(num);

			KW_BUCKETS730=(Token)match(input,KW_BUCKETS,FOLLOW_KW_BUCKETS_in_tableBuckets11499); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BUCKETS.add(KW_BUCKETS730);

			// AST REWRITE
			// elements: bucketCols, sortCols, num
			// token labels: num
			// rule labels: bucketCols, sortCols, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_num=new RewriteRuleTokenStream(adaptor,"token num",num);
			RewriteRuleSubtreeStream stream_bucketCols=new RewriteRuleSubtreeStream(adaptor,"rule bucketCols",bucketCols!=null?bucketCols.getTree():null);
			RewriteRuleSubtreeStream stream_sortCols=new RewriteRuleSubtreeStream(adaptor,"rule sortCols",sortCols!=null?sortCols.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1948:5: -> ^( TOK_ALTERTABLE_BUCKETS $bucketCols ( $sortCols)? $num)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1948:8: ^( TOK_ALTERTABLE_BUCKETS $bucketCols ( $sortCols)? $num)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ALTERTABLE_BUCKETS, "TOK_ALTERTABLE_BUCKETS"), root_1);
				adaptor.addChild(root_1, stream_bucketCols.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1948:46: ( $sortCols)?
				if ( stream_sortCols.hasNext() ) {
					adaptor.addChild(root_1, stream_sortCols.nextTree());
				}
				stream_sortCols.reset();

				adaptor.addChild(root_1, stream_num.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableBuckets"


	public static class tableSkewed_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableSkewed"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1951:1: tableSkewed : KW_SKEWED KW_BY LPAREN skewedCols= columnNameList RPAREN KW_ON LPAREN (skewedValues= skewedValueElement ) RPAREN ( ( storedAsDirs )=> storedAsDirs )? -> ^( TOK_TABLESKEWED $skewedCols $skewedValues ( storedAsDirs )? ) ;
	public final HiveParser.tableSkewed_return tableSkewed() throws RecognitionException {
		HiveParser.tableSkewed_return retval = new HiveParser.tableSkewed_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SKEWED731=null;
		Token KW_BY732=null;
		Token LPAREN733=null;
		Token RPAREN734=null;
		Token KW_ON735=null;
		Token LPAREN736=null;
		Token RPAREN737=null;
		ParserRuleReturnScope skewedCols =null;
		ParserRuleReturnScope skewedValues =null;
		ParserRuleReturnScope storedAsDirs738 =null;

		ASTNode KW_SKEWED731_tree=null;
		ASTNode KW_BY732_tree=null;
		ASTNode LPAREN733_tree=null;
		ASTNode RPAREN734_tree=null;
		ASTNode KW_ON735_tree=null;
		ASTNode LPAREN736_tree=null;
		ASTNode RPAREN737_tree=null;
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_SKEWED=new RewriteRuleTokenStream(adaptor,"token KW_SKEWED");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleSubtreeStream stream_skewedValueElement=new RewriteRuleSubtreeStream(adaptor,"rule skewedValueElement");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");
		RewriteRuleSubtreeStream stream_storedAsDirs=new RewriteRuleSubtreeStream(adaptor,"rule storedAsDirs");

		 pushMsg("table skewed specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1954:5: ( KW_SKEWED KW_BY LPAREN skewedCols= columnNameList RPAREN KW_ON LPAREN (skewedValues= skewedValueElement ) RPAREN ( ( storedAsDirs )=> storedAsDirs )? -> ^( TOK_TABLESKEWED $skewedCols $skewedValues ( storedAsDirs )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:6: KW_SKEWED KW_BY LPAREN skewedCols= columnNameList RPAREN KW_ON LPAREN (skewedValues= skewedValueElement ) RPAREN ( ( storedAsDirs )=> storedAsDirs )?
			{
			KW_SKEWED731=(Token)match(input,KW_SKEWED,FOLLOW_KW_SKEWED_in_tableSkewed11551); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SKEWED.add(KW_SKEWED731);

			KW_BY732=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableSkewed11553); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY732);

			LPAREN733=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tableSkewed11555); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN733);

			pushFollow(FOLLOW_columnNameList_in_tableSkewed11559);
			skewedCols=columnNameList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameList.add(skewedCols.getTree());
			RPAREN734=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tableSkewed11561); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN734);

			KW_ON735=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_tableSkewed11563); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON735);

			LPAREN736=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tableSkewed11565); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN736);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:75: (skewedValues= skewedValueElement )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:76: skewedValues= skewedValueElement
			{
			pushFollow(FOLLOW_skewedValueElement_in_tableSkewed11570);
			skewedValues=skewedValueElement();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedValueElement.add(skewedValues.getTree());
			}

			RPAREN737=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tableSkewed11573); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN737);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:116: ( ( storedAsDirs )=> storedAsDirs )?
			int alt219=2;
			int LA219_0 = input.LA(1);
			if ( (LA219_0==KW_STORED) ) {
				int LA219_1 = input.LA(2);
				if ( (LA219_1==KW_AS) ) {
					int LA219_7 = input.LA(3);
					if ( (LA219_7==KW_DIRECTORIES) ) {
						int LA219_9 = input.LA(4);
						if ( (synpred17_HiveParser()) ) {
							alt219=1;
						}
					}
				}
			}
			switch (alt219) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:117: ( storedAsDirs )=> storedAsDirs
					{
					pushFollow(FOLLOW_storedAsDirs_in_tableSkewed11582);
					storedAsDirs738=storedAsDirs();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_storedAsDirs.add(storedAsDirs738.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: skewedCols, skewedValues, storedAsDirs
			// token labels: 
			// rule labels: skewedCols, skewedValues, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_skewedCols=new RewriteRuleSubtreeStream(adaptor,"rule skewedCols",skewedCols!=null?skewedCols.getTree():null);
			RewriteRuleSubtreeStream stream_skewedValues=new RewriteRuleSubtreeStream(adaptor,"rule skewedValues",skewedValues!=null?skewedValues.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1956:5: -> ^( TOK_TABLESKEWED $skewedCols $skewedValues ( storedAsDirs )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1956:8: ^( TOK_TABLESKEWED $skewedCols $skewedValues ( storedAsDirs )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLESKEWED, "TOK_TABLESKEWED"), root_1);
				adaptor.addChild(root_1, stream_skewedCols.nextTree());
				adaptor.addChild(root_1, stream_skewedValues.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1956:52: ( storedAsDirs )?
				if ( stream_storedAsDirs.hasNext() ) {
					adaptor.addChild(root_1, stream_storedAsDirs.nextTree());
				}
				stream_storedAsDirs.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableSkewed"


	public static class rowFormat_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "rowFormat"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1959:1: rowFormat : ( rowFormatSerde -> ^( TOK_SERDE rowFormatSerde ) | rowFormatDelimited -> ^( TOK_SERDE rowFormatDelimited ) | -> ^( TOK_SERDE ) );
	public final HiveParser.rowFormat_return rowFormat() throws RecognitionException {
		HiveParser.rowFormat_return retval = new HiveParser.rowFormat_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope rowFormatSerde739 =null;
		ParserRuleReturnScope rowFormatDelimited740 =null;

		RewriteRuleSubtreeStream stream_rowFormatSerde=new RewriteRuleSubtreeStream(adaptor,"rule rowFormatSerde");
		RewriteRuleSubtreeStream stream_rowFormatDelimited=new RewriteRuleSubtreeStream(adaptor,"rule rowFormatDelimited");

		 pushMsg("serde specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1962:5: ( rowFormatSerde -> ^( TOK_SERDE rowFormatSerde ) | rowFormatDelimited -> ^( TOK_SERDE rowFormatDelimited ) | -> ^( TOK_SERDE ) )
			int alt220=3;
			int LA220_0 = input.LA(1);
			if ( (LA220_0==KW_ROW) ) {
				int LA220_1 = input.LA(2);
				if ( (LA220_1==KW_FORMAT) ) {
					int LA220_26 = input.LA(3);
					if ( (LA220_26==KW_SERDE) ) {
						alt220=1;
					}
					else if ( (LA220_26==KW_DELIMITED) ) {
						alt220=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 220, 26, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 220, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}
			else if ( (LA220_0==EOF||LA220_0==KW_CLUSTER||LA220_0==KW_DISTRIBUTE||LA220_0==KW_EXCEPT||LA220_0==KW_FROM||LA220_0==KW_GROUP||LA220_0==KW_HAVING||LA220_0==KW_INSERT||LA220_0==KW_INTERSECT||LA220_0==KW_LATERAL||LA220_0==KW_LIMIT||LA220_0==KW_MAP||LA220_0==KW_MINUS||LA220_0==KW_ORDER||(LA220_0 >= KW_RECORDREADER && LA220_0 <= KW_REDUCE)||LA220_0==KW_SELECT||LA220_0==KW_SORT||LA220_0==KW_UNION||LA220_0==KW_USING||LA220_0==KW_WHERE||LA220_0==KW_WINDOW||LA220_0==RPAREN) ) {
				alt220=3;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 220, 0, input);
				throw nvae;
			}

			switch (alt220) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1962:7: rowFormatSerde
					{
					pushFollow(FOLLOW_rowFormatSerde_in_rowFormat11630);
					rowFormatSerde739=rowFormatSerde();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_rowFormatSerde.add(rowFormatSerde739.getTree());
					// AST REWRITE
					// elements: rowFormatSerde
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1962:22: -> ^( TOK_SERDE rowFormatSerde )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1962:25: ^( TOK_SERDE rowFormatSerde )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERDE, "TOK_SERDE"), root_1);
						adaptor.addChild(root_1, stream_rowFormatSerde.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1963:7: rowFormatDelimited
					{
					pushFollow(FOLLOW_rowFormatDelimited_in_rowFormat11646);
					rowFormatDelimited740=rowFormatDelimited();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_rowFormatDelimited.add(rowFormatDelimited740.getTree());
					// AST REWRITE
					// elements: rowFormatDelimited
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1963:26: -> ^( TOK_SERDE rowFormatDelimited )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1963:29: ^( TOK_SERDE rowFormatDelimited )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERDE, "TOK_SERDE"), root_1);
						adaptor.addChild(root_1, stream_rowFormatDelimited.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1964:9: 
					{
					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1964:9: -> ^( TOK_SERDE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1964:12: ^( TOK_SERDE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERDE, "TOK_SERDE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "rowFormat"


	public static class recordReader_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "recordReader"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1967:1: recordReader : ( KW_RECORDREADER StringLiteral -> ^( TOK_RECORDREADER StringLiteral ) | -> ^( TOK_RECORDREADER ) );
	public final HiveParser.recordReader_return recordReader() throws RecognitionException {
		HiveParser.recordReader_return retval = new HiveParser.recordReader_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RECORDREADER741=null;
		Token StringLiteral742=null;

		ASTNode KW_RECORDREADER741_tree=null;
		ASTNode StringLiteral742_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_RECORDREADER=new RewriteRuleTokenStream(adaptor,"token KW_RECORDREADER");

		 pushMsg("record reader specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1970:5: ( KW_RECORDREADER StringLiteral -> ^( TOK_RECORDREADER StringLiteral ) | -> ^( TOK_RECORDREADER ) )
			int alt221=2;
			int LA221_0 = input.LA(1);
			if ( (LA221_0==KW_RECORDREADER) ) {
				alt221=1;
			}
			else if ( (LA221_0==EOF||LA221_0==KW_CLUSTER||LA221_0==KW_DISTRIBUTE||LA221_0==KW_EXCEPT||LA221_0==KW_FROM||LA221_0==KW_GROUP||LA221_0==KW_HAVING||LA221_0==KW_INSERT||LA221_0==KW_INTERSECT||LA221_0==KW_LATERAL||LA221_0==KW_LIMIT||LA221_0==KW_MAP||LA221_0==KW_MINUS||LA221_0==KW_ORDER||LA221_0==KW_REDUCE||LA221_0==KW_SELECT||LA221_0==KW_SORT||LA221_0==KW_UNION||LA221_0==KW_WHERE||LA221_0==KW_WINDOW||LA221_0==RPAREN) ) {
				alt221=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 221, 0, input);
				throw nvae;
			}

			switch (alt221) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1970:7: KW_RECORDREADER StringLiteral
					{
					KW_RECORDREADER741=(Token)match(input,KW_RECORDREADER,FOLLOW_KW_RECORDREADER_in_recordReader11695); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_RECORDREADER.add(KW_RECORDREADER741);

					StringLiteral742=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_recordReader11697); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(StringLiteral742);

					// AST REWRITE
					// elements: StringLiteral
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1970:37: -> ^( TOK_RECORDREADER StringLiteral )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1970:40: ^( TOK_RECORDREADER StringLiteral )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RECORDREADER, "TOK_RECORDREADER"), root_1);
						adaptor.addChild(root_1, stream_StringLiteral.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1971:9: 
					{
					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1971:9: -> ^( TOK_RECORDREADER )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1971:12: ^( TOK_RECORDREADER )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RECORDREADER, "TOK_RECORDREADER"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "recordReader"


	public static class recordWriter_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "recordWriter"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1974:1: recordWriter : ( KW_RECORDWRITER StringLiteral -> ^( TOK_RECORDWRITER StringLiteral ) | -> ^( TOK_RECORDWRITER ) );
	public final HiveParser.recordWriter_return recordWriter() throws RecognitionException {
		HiveParser.recordWriter_return retval = new HiveParser.recordWriter_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RECORDWRITER743=null;
		Token StringLiteral744=null;

		ASTNode KW_RECORDWRITER743_tree=null;
		ASTNode StringLiteral744_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_RECORDWRITER=new RewriteRuleTokenStream(adaptor,"token KW_RECORDWRITER");

		 pushMsg("record writer specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1977:5: ( KW_RECORDWRITER StringLiteral -> ^( TOK_RECORDWRITER StringLiteral ) | -> ^( TOK_RECORDWRITER ) )
			int alt222=2;
			int LA222_0 = input.LA(1);
			if ( (LA222_0==KW_RECORDWRITER) ) {
				alt222=1;
			}
			else if ( (LA222_0==KW_USING) ) {
				alt222=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 222, 0, input);
				throw nvae;
			}

			switch (alt222) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1977:7: KW_RECORDWRITER StringLiteral
					{
					KW_RECORDWRITER743=(Token)match(input,KW_RECORDWRITER,FOLLOW_KW_RECORDWRITER_in_recordWriter11746); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_RECORDWRITER.add(KW_RECORDWRITER743);

					StringLiteral744=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_recordWriter11748); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(StringLiteral744);

					// AST REWRITE
					// elements: StringLiteral
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1977:37: -> ^( TOK_RECORDWRITER StringLiteral )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1977:40: ^( TOK_RECORDWRITER StringLiteral )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RECORDWRITER, "TOK_RECORDWRITER"), root_1);
						adaptor.addChild(root_1, stream_StringLiteral.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1978:9: 
					{
					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 1978:9: -> ^( TOK_RECORDWRITER )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:1978:12: ^( TOK_RECORDWRITER )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RECORDWRITER, "TOK_RECORDWRITER"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "recordWriter"


	public static class rowFormatSerde_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "rowFormatSerde"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1981:1: rowFormatSerde : KW_ROW KW_FORMAT KW_SERDE name= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )? -> ^( TOK_SERDENAME $name ( $serdeprops)? ) ;
	public final HiveParser.rowFormatSerde_return rowFormatSerde() throws RecognitionException {
		HiveParser.rowFormatSerde_return retval = new HiveParser.rowFormatSerde_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token name=null;
		Token KW_ROW745=null;
		Token KW_FORMAT746=null;
		Token KW_SERDE747=null;
		Token KW_WITH748=null;
		Token KW_SERDEPROPERTIES749=null;
		ParserRuleReturnScope serdeprops =null;

		ASTNode name_tree=null;
		ASTNode KW_ROW745_tree=null;
		ASTNode KW_FORMAT746_tree=null;
		ASTNode KW_SERDE747_tree=null;
		ASTNode KW_WITH748_tree=null;
		ASTNode KW_SERDEPROPERTIES749_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_ROW=new RewriteRuleTokenStream(adaptor,"token KW_ROW");
		RewriteRuleTokenStream stream_KW_SERDEPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_SERDEPROPERTIES");
		RewriteRuleTokenStream stream_KW_SERDE=new RewriteRuleTokenStream(adaptor,"token KW_SERDE");
		RewriteRuleTokenStream stream_KW_FORMAT=new RewriteRuleTokenStream(adaptor,"token KW_FORMAT");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 pushMsg("serde format specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1984:5: ( KW_ROW KW_FORMAT KW_SERDE name= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )? -> ^( TOK_SERDENAME $name ( $serdeprops)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1984:7: KW_ROW KW_FORMAT KW_SERDE name= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
			{
			KW_ROW745=(Token)match(input,KW_ROW,FOLLOW_KW_ROW_in_rowFormatSerde11797); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROW.add(KW_ROW745);

			KW_FORMAT746=(Token)match(input,KW_FORMAT,FOLLOW_KW_FORMAT_in_rowFormatSerde11799); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FORMAT.add(KW_FORMAT746);

			KW_SERDE747=(Token)match(input,KW_SERDE,FOLLOW_KW_SERDE_in_rowFormatSerde11801); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SERDE.add(KW_SERDE747);

			name=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_rowFormatSerde11805); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(name);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1984:52: ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
			int alt223=2;
			int LA223_0 = input.LA(1);
			if ( (LA223_0==KW_WITH) ) {
				alt223=1;
			}
			switch (alt223) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1984:53: KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties
					{
					KW_WITH748=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_rowFormatSerde11808); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH748);

					KW_SERDEPROPERTIES749=(Token)match(input,KW_SERDEPROPERTIES,FOLLOW_KW_SERDEPROPERTIES_in_rowFormatSerde11810); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SERDEPROPERTIES.add(KW_SERDEPROPERTIES749);

					pushFollow(FOLLOW_tableProperties_in_rowFormatSerde11814);
					serdeprops=tableProperties();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableProperties.add(serdeprops.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: name, serdeprops
			// token labels: name
			// rule labels: serdeprops, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
			RewriteRuleSubtreeStream stream_serdeprops=new RewriteRuleSubtreeStream(adaptor,"rule serdeprops",serdeprops!=null?serdeprops.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1985:5: -> ^( TOK_SERDENAME $name ( $serdeprops)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1985:8: ^( TOK_SERDENAME $name ( $serdeprops)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERDENAME, "TOK_SERDENAME"), root_1);
				adaptor.addChild(root_1, stream_name.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1985:31: ( $serdeprops)?
				if ( stream_serdeprops.hasNext() ) {
					adaptor.addChild(root_1, stream_serdeprops.nextTree());
				}
				stream_serdeprops.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "rowFormatSerde"


	public static class rowFormatDelimited_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "rowFormatDelimited"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1988:1: rowFormatDelimited : KW_ROW KW_FORMAT KW_DELIMITED ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )? -> ^( TOK_SERDEPROPS ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )? ) ;
	public final HiveParser.rowFormatDelimited_return rowFormatDelimited() throws RecognitionException {
		HiveParser.rowFormatDelimited_return retval = new HiveParser.rowFormatDelimited_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ROW750=null;
		Token KW_FORMAT751=null;
		Token KW_DELIMITED752=null;
		ParserRuleReturnScope tableRowFormatFieldIdentifier753 =null;
		ParserRuleReturnScope tableRowFormatCollItemsIdentifier754 =null;
		ParserRuleReturnScope tableRowFormatMapKeysIdentifier755 =null;
		ParserRuleReturnScope tableRowFormatLinesIdentifier756 =null;
		ParserRuleReturnScope tableRowNullFormat757 =null;

		ASTNode KW_ROW750_tree=null;
		ASTNode KW_FORMAT751_tree=null;
		ASTNode KW_DELIMITED752_tree=null;
		RewriteRuleTokenStream stream_KW_ROW=new RewriteRuleTokenStream(adaptor,"token KW_ROW");
		RewriteRuleTokenStream stream_KW_DELIMITED=new RewriteRuleTokenStream(adaptor,"token KW_DELIMITED");
		RewriteRuleTokenStream stream_KW_FORMAT=new RewriteRuleTokenStream(adaptor,"token KW_FORMAT");
		RewriteRuleSubtreeStream stream_tableRowNullFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableRowNullFormat");
		RewriteRuleSubtreeStream stream_tableRowFormatFieldIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormatFieldIdentifier");
		RewriteRuleSubtreeStream stream_tableRowFormatCollItemsIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormatCollItemsIdentifier");
		RewriteRuleSubtreeStream stream_tableRowFormatMapKeysIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormatMapKeysIdentifier");
		RewriteRuleSubtreeStream stream_tableRowFormatLinesIdentifier=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormatLinesIdentifier");

		 pushMsg("serde properties specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1991:5: ( KW_ROW KW_FORMAT KW_DELIMITED ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )? -> ^( TOK_SERDEPROPS ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:7: KW_ROW KW_FORMAT KW_DELIMITED ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )?
			{
			KW_ROW750=(Token)match(input,KW_ROW,FOLLOW_KW_ROW_in_rowFormatDelimited11866); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROW.add(KW_ROW750);

			KW_FORMAT751=(Token)match(input,KW_FORMAT,FOLLOW_KW_FORMAT_in_rowFormatDelimited11868); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FORMAT.add(KW_FORMAT751);

			KW_DELIMITED752=(Token)match(input,KW_DELIMITED,FOLLOW_KW_DELIMITED_in_rowFormatDelimited11870); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DELIMITED.add(KW_DELIMITED752);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:37: ( tableRowFormatFieldIdentifier )?
			int alt224=2;
			int LA224_0 = input.LA(1);
			if ( (LA224_0==KW_FIELDS) ) {
				alt224=1;
			}
			switch (alt224) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:37: tableRowFormatFieldIdentifier
					{
					pushFollow(FOLLOW_tableRowFormatFieldIdentifier_in_rowFormatDelimited11872);
					tableRowFormatFieldIdentifier753=tableRowFormatFieldIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowFormatFieldIdentifier.add(tableRowFormatFieldIdentifier753.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:68: ( tableRowFormatCollItemsIdentifier )?
			int alt225=2;
			int LA225_0 = input.LA(1);
			if ( (LA225_0==KW_COLLECTION) ) {
				alt225=1;
			}
			switch (alt225) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:68: tableRowFormatCollItemsIdentifier
					{
					pushFollow(FOLLOW_tableRowFormatCollItemsIdentifier_in_rowFormatDelimited11875);
					tableRowFormatCollItemsIdentifier754=tableRowFormatCollItemsIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowFormatCollItemsIdentifier.add(tableRowFormatCollItemsIdentifier754.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:103: ( tableRowFormatMapKeysIdentifier )?
			int alt226=2;
			alt226 = dfa226.predict(input);
			switch (alt226) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:103: tableRowFormatMapKeysIdentifier
					{
					pushFollow(FOLLOW_tableRowFormatMapKeysIdentifier_in_rowFormatDelimited11878);
					tableRowFormatMapKeysIdentifier755=tableRowFormatMapKeysIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowFormatMapKeysIdentifier.add(tableRowFormatMapKeysIdentifier755.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:136: ( tableRowFormatLinesIdentifier )?
			int alt227=2;
			int LA227_0 = input.LA(1);
			if ( (LA227_0==KW_LINES) ) {
				alt227=1;
			}
			switch (alt227) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:136: tableRowFormatLinesIdentifier
					{
					pushFollow(FOLLOW_tableRowFormatLinesIdentifier_in_rowFormatDelimited11881);
					tableRowFormatLinesIdentifier756=tableRowFormatLinesIdentifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowFormatLinesIdentifier.add(tableRowFormatLinesIdentifier756.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:167: ( tableRowNullFormat )?
			int alt228=2;
			int LA228_0 = input.LA(1);
			if ( (LA228_0==KW_NULL) ) {
				alt228=1;
			}
			switch (alt228) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:1992:167: tableRowNullFormat
					{
					pushFollow(FOLLOW_tableRowNullFormat_in_rowFormatDelimited11884);
					tableRowNullFormat757=tableRowNullFormat();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableRowNullFormat.add(tableRowNullFormat757.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tableRowFormatMapKeysIdentifier, tableRowFormatFieldIdentifier, tableRowFormatLinesIdentifier, tableRowNullFormat, tableRowFormatCollItemsIdentifier
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 1993:5: -> ^( TOK_SERDEPROPS ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1993:8: ^( TOK_SERDEPROPS ( tableRowFormatFieldIdentifier )? ( tableRowFormatCollItemsIdentifier )? ( tableRowFormatMapKeysIdentifier )? ( tableRowFormatLinesIdentifier )? ( tableRowNullFormat )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SERDEPROPS, "TOK_SERDEPROPS"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1993:25: ( tableRowFormatFieldIdentifier )?
				if ( stream_tableRowFormatFieldIdentifier.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormatFieldIdentifier.nextTree());
				}
				stream_tableRowFormatFieldIdentifier.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1993:56: ( tableRowFormatCollItemsIdentifier )?
				if ( stream_tableRowFormatCollItemsIdentifier.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormatCollItemsIdentifier.nextTree());
				}
				stream_tableRowFormatCollItemsIdentifier.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1993:91: ( tableRowFormatMapKeysIdentifier )?
				if ( stream_tableRowFormatMapKeysIdentifier.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormatMapKeysIdentifier.nextTree());
				}
				stream_tableRowFormatMapKeysIdentifier.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1993:124: ( tableRowFormatLinesIdentifier )?
				if ( stream_tableRowFormatLinesIdentifier.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowFormatLinesIdentifier.nextTree());
				}
				stream_tableRowFormatLinesIdentifier.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:1993:155: ( tableRowNullFormat )?
				if ( stream_tableRowNullFormat.hasNext() ) {
					adaptor.addChild(root_1, stream_tableRowNullFormat.nextTree());
				}
				stream_tableRowNullFormat.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "rowFormatDelimited"


	public static class tableRowFormat_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableRowFormat"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:1996:1: tableRowFormat : ( rowFormatDelimited -> ^( TOK_TABLEROWFORMAT rowFormatDelimited ) | rowFormatSerde -> ^( TOK_TABLESERIALIZER rowFormatSerde ) );
	public final HiveParser.tableRowFormat_return tableRowFormat() throws RecognitionException {
		HiveParser.tableRowFormat_return retval = new HiveParser.tableRowFormat_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope rowFormatDelimited758 =null;
		ParserRuleReturnScope rowFormatSerde759 =null;

		RewriteRuleSubtreeStream stream_rowFormatSerde=new RewriteRuleSubtreeStream(adaptor,"rule rowFormatSerde");
		RewriteRuleSubtreeStream stream_rowFormatDelimited=new RewriteRuleSubtreeStream(adaptor,"rule rowFormatDelimited");

		 pushMsg("table row format specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:1999:5: ( rowFormatDelimited -> ^( TOK_TABLEROWFORMAT rowFormatDelimited ) | rowFormatSerde -> ^( TOK_TABLESERIALIZER rowFormatSerde ) )
			int alt229=2;
			int LA229_0 = input.LA(1);
			if ( (LA229_0==KW_ROW) ) {
				int LA229_1 = input.LA(2);
				if ( (LA229_1==KW_FORMAT) ) {
					int LA229_2 = input.LA(3);
					if ( (LA229_2==KW_DELIMITED) ) {
						alt229=1;
					}
					else if ( (LA229_2==KW_SERDE) ) {
						alt229=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 229, 2, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 229, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 229, 0, input);
				throw nvae;
			}

			switch (alt229) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2000:7: rowFormatDelimited
					{
					pushFollow(FOLLOW_rowFormatDelimited_in_tableRowFormat11943);
					rowFormatDelimited758=rowFormatDelimited();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_rowFormatDelimited.add(rowFormatDelimited758.getTree());
					// AST REWRITE
					// elements: rowFormatDelimited
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2001:5: -> ^( TOK_TABLEROWFORMAT rowFormatDelimited )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2001:8: ^( TOK_TABLEROWFORMAT rowFormatDelimited )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEROWFORMAT, "TOK_TABLEROWFORMAT"), root_1);
						adaptor.addChild(root_1, stream_rowFormatDelimited.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2002:7: rowFormatSerde
					{
					pushFollow(FOLLOW_rowFormatSerde_in_tableRowFormat11963);
					rowFormatSerde759=rowFormatSerde();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_rowFormatSerde.add(rowFormatSerde759.getTree());
					// AST REWRITE
					// elements: rowFormatSerde
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2003:5: -> ^( TOK_TABLESERIALIZER rowFormatSerde )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2003:8: ^( TOK_TABLESERIALIZER rowFormatSerde )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLESERIALIZER, "TOK_TABLESERIALIZER"), root_1);
						adaptor.addChild(root_1, stream_rowFormatSerde.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableRowFormat"


	public static class tablePropertiesPrefixed_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tablePropertiesPrefixed"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2006:1: tablePropertiesPrefixed : KW_TBLPROPERTIES ! tableProperties ;
	public final HiveParser.tablePropertiesPrefixed_return tablePropertiesPrefixed() throws RecognitionException {
		HiveParser.tablePropertiesPrefixed_return retval = new HiveParser.tablePropertiesPrefixed_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_TBLPROPERTIES760=null;
		ParserRuleReturnScope tableProperties761 =null;

		ASTNode KW_TBLPROPERTIES760_tree=null;

		 pushMsg("table properties with prefix", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2009:5: ( KW_TBLPROPERTIES ! tableProperties )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2010:9: KW_TBLPROPERTIES ! tableProperties
			{
			root_0 = (ASTNode)adaptor.nil();


			KW_TBLPROPERTIES760=(Token)match(input,KW_TBLPROPERTIES,FOLLOW_KW_TBLPROPERTIES_in_tablePropertiesPrefixed12010); if (state.failed) return retval;
			pushFollow(FOLLOW_tableProperties_in_tablePropertiesPrefixed12013);
			tableProperties761=tableProperties();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, tableProperties761.getTree());

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tablePropertiesPrefixed"


	public static class tableProperties_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableProperties"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2013:1: tableProperties : LPAREN tablePropertiesList RPAREN -> ^( TOK_TABLEPROPERTIES tablePropertiesList ) ;
	public final HiveParser.tableProperties_return tableProperties() throws RecognitionException {
		HiveParser.tableProperties_return retval = new HiveParser.tableProperties_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN762=null;
		Token RPAREN764=null;
		ParserRuleReturnScope tablePropertiesList763 =null;

		ASTNode LPAREN762_tree=null;
		ASTNode RPAREN764_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_tablePropertiesList=new RewriteRuleSubtreeStream(adaptor,"rule tablePropertiesList");

		 pushMsg("table properties", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2016:5: ( LPAREN tablePropertiesList RPAREN -> ^( TOK_TABLEPROPERTIES tablePropertiesList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2017:7: LPAREN tablePropertiesList RPAREN
			{
			LPAREN762=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tableProperties12046); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN762);

			pushFollow(FOLLOW_tablePropertiesList_in_tableProperties12048);
			tablePropertiesList763=tablePropertiesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tablePropertiesList.add(tablePropertiesList763.getTree());
			RPAREN764=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tableProperties12050); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN764);

			// AST REWRITE
			// elements: tablePropertiesList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2017:41: -> ^( TOK_TABLEPROPERTIES tablePropertiesList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2017:44: ^( TOK_TABLEPROPERTIES tablePropertiesList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEPROPERTIES, "TOK_TABLEPROPERTIES"), root_1);
				adaptor.addChild(root_1, stream_tablePropertiesList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableProperties"


	public static class tablePropertiesList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tablePropertiesList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2020:1: tablePropertiesList : ( keyValueProperty ( COMMA keyValueProperty )* -> ^( TOK_TABLEPROPLIST ( keyValueProperty )+ ) | keyProperty ( COMMA keyProperty )* -> ^( TOK_TABLEPROPLIST ( keyProperty )+ ) );
	public final HiveParser.tablePropertiesList_return tablePropertiesList() throws RecognitionException {
		HiveParser.tablePropertiesList_return retval = new HiveParser.tablePropertiesList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA766=null;
		Token COMMA769=null;
		ParserRuleReturnScope keyValueProperty765 =null;
		ParserRuleReturnScope keyValueProperty767 =null;
		ParserRuleReturnScope keyProperty768 =null;
		ParserRuleReturnScope keyProperty770 =null;

		ASTNode COMMA766_tree=null;
		ASTNode COMMA769_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_keyValueProperty=new RewriteRuleSubtreeStream(adaptor,"rule keyValueProperty");
		RewriteRuleSubtreeStream stream_keyProperty=new RewriteRuleSubtreeStream(adaptor,"rule keyProperty");

		 pushMsg("table properties list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2023:5: ( keyValueProperty ( COMMA keyValueProperty )* -> ^( TOK_TABLEPROPLIST ( keyValueProperty )+ ) | keyProperty ( COMMA keyProperty )* -> ^( TOK_TABLEPROPLIST ( keyProperty )+ ) )
			int alt232=2;
			int LA232_0 = input.LA(1);
			if ( (LA232_0==StringLiteral) ) {
				int LA232_1 = input.LA(2);
				if ( (LA232_1==EQUAL) ) {
					alt232=1;
				}
				else if ( (LA232_1==COMMA||LA232_1==RPAREN) ) {
					alt232=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 232, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 232, 0, input);
				throw nvae;
			}

			switch (alt232) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2024:7: keyValueProperty ( COMMA keyValueProperty )*
					{
					pushFollow(FOLLOW_keyValueProperty_in_tablePropertiesList12091);
					keyValueProperty765=keyValueProperty();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_keyValueProperty.add(keyValueProperty765.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2024:24: ( COMMA keyValueProperty )*
					loop230:
					while (true) {
						int alt230=2;
						int LA230_0 = input.LA(1);
						if ( (LA230_0==COMMA) ) {
							alt230=1;
						}

						switch (alt230) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2024:25: COMMA keyValueProperty
							{
							COMMA766=(Token)match(input,COMMA,FOLLOW_COMMA_in_tablePropertiesList12094); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_COMMA.add(COMMA766);

							pushFollow(FOLLOW_keyValueProperty_in_tablePropertiesList12096);
							keyValueProperty767=keyValueProperty();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_keyValueProperty.add(keyValueProperty767.getTree());
							}
							break;

						default :
							break loop230;
						}
					}

					// AST REWRITE
					// elements: keyValueProperty
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2024:50: -> ^( TOK_TABLEPROPLIST ( keyValueProperty )+ )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2024:53: ^( TOK_TABLEPROPLIST ( keyValueProperty )+ )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEPROPLIST, "TOK_TABLEPROPLIST"), root_1);
						if ( !(stream_keyValueProperty.hasNext()) ) {
							throw new RewriteEarlyExitException();
						}
						while ( stream_keyValueProperty.hasNext() ) {
							adaptor.addChild(root_1, stream_keyValueProperty.nextTree());
						}
						stream_keyValueProperty.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2026:7: keyProperty ( COMMA keyProperty )*
					{
					pushFollow(FOLLOW_keyProperty_in_tablePropertiesList12121);
					keyProperty768=keyProperty();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_keyProperty.add(keyProperty768.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2026:19: ( COMMA keyProperty )*
					loop231:
					while (true) {
						int alt231=2;
						int LA231_0 = input.LA(1);
						if ( (LA231_0==COMMA) ) {
							alt231=1;
						}

						switch (alt231) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2026:20: COMMA keyProperty
							{
							COMMA769=(Token)match(input,COMMA,FOLLOW_COMMA_in_tablePropertiesList12124); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_COMMA.add(COMMA769);

							pushFollow(FOLLOW_keyProperty_in_tablePropertiesList12126);
							keyProperty770=keyProperty();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_keyProperty.add(keyProperty770.getTree());
							}
							break;

						default :
							break loop231;
						}
					}

					// AST REWRITE
					// elements: keyProperty
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2026:40: -> ^( TOK_TABLEPROPLIST ( keyProperty )+ )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2026:43: ^( TOK_TABLEPROPLIST ( keyProperty )+ )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEPROPLIST, "TOK_TABLEPROPLIST"), root_1);
						if ( !(stream_keyProperty.hasNext()) ) {
							throw new RewriteEarlyExitException();
						}
						while ( stream_keyProperty.hasNext() ) {
							adaptor.addChild(root_1, stream_keyProperty.nextTree());
						}
						stream_keyProperty.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tablePropertiesList"


	public static class keyValueProperty_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "keyValueProperty"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2029:1: keyValueProperty : key= StringLiteral EQUAL value= StringLiteral -> ^( TOK_TABLEPROPERTY $key $value) ;
	public final HiveParser.keyValueProperty_return keyValueProperty() throws RecognitionException {
		HiveParser.keyValueProperty_return retval = new HiveParser.keyValueProperty_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token key=null;
		Token value=null;
		Token EQUAL771=null;

		ASTNode key_tree=null;
		ASTNode value_tree=null;
		ASTNode EQUAL771_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_EQUAL=new RewriteRuleTokenStream(adaptor,"token EQUAL");

		 pushMsg("specifying key/value property", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2032:5: (key= StringLiteral EQUAL value= StringLiteral -> ^( TOK_TABLEPROPERTY $key $value) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2033:7: key= StringLiteral EQUAL value= StringLiteral
			{
			key=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_keyValueProperty12172); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(key);

			EQUAL771=(Token)match(input,EQUAL,FOLLOW_EQUAL_in_keyValueProperty12174); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_EQUAL.add(EQUAL771);

			value=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_keyValueProperty12178); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(value);

			// AST REWRITE
			// elements: key, value
			// token labels: value, key
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_value=new RewriteRuleTokenStream(adaptor,"token value",value);
			RewriteRuleTokenStream stream_key=new RewriteRuleTokenStream(adaptor,"token key",key);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2033:51: -> ^( TOK_TABLEPROPERTY $key $value)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2033:54: ^( TOK_TABLEPROPERTY $key $value)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEPROPERTY, "TOK_TABLEPROPERTY"), root_1);
				adaptor.addChild(root_1, stream_key.nextNode());
				adaptor.addChild(root_1, stream_value.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "keyValueProperty"


	public static class keyProperty_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "keyProperty"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2036:1: keyProperty : key= StringLiteral -> ^( TOK_TABLEPROPERTY $key TOK_NULL ) ;
	public final HiveParser.keyProperty_return keyProperty() throws RecognitionException {
		HiveParser.keyProperty_return retval = new HiveParser.keyProperty_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token key=null;

		ASTNode key_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");

		 pushMsg("specifying key property", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2039:5: (key= StringLiteral -> ^( TOK_TABLEPROPERTY $key TOK_NULL ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2040:7: key= StringLiteral
			{
			key=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_keyProperty12225); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(key);

			// AST REWRITE
			// elements: key
			// token labels: key
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_key=new RewriteRuleTokenStream(adaptor,"token key",key);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2040:25: -> ^( TOK_TABLEPROPERTY $key TOK_NULL )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2040:28: ^( TOK_TABLEPROPERTY $key TOK_NULL )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEPROPERTY, "TOK_TABLEPROPERTY"), root_1);
				adaptor.addChild(root_1, stream_key.nextNode());
				adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_NULL, "TOK_NULL"));
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "keyProperty"


	public static class tableRowFormatFieldIdentifier_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableRowFormatFieldIdentifier"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2043:1: tableRowFormatFieldIdentifier : KW_FIELDS KW_TERMINATED KW_BY fldIdnt= StringLiteral ( KW_ESCAPED KW_BY fldEscape= StringLiteral )? -> ^( TOK_TABLEROWFORMATFIELD $fldIdnt ( $fldEscape)? ) ;
	public final HiveParser.tableRowFormatFieldIdentifier_return tableRowFormatFieldIdentifier() throws RecognitionException {
		HiveParser.tableRowFormatFieldIdentifier_return retval = new HiveParser.tableRowFormatFieldIdentifier_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token fldIdnt=null;
		Token fldEscape=null;
		Token KW_FIELDS772=null;
		Token KW_TERMINATED773=null;
		Token KW_BY774=null;
		Token KW_ESCAPED775=null;
		Token KW_BY776=null;

		ASTNode fldIdnt_tree=null;
		ASTNode fldEscape_tree=null;
		ASTNode KW_FIELDS772_tree=null;
		ASTNode KW_TERMINATED773_tree=null;
		ASTNode KW_BY774_tree=null;
		ASTNode KW_ESCAPED775_tree=null;
		ASTNode KW_BY776_tree=null;
		RewriteRuleTokenStream stream_KW_TERMINATED=new RewriteRuleTokenStream(adaptor,"token KW_TERMINATED");
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_ESCAPED=new RewriteRuleTokenStream(adaptor,"token KW_ESCAPED");
		RewriteRuleTokenStream stream_KW_FIELDS=new RewriteRuleTokenStream(adaptor,"token KW_FIELDS");

		 pushMsg("table row format's field separator", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2046:5: ( KW_FIELDS KW_TERMINATED KW_BY fldIdnt= StringLiteral ( KW_ESCAPED KW_BY fldEscape= StringLiteral )? -> ^( TOK_TABLEROWFORMATFIELD $fldIdnt ( $fldEscape)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2047:7: KW_FIELDS KW_TERMINATED KW_BY fldIdnt= StringLiteral ( KW_ESCAPED KW_BY fldEscape= StringLiteral )?
			{
			KW_FIELDS772=(Token)match(input,KW_FIELDS,FOLLOW_KW_FIELDS_in_tableRowFormatFieldIdentifier12269); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FIELDS.add(KW_FIELDS772);

			KW_TERMINATED773=(Token)match(input,KW_TERMINATED,FOLLOW_KW_TERMINATED_in_tableRowFormatFieldIdentifier12271); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TERMINATED.add(KW_TERMINATED773);

			KW_BY774=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableRowFormatFieldIdentifier12273); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY774);

			fldIdnt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableRowFormatFieldIdentifier12277); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(fldIdnt);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2047:59: ( KW_ESCAPED KW_BY fldEscape= StringLiteral )?
			int alt233=2;
			int LA233_0 = input.LA(1);
			if ( (LA233_0==KW_ESCAPED) ) {
				alt233=1;
			}
			switch (alt233) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2047:60: KW_ESCAPED KW_BY fldEscape= StringLiteral
					{
					KW_ESCAPED775=(Token)match(input,KW_ESCAPED,FOLLOW_KW_ESCAPED_in_tableRowFormatFieldIdentifier12280); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ESCAPED.add(KW_ESCAPED775);

					KW_BY776=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableRowFormatFieldIdentifier12282); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY776);

					fldEscape=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableRowFormatFieldIdentifier12286); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(fldEscape);

					}
					break;

			}

			// AST REWRITE
			// elements: fldIdnt, fldEscape
			// token labels: fldIdnt, fldEscape
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_fldIdnt=new RewriteRuleTokenStream(adaptor,"token fldIdnt",fldIdnt);
			RewriteRuleTokenStream stream_fldEscape=new RewriteRuleTokenStream(adaptor,"token fldEscape",fldEscape);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2048:5: -> ^( TOK_TABLEROWFORMATFIELD $fldIdnt ( $fldEscape)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2048:8: ^( TOK_TABLEROWFORMATFIELD $fldIdnt ( $fldEscape)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEROWFORMATFIELD, "TOK_TABLEROWFORMATFIELD"), root_1);
				adaptor.addChild(root_1, stream_fldIdnt.nextNode());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2048:44: ( $fldEscape)?
				if ( stream_fldEscape.hasNext() ) {
					adaptor.addChild(root_1, stream_fldEscape.nextNode());
				}
				stream_fldEscape.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableRowFormatFieldIdentifier"


	public static class tableRowFormatCollItemsIdentifier_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableRowFormatCollItemsIdentifier"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2051:1: tableRowFormatCollItemsIdentifier : KW_COLLECTION KW_ITEMS KW_TERMINATED KW_BY collIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATCOLLITEMS $collIdnt) ;
	public final HiveParser.tableRowFormatCollItemsIdentifier_return tableRowFormatCollItemsIdentifier() throws RecognitionException {
		HiveParser.tableRowFormatCollItemsIdentifier_return retval = new HiveParser.tableRowFormatCollItemsIdentifier_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token collIdnt=null;
		Token KW_COLLECTION777=null;
		Token KW_ITEMS778=null;
		Token KW_TERMINATED779=null;
		Token KW_BY780=null;

		ASTNode collIdnt_tree=null;
		ASTNode KW_COLLECTION777_tree=null;
		ASTNode KW_ITEMS778_tree=null;
		ASTNode KW_TERMINATED779_tree=null;
		ASTNode KW_BY780_tree=null;
		RewriteRuleTokenStream stream_KW_COLLECTION=new RewriteRuleTokenStream(adaptor,"token KW_COLLECTION");
		RewriteRuleTokenStream stream_KW_TERMINATED=new RewriteRuleTokenStream(adaptor,"token KW_TERMINATED");
		RewriteRuleTokenStream stream_KW_ITEMS=new RewriteRuleTokenStream(adaptor,"token KW_ITEMS");
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");

		 pushMsg("table row format's column separator", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2054:5: ( KW_COLLECTION KW_ITEMS KW_TERMINATED KW_BY collIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATCOLLITEMS $collIdnt) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2055:7: KW_COLLECTION KW_ITEMS KW_TERMINATED KW_BY collIdnt= StringLiteral
			{
			KW_COLLECTION777=(Token)match(input,KW_COLLECTION,FOLLOW_KW_COLLECTION_in_tableRowFormatCollItemsIdentifier12338); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COLLECTION.add(KW_COLLECTION777);

			KW_ITEMS778=(Token)match(input,KW_ITEMS,FOLLOW_KW_ITEMS_in_tableRowFormatCollItemsIdentifier12340); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ITEMS.add(KW_ITEMS778);

			KW_TERMINATED779=(Token)match(input,KW_TERMINATED,FOLLOW_KW_TERMINATED_in_tableRowFormatCollItemsIdentifier12342); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TERMINATED.add(KW_TERMINATED779);

			KW_BY780=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableRowFormatCollItemsIdentifier12344); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY780);

			collIdnt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableRowFormatCollItemsIdentifier12348); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(collIdnt);

			// AST REWRITE
			// elements: collIdnt
			// token labels: collIdnt
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_collIdnt=new RewriteRuleTokenStream(adaptor,"token collIdnt",collIdnt);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2056:5: -> ^( TOK_TABLEROWFORMATCOLLITEMS $collIdnt)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2056:8: ^( TOK_TABLEROWFORMATCOLLITEMS $collIdnt)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEROWFORMATCOLLITEMS, "TOK_TABLEROWFORMATCOLLITEMS"), root_1);
				adaptor.addChild(root_1, stream_collIdnt.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableRowFormatCollItemsIdentifier"


	public static class tableRowFormatMapKeysIdentifier_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableRowFormatMapKeysIdentifier"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2059:1: tableRowFormatMapKeysIdentifier : KW_MAP KW_KEYS KW_TERMINATED KW_BY mapKeysIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATMAPKEYS $mapKeysIdnt) ;
	public final HiveParser.tableRowFormatMapKeysIdentifier_return tableRowFormatMapKeysIdentifier() throws RecognitionException {
		HiveParser.tableRowFormatMapKeysIdentifier_return retval = new HiveParser.tableRowFormatMapKeysIdentifier_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token mapKeysIdnt=null;
		Token KW_MAP781=null;
		Token KW_KEYS782=null;
		Token KW_TERMINATED783=null;
		Token KW_BY784=null;

		ASTNode mapKeysIdnt_tree=null;
		ASTNode KW_MAP781_tree=null;
		ASTNode KW_KEYS782_tree=null;
		ASTNode KW_TERMINATED783_tree=null;
		ASTNode KW_BY784_tree=null;
		RewriteRuleTokenStream stream_KW_KEYS=new RewriteRuleTokenStream(adaptor,"token KW_KEYS");
		RewriteRuleTokenStream stream_KW_TERMINATED=new RewriteRuleTokenStream(adaptor,"token KW_TERMINATED");
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_MAP=new RewriteRuleTokenStream(adaptor,"token KW_MAP");

		 pushMsg("table row format's map key separator", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2062:5: ( KW_MAP KW_KEYS KW_TERMINATED KW_BY mapKeysIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATMAPKEYS $mapKeysIdnt) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2063:7: KW_MAP KW_KEYS KW_TERMINATED KW_BY mapKeysIdnt= StringLiteral
			{
			KW_MAP781=(Token)match(input,KW_MAP,FOLLOW_KW_MAP_in_tableRowFormatMapKeysIdentifier12394); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MAP.add(KW_MAP781);

			KW_KEYS782=(Token)match(input,KW_KEYS,FOLLOW_KW_KEYS_in_tableRowFormatMapKeysIdentifier12396); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_KEYS.add(KW_KEYS782);

			KW_TERMINATED783=(Token)match(input,KW_TERMINATED,FOLLOW_KW_TERMINATED_in_tableRowFormatMapKeysIdentifier12398); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TERMINATED.add(KW_TERMINATED783);

			KW_BY784=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableRowFormatMapKeysIdentifier12400); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY784);

			mapKeysIdnt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableRowFormatMapKeysIdentifier12404); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(mapKeysIdnt);

			// AST REWRITE
			// elements: mapKeysIdnt
			// token labels: mapKeysIdnt
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_mapKeysIdnt=new RewriteRuleTokenStream(adaptor,"token mapKeysIdnt",mapKeysIdnt);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2064:5: -> ^( TOK_TABLEROWFORMATMAPKEYS $mapKeysIdnt)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2064:8: ^( TOK_TABLEROWFORMATMAPKEYS $mapKeysIdnt)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEROWFORMATMAPKEYS, "TOK_TABLEROWFORMATMAPKEYS"), root_1);
				adaptor.addChild(root_1, stream_mapKeysIdnt.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableRowFormatMapKeysIdentifier"


	public static class tableRowFormatLinesIdentifier_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableRowFormatLinesIdentifier"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2067:1: tableRowFormatLinesIdentifier : KW_LINES KW_TERMINATED KW_BY linesIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATLINES $linesIdnt) ;
	public final HiveParser.tableRowFormatLinesIdentifier_return tableRowFormatLinesIdentifier() throws RecognitionException {
		HiveParser.tableRowFormatLinesIdentifier_return retval = new HiveParser.tableRowFormatLinesIdentifier_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token linesIdnt=null;
		Token KW_LINES785=null;
		Token KW_TERMINATED786=null;
		Token KW_BY787=null;

		ASTNode linesIdnt_tree=null;
		ASTNode KW_LINES785_tree=null;
		ASTNode KW_TERMINATED786_tree=null;
		ASTNode KW_BY787_tree=null;
		RewriteRuleTokenStream stream_KW_TERMINATED=new RewriteRuleTokenStream(adaptor,"token KW_TERMINATED");
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_LINES=new RewriteRuleTokenStream(adaptor,"token KW_LINES");

		 pushMsg("table row format's line separator", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2070:5: ( KW_LINES KW_TERMINATED KW_BY linesIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATLINES $linesIdnt) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2071:7: KW_LINES KW_TERMINATED KW_BY linesIdnt= StringLiteral
			{
			KW_LINES785=(Token)match(input,KW_LINES,FOLLOW_KW_LINES_in_tableRowFormatLinesIdentifier12450); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LINES.add(KW_LINES785);

			KW_TERMINATED786=(Token)match(input,KW_TERMINATED,FOLLOW_KW_TERMINATED_in_tableRowFormatLinesIdentifier12452); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TERMINATED.add(KW_TERMINATED786);

			KW_BY787=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableRowFormatLinesIdentifier12454); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY787);

			linesIdnt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableRowFormatLinesIdentifier12458); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(linesIdnt);

			// AST REWRITE
			// elements: linesIdnt
			// token labels: linesIdnt
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_linesIdnt=new RewriteRuleTokenStream(adaptor,"token linesIdnt",linesIdnt);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2072:5: -> ^( TOK_TABLEROWFORMATLINES $linesIdnt)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2072:8: ^( TOK_TABLEROWFORMATLINES $linesIdnt)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEROWFORMATLINES, "TOK_TABLEROWFORMATLINES"), root_1);
				adaptor.addChild(root_1, stream_linesIdnt.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableRowFormatLinesIdentifier"


	public static class tableRowNullFormat_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableRowNullFormat"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2075:1: tableRowNullFormat : KW_NULL KW_DEFINED KW_AS nullIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATNULL $nullIdnt) ;
	public final HiveParser.tableRowNullFormat_return tableRowNullFormat() throws RecognitionException {
		HiveParser.tableRowNullFormat_return retval = new HiveParser.tableRowNullFormat_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token nullIdnt=null;
		Token KW_NULL788=null;
		Token KW_DEFINED789=null;
		Token KW_AS790=null;

		ASTNode nullIdnt_tree=null;
		ASTNode KW_NULL788_tree=null;
		ASTNode KW_DEFINED789_tree=null;
		ASTNode KW_AS790_tree=null;
		RewriteRuleTokenStream stream_KW_NULL=new RewriteRuleTokenStream(adaptor,"token KW_NULL");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleTokenStream stream_KW_DEFINED=new RewriteRuleTokenStream(adaptor,"token KW_DEFINED");

		 pushMsg("table row format's null specifier", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2078:5: ( KW_NULL KW_DEFINED KW_AS nullIdnt= StringLiteral -> ^( TOK_TABLEROWFORMATNULL $nullIdnt) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2079:7: KW_NULL KW_DEFINED KW_AS nullIdnt= StringLiteral
			{
			KW_NULL788=(Token)match(input,KW_NULL,FOLLOW_KW_NULL_in_tableRowNullFormat12504); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_NULL.add(KW_NULL788);

			KW_DEFINED789=(Token)match(input,KW_DEFINED,FOLLOW_KW_DEFINED_in_tableRowNullFormat12506); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DEFINED.add(KW_DEFINED789);

			KW_AS790=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableRowNullFormat12508); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS790);

			nullIdnt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableRowNullFormat12512); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(nullIdnt);

			// AST REWRITE
			// elements: nullIdnt
			// token labels: nullIdnt
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_nullIdnt=new RewriteRuleTokenStream(adaptor,"token nullIdnt",nullIdnt);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2080:5: -> ^( TOK_TABLEROWFORMATNULL $nullIdnt)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2080:8: ^( TOK_TABLEROWFORMATNULL $nullIdnt)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEROWFORMATNULL, "TOK_TABLEROWFORMATNULL"), root_1);
				adaptor.addChild(root_1, stream_nullIdnt.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableRowNullFormat"


	public static class tableFileFormat_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableFileFormat"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2082:1: tableFileFormat : ( ( KW_STORED KW_AS KW_INPUTFORMAT )=> KW_STORED KW_AS KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )? -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? ) | KW_STORED KW_BY storageHandler= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )? -> ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? ) | KW_STORED KW_AS genericSpec= identifier -> ^( TOK_FILEFORMAT_GENERIC $genericSpec) );
	public final HiveParser.tableFileFormat_return tableFileFormat() throws RecognitionException {
		HiveParser.tableFileFormat_return retval = new HiveParser.tableFileFormat_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token inFmt=null;
		Token outFmt=null;
		Token inDriver=null;
		Token outDriver=null;
		Token storageHandler=null;
		Token KW_STORED791=null;
		Token KW_AS792=null;
		Token KW_INPUTFORMAT793=null;
		Token KW_OUTPUTFORMAT794=null;
		Token KW_INPUTDRIVER795=null;
		Token KW_OUTPUTDRIVER796=null;
		Token KW_STORED797=null;
		Token KW_BY798=null;
		Token KW_WITH799=null;
		Token KW_SERDEPROPERTIES800=null;
		Token KW_STORED801=null;
		Token KW_AS802=null;
		ParserRuleReturnScope serdeprops =null;
		ParserRuleReturnScope genericSpec =null;

		ASTNode inFmt_tree=null;
		ASTNode outFmt_tree=null;
		ASTNode inDriver_tree=null;
		ASTNode outDriver_tree=null;
		ASTNode storageHandler_tree=null;
		ASTNode KW_STORED791_tree=null;
		ASTNode KW_AS792_tree=null;
		ASTNode KW_INPUTFORMAT793_tree=null;
		ASTNode KW_OUTPUTFORMAT794_tree=null;
		ASTNode KW_INPUTDRIVER795_tree=null;
		ASTNode KW_OUTPUTDRIVER796_tree=null;
		ASTNode KW_STORED797_tree=null;
		ASTNode KW_BY798_tree=null;
		ASTNode KW_WITH799_tree=null;
		ASTNode KW_SERDEPROPERTIES800_tree=null;
		ASTNode KW_STORED801_tree=null;
		ASTNode KW_AS802_tree=null;
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_KW_INPUTFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_INPUTFORMAT");
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_SERDEPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_SERDEPROPERTIES");
		RewriteRuleTokenStream stream_KW_INPUTDRIVER=new RewriteRuleTokenStream(adaptor,"token KW_INPUTDRIVER");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleTokenStream stream_KW_OUTPUTFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_OUTPUTFORMAT");
		RewriteRuleTokenStream stream_KW_STORED=new RewriteRuleTokenStream(adaptor,"token KW_STORED");
		RewriteRuleTokenStream stream_KW_OUTPUTDRIVER=new RewriteRuleTokenStream(adaptor,"token KW_OUTPUTDRIVER");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 pushMsg("table file format specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2085:5: ( ( KW_STORED KW_AS KW_INPUTFORMAT )=> KW_STORED KW_AS KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )? -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? ) | KW_STORED KW_BY storageHandler= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )? -> ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? ) | KW_STORED KW_AS genericSpec= identifier -> ^( TOK_FILEFORMAT_GENERIC $genericSpec) )
			int alt236=3;
			int LA236_0 = input.LA(1);
			if ( (LA236_0==KW_STORED) ) {
				int LA236_1 = input.LA(2);
				if ( (LA236_1==KW_AS) ) {
					int LA236_2 = input.LA(3);
					if ( (LA236_2==KW_INPUTFORMAT) ) {
						int LA236_4 = input.LA(4);
						if ( (synpred18_HiveParser()) ) {
							alt236=1;
						}
						else if ( (true) ) {
							alt236=3;
						}

					}
					else if ( (LA236_2==Identifier||(LA236_2 >= KW_ABORT && LA236_2 <= KW_AFTER)||LA236_2==KW_ANALYZE||LA236_2==KW_ARCHIVE||LA236_2==KW_ASC||(LA236_2 >= KW_AUTOCOMMIT && LA236_2 <= KW_BEFORE)||(LA236_2 >= KW_BUCKET && LA236_2 <= KW_BUCKETS)||(LA236_2 >= KW_CACHE && LA236_2 <= KW_CASCADE)||LA236_2==KW_CHANGE||(LA236_2 >= KW_CLUSTER && LA236_2 <= KW_COLLECTION)||(LA236_2 >= KW_COLUMNS && LA236_2 <= KW_COMMENT)||(LA236_2 >= KW_COMPACT && LA236_2 <= KW_CONCATENATE)||LA236_2==KW_CONTINUE||LA236_2==KW_DATA||LA236_2==KW_DATABASES||(LA236_2 >= KW_DATETIME && LA236_2 <= KW_DBPROPERTIES)||(LA236_2 >= KW_DEFERRED && LA236_2 <= KW_DEFINED)||(LA236_2 >= KW_DELIMITED && LA236_2 <= KW_DESC)||(LA236_2 >= KW_DETAIL && LA236_2 <= KW_DISABLE)||LA236_2==KW_DISTRIBUTE||LA236_2==KW_DOW||(LA236_2 >= KW_DUMP && LA236_2 <= KW_ELEM_TYPE)||LA236_2==KW_ENABLE||LA236_2==KW_ESCAPED||LA236_2==KW_EXCLUSIVE||(LA236_2 >= KW_EXPLAIN && LA236_2 <= KW_EXPRESSION)||(LA236_2 >= KW_FIELDS && LA236_2 <= KW_FIRST)||(LA236_2 >= KW_FORMAT && LA236_2 <= KW_FORMATTED)||LA236_2==KW_FUNCTIONS||(LA236_2 >= KW_HOUR && LA236_2 <= KW_IDXPROPERTIES)||(LA236_2 >= KW_INDEX && LA236_2 <= KW_INDEXES)||(LA236_2 >= KW_INPATH && LA236_2 <= KW_INPUTDRIVER)||(LA236_2 >= KW_ISOLATION && LA236_2 <= KW_JAR)||(LA236_2 >= KW_KEY && LA236_2 <= KW_LAST)||LA236_2==KW_LEVEL||(LA236_2 >= KW_LIMIT && LA236_2 <= KW_LOAD)||(LA236_2 >= KW_LOCATION && LA236_2 <= KW_LONG)||(LA236_2 >= KW_MAPJOIN && LA236_2 <= KW_MATERIALIZED)||LA236_2==KW_METADATA||(LA236_2 >= KW_MINUTE && LA236_2 <= KW_MONTH)||LA236_2==KW_MSCK||(LA236_2 >= KW_NORELY && LA236_2 <= KW_NOSCAN)||LA236_2==KW_NOVALIDATE||LA236_2==KW_NULLS||LA236_2==KW_OFFSET||(LA236_2 >= KW_OPERATOR && LA236_2 <= KW_OPTION)||(LA236_2 >= KW_OUTPUTDRIVER && LA236_2 <= KW_OUTPUTFORMAT)||(LA236_2 >= KW_OVERWRITE && LA236_2 <= KW_OWNER)||(LA236_2 >= KW_PARTITIONED && LA236_2 <= KW_PARTITIONS)||LA236_2==KW_PLUS||LA236_2==KW_PRETTY||LA236_2==KW_PRINCIPALS||(LA236_2 >= KW_PURGE && LA236_2 <= KW_QUARTER)||LA236_2==KW_READ||(LA236_2 >= KW_REBUILD && LA236_2 <= KW_RECORDWRITER)||(LA236_2 >= KW_RELOAD && LA236_2 <= KW_RESTRICT)||LA236_2==KW_REWRITE||(LA236_2 >= KW_ROLE && LA236_2 <= KW_ROLES)||(LA236_2 >= KW_SCHEMA && LA236_2 <= KW_SECOND)||(LA236_2 >= KW_SEMI && LA236_2 <= KW_SERVER)||(LA236_2 >= KW_SETS && LA236_2 <= KW_SKEWED)||(LA236_2 >= KW_SNAPSHOT && LA236_2 <= KW_SSL)||(LA236_2 >= KW_STATISTICS && LA236_2 <= KW_SUMMARY)||LA236_2==KW_TABLES||(LA236_2 >= KW_TBLPROPERTIES && LA236_2 <= KW_TERMINATED)||LA236_2==KW_TINYINT||(LA236_2 >= KW_TOUCH && LA236_2 <= KW_TRANSACTIONS)||LA236_2==KW_UNARCHIVE||LA236_2==KW_UNDO||LA236_2==KW_UNIONTYPE||(LA236_2 >= KW_UNLOCK && LA236_2 <= KW_UNSIGNED)||(LA236_2 >= KW_URI && LA236_2 <= KW_USE)||(LA236_2 >= KW_UTC && LA236_2 <= KW_VALIDATE)||LA236_2==KW_VALUE_TYPE||(LA236_2 >= KW_VECTORIZATION && LA236_2 <= KW_WEEK)||LA236_2==KW_WHILE||(LA236_2 >= KW_WORK && LA236_2 <= KW_YEAR)||LA236_2==KW_BATCH||LA236_2==KW_DAYOFWEEK||LA236_2==KW_HOLD_DDLTIME||LA236_2==KW_IGNORE||LA236_2==KW_NO_DROP||LA236_2==KW_OFFLINE||LA236_2==KW_PROTECTION||LA236_2==KW_READONLY) ) {
						alt236=3;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 236, 2, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}
				else if ( (LA236_1==KW_BY) ) {
					alt236=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 236, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 236, 0, input);
				throw nvae;
			}

			switch (alt236) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2086:7: ( KW_STORED KW_AS KW_INPUTFORMAT )=> KW_STORED KW_AS KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )?
					{
					KW_STORED791=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat12567); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_STORED.add(KW_STORED791);

					KW_AS792=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat12569); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS792);

					KW_INPUTFORMAT793=(Token)match(input,KW_INPUTFORMAT,FOLLOW_KW_INPUTFORMAT_in_tableFileFormat12571); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INPUTFORMAT.add(KW_INPUTFORMAT793);

					inFmt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat12575); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(inFmt);

					KW_OUTPUTFORMAT794=(Token)match(input,KW_OUTPUTFORMAT,FOLLOW_KW_OUTPUTFORMAT_in_tableFileFormat12577); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OUTPUTFORMAT.add(KW_OUTPUTFORMAT794);

					outFmt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat12581); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(outFmt);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2086:131: ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )?
					int alt234=2;
					int LA234_0 = input.LA(1);
					if ( (LA234_0==KW_INPUTDRIVER) ) {
						alt234=1;
					}
					switch (alt234) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2086:132: KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral
							{
							KW_INPUTDRIVER795=(Token)match(input,KW_INPUTDRIVER,FOLLOW_KW_INPUTDRIVER_in_tableFileFormat12584); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_INPUTDRIVER.add(KW_INPUTDRIVER795);

							inDriver=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat12588); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_StringLiteral.add(inDriver);

							KW_OUTPUTDRIVER796=(Token)match(input,KW_OUTPUTDRIVER,FOLLOW_KW_OUTPUTDRIVER_in_tableFileFormat12590); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_OUTPUTDRIVER.add(KW_OUTPUTDRIVER796);

							outDriver=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat12594); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_StringLiteral.add(outDriver);

							}
							break;

					}

					// AST REWRITE
					// elements: inFmt, outFmt, outDriver, inDriver
					// token labels: inFmt, inDriver, outDriver, outFmt
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_inFmt=new RewriteRuleTokenStream(adaptor,"token inFmt",inFmt);
					RewriteRuleTokenStream stream_inDriver=new RewriteRuleTokenStream(adaptor,"token inDriver",inDriver);
					RewriteRuleTokenStream stream_outDriver=new RewriteRuleTokenStream(adaptor,"token outDriver",outDriver);
					RewriteRuleTokenStream stream_outFmt=new RewriteRuleTokenStream(adaptor,"token outFmt",outFmt);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2087:7: -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2087:10: ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLEFILEFORMAT, "TOK_TABLEFILEFORMAT"), root_1);
						adaptor.addChild(root_1, stream_inFmt.nextNode());
						adaptor.addChild(root_1, stream_outFmt.nextNode());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2087:48: ( $inDriver)?
						if ( stream_inDriver.hasNext() ) {
							adaptor.addChild(root_1, stream_inDriver.nextNode());
						}
						stream_inDriver.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2087:59: ( $outDriver)?
						if ( stream_outDriver.hasNext() ) {
							adaptor.addChild(root_1, stream_outDriver.nextNode());
						}
						stream_outDriver.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2088:9: KW_STORED KW_BY storageHandler= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
					{
					KW_STORED797=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat12632); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_STORED.add(KW_STORED797);

					KW_BY798=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableFileFormat12634); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_BY.add(KW_BY798);

					storageHandler=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat12638); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(storageHandler);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2089:10: ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
					int alt235=2;
					int LA235_0 = input.LA(1);
					if ( (LA235_0==KW_WITH) ) {
						alt235=1;
					}
					switch (alt235) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2089:11: KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties
							{
							KW_WITH799=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_tableFileFormat12650); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH799);

							KW_SERDEPROPERTIES800=(Token)match(input,KW_SERDEPROPERTIES,FOLLOW_KW_SERDEPROPERTIES_in_tableFileFormat12652); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_SERDEPROPERTIES.add(KW_SERDEPROPERTIES800);

							pushFollow(FOLLOW_tableProperties_in_tableFileFormat12656);
							serdeprops=tableProperties();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableProperties.add(serdeprops.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: storageHandler, serdeprops
					// token labels: storageHandler
					// rule labels: serdeprops, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_storageHandler=new RewriteRuleTokenStream(adaptor,"token storageHandler",storageHandler);
					RewriteRuleSubtreeStream stream_serdeprops=new RewriteRuleSubtreeStream(adaptor,"rule serdeprops",serdeprops!=null?serdeprops.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2090:7: -> ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2090:10: ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_STORAGEHANDLER, "TOK_STORAGEHANDLER"), root_1);
						adaptor.addChild(root_1, stream_storageHandler.nextNode());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2090:48: ( $serdeprops)?
						if ( stream_serdeprops.hasNext() ) {
							adaptor.addChild(root_1, stream_serdeprops.nextTree());
						}
						stream_serdeprops.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2091:9: KW_STORED KW_AS genericSpec= identifier
					{
					KW_STORED801=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat12687); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_STORED.add(KW_STORED801);

					KW_AS802=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat12689); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS802);

					pushFollow(FOLLOW_identifier_in_tableFileFormat12693);
					genericSpec=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(genericSpec.getTree());
					// AST REWRITE
					// elements: genericSpec
					// token labels: 
					// rule labels: genericSpec, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_genericSpec=new RewriteRuleSubtreeStream(adaptor,"rule genericSpec",genericSpec!=null?genericSpec.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2092:7: -> ^( TOK_FILEFORMAT_GENERIC $genericSpec)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2092:10: ^( TOK_FILEFORMAT_GENERIC $genericSpec)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FILEFORMAT_GENERIC, "TOK_FILEFORMAT_GENERIC"), root_1);
						adaptor.addChild(root_1, stream_genericSpec.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableFileFormat"


	public static class tableLocation_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "tableLocation"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2095:1: tableLocation : KW_LOCATION locn= StringLiteral -> ^( TOK_TABLELOCATION $locn) ;
	public final HiveParser.tableLocation_return tableLocation() throws RecognitionException {
		HiveParser.tableLocation_return retval = new HiveParser.tableLocation_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token locn=null;
		Token KW_LOCATION803=null;

		ASTNode locn_tree=null;
		ASTNode KW_LOCATION803_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_LOCATION=new RewriteRuleTokenStream(adaptor,"token KW_LOCATION");

		 pushMsg("table location specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2098:5: ( KW_LOCATION locn= StringLiteral -> ^( TOK_TABLELOCATION $locn) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2099:7: KW_LOCATION locn= StringLiteral
			{
			KW_LOCATION803=(Token)match(input,KW_LOCATION,FOLLOW_KW_LOCATION_in_tableLocation12741); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LOCATION.add(KW_LOCATION803);

			locn=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableLocation12745); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_StringLiteral.add(locn);

			// AST REWRITE
			// elements: locn
			// token labels: locn
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_locn=new RewriteRuleTokenStream(adaptor,"token locn",locn);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2099:38: -> ^( TOK_TABLELOCATION $locn)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2099:41: ^( TOK_TABLELOCATION $locn)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABLELOCATION, "TOK_TABLELOCATION"), root_1);
				adaptor.addChild(root_1, stream_locn.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "tableLocation"


	public static class columnNameTypeList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameTypeList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2102:1: columnNameTypeList : columnNameType ( COMMA columnNameType )* -> ^( TOK_TABCOLLIST ( columnNameType )+ ) ;
	public final HiveParser.columnNameTypeList_return columnNameTypeList() throws RecognitionException {
		HiveParser.columnNameTypeList_return retval = new HiveParser.columnNameTypeList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA805=null;
		ParserRuleReturnScope columnNameType804 =null;
		ParserRuleReturnScope columnNameType806 =null;

		ASTNode COMMA805_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_columnNameType=new RewriteRuleSubtreeStream(adaptor,"rule columnNameType");

		 pushMsg("column name type list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2105:5: ( columnNameType ( COMMA columnNameType )* -> ^( TOK_TABCOLLIST ( columnNameType )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2105:7: columnNameType ( COMMA columnNameType )*
			{
			pushFollow(FOLLOW_columnNameType_in_columnNameTypeList12781);
			columnNameType804=columnNameType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameType.add(columnNameType804.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2105:22: ( COMMA columnNameType )*
			loop237:
			while (true) {
				int alt237=2;
				int LA237_0 = input.LA(1);
				if ( (LA237_0==COMMA) ) {
					alt237=1;
				}

				switch (alt237) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2105:23: COMMA columnNameType
					{
					COMMA805=(Token)match(input,COMMA,FOLLOW_COMMA_in_columnNameTypeList12784); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA805);

					pushFollow(FOLLOW_columnNameType_in_columnNameTypeList12786);
					columnNameType806=columnNameType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameType.add(columnNameType806.getTree());
					}
					break;

				default :
					break loop237;
				}
			}

			// AST REWRITE
			// elements: columnNameType
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2105:46: -> ^( TOK_TABCOLLIST ( columnNameType )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2105:49: ^( TOK_TABCOLLIST ( columnNameType )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLLIST, "TOK_TABCOLLIST"), root_1);
				if ( !(stream_columnNameType.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_columnNameType.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameType.nextTree());
				}
				stream_columnNameType.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameTypeList"


	public static class columnNameTypeOrPKOrFKList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameTypeOrPKOrFKList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2107:1: columnNameTypeOrPKOrFKList : columnNameTypeOrPKOrFK ( COMMA columnNameTypeOrPKOrFK )* -> ^( TOK_TABCOLLIST ( columnNameTypeOrPKOrFK )+ ) ;
	public final HiveParser.columnNameTypeOrPKOrFKList_return columnNameTypeOrPKOrFKList() throws RecognitionException {
		HiveParser.columnNameTypeOrPKOrFKList_return retval = new HiveParser.columnNameTypeOrPKOrFKList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA808=null;
		ParserRuleReturnScope columnNameTypeOrPKOrFK807 =null;
		ParserRuleReturnScope columnNameTypeOrPKOrFK809 =null;

		ASTNode COMMA808_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_columnNameTypeOrPKOrFK=new RewriteRuleSubtreeStream(adaptor,"rule columnNameTypeOrPKOrFK");

		 pushMsg("column name type list with PK and FK", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2110:5: ( columnNameTypeOrPKOrFK ( COMMA columnNameTypeOrPKOrFK )* -> ^( TOK_TABCOLLIST ( columnNameTypeOrPKOrFK )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2110:7: columnNameTypeOrPKOrFK ( COMMA columnNameTypeOrPKOrFK )*
			{
			pushFollow(FOLLOW_columnNameTypeOrPKOrFK_in_columnNameTypeOrPKOrFKList12823);
			columnNameTypeOrPKOrFK807=columnNameTypeOrPKOrFK();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameTypeOrPKOrFK.add(columnNameTypeOrPKOrFK807.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2110:30: ( COMMA columnNameTypeOrPKOrFK )*
			loop238:
			while (true) {
				int alt238=2;
				int LA238_0 = input.LA(1);
				if ( (LA238_0==COMMA) ) {
					alt238=1;
				}

				switch (alt238) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2110:31: COMMA columnNameTypeOrPKOrFK
					{
					COMMA808=(Token)match(input,COMMA,FOLLOW_COMMA_in_columnNameTypeOrPKOrFKList12826); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA808);

					pushFollow(FOLLOW_columnNameTypeOrPKOrFK_in_columnNameTypeOrPKOrFKList12828);
					columnNameTypeOrPKOrFK809=columnNameTypeOrPKOrFK();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameTypeOrPKOrFK.add(columnNameTypeOrPKOrFK809.getTree());
					}
					break;

				default :
					break loop238;
				}
			}

			// AST REWRITE
			// elements: columnNameTypeOrPKOrFK
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2110:62: -> ^( TOK_TABCOLLIST ( columnNameTypeOrPKOrFK )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2110:65: ^( TOK_TABCOLLIST ( columnNameTypeOrPKOrFK )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLLIST, "TOK_TABCOLLIST"), root_1);
				if ( !(stream_columnNameTypeOrPKOrFK.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_columnNameTypeOrPKOrFK.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameTypeOrPKOrFK.nextTree());
				}
				stream_columnNameTypeOrPKOrFK.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameTypeOrPKOrFKList"


	public static class columnNameColonTypeList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameColonTypeList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2113:1: columnNameColonTypeList : columnNameColonType ( COMMA columnNameColonType )* -> ^( TOK_TABCOLLIST ( columnNameColonType )+ ) ;
	public final HiveParser.columnNameColonTypeList_return columnNameColonTypeList() throws RecognitionException {
		HiveParser.columnNameColonTypeList_return retval = new HiveParser.columnNameColonTypeList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA811=null;
		ParserRuleReturnScope columnNameColonType810 =null;
		ParserRuleReturnScope columnNameColonType812 =null;

		ASTNode COMMA811_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_columnNameColonType=new RewriteRuleSubtreeStream(adaptor,"rule columnNameColonType");

		 pushMsg("column name type list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2116:5: ( columnNameColonType ( COMMA columnNameColonType )* -> ^( TOK_TABCOLLIST ( columnNameColonType )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2116:7: columnNameColonType ( COMMA columnNameColonType )*
			{
			pushFollow(FOLLOW_columnNameColonType_in_columnNameColonTypeList12866);
			columnNameColonType810=columnNameColonType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameColonType.add(columnNameColonType810.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2116:27: ( COMMA columnNameColonType )*
			loop239:
			while (true) {
				int alt239=2;
				int LA239_0 = input.LA(1);
				if ( (LA239_0==COMMA) ) {
					alt239=1;
				}

				switch (alt239) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2116:28: COMMA columnNameColonType
					{
					COMMA811=(Token)match(input,COMMA,FOLLOW_COMMA_in_columnNameColonTypeList12869); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA811);

					pushFollow(FOLLOW_columnNameColonType_in_columnNameColonTypeList12871);
					columnNameColonType812=columnNameColonType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameColonType.add(columnNameColonType812.getTree());
					}
					break;

				default :
					break loop239;
				}
			}

			// AST REWRITE
			// elements: columnNameColonType
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2116:56: -> ^( TOK_TABCOLLIST ( columnNameColonType )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2116:59: ^( TOK_TABCOLLIST ( columnNameColonType )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLLIST, "TOK_TABCOLLIST"), root_1);
				if ( !(stream_columnNameColonType.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_columnNameColonType.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameColonType.nextTree());
				}
				stream_columnNameColonType.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameColonTypeList"


	public static class columnNameList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2119:1: columnNameList : columnName ( COMMA columnName )* -> ^( TOK_TABCOLNAME ( columnName )+ ) ;
	public final HiveParser.columnNameList_return columnNameList() throws RecognitionException {
		HiveParser.columnNameList_return retval = new HiveParser.columnNameList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA814=null;
		ParserRuleReturnScope columnName813 =null;
		ParserRuleReturnScope columnName815 =null;

		ASTNode COMMA814_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_columnName=new RewriteRuleSubtreeStream(adaptor,"rule columnName");

		 pushMsg("column name list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2122:5: ( columnName ( COMMA columnName )* -> ^( TOK_TABCOLNAME ( columnName )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2122:7: columnName ( COMMA columnName )*
			{
			pushFollow(FOLLOW_columnName_in_columnNameList12909);
			columnName813=columnName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnName.add(columnName813.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2122:18: ( COMMA columnName )*
			loop240:
			while (true) {
				int alt240=2;
				int LA240_0 = input.LA(1);
				if ( (LA240_0==COMMA) ) {
					alt240=1;
				}

				switch (alt240) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2122:19: COMMA columnName
					{
					COMMA814=(Token)match(input,COMMA,FOLLOW_COMMA_in_columnNameList12912); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA814);

					pushFollow(FOLLOW_columnName_in_columnNameList12914);
					columnName815=columnName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnName.add(columnName815.getTree());
					}
					break;

				default :
					break loop240;
				}
			}

			// AST REWRITE
			// elements: columnName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2122:38: -> ^( TOK_TABCOLNAME ( columnName )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2122:41: ^( TOK_TABCOLNAME ( columnName )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLNAME, "TOK_TABCOLNAME"), root_1);
				if ( !(stream_columnName.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_columnName.hasNext() ) {
					adaptor.addChild(root_1, stream_columnName.nextTree());
				}
				stream_columnName.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameList"


	public static class columnName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2125:1: columnName : identifier ;
	public final HiveParser.columnName_return columnName() throws RecognitionException {
		HiveParser.columnName_return retval = new HiveParser.columnName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope identifier816 =null;


		 pushMsg("column name", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2128:5: ( identifier )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2129:7: identifier
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_identifier_in_columnName12958);
			identifier816=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier816.getTree());

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnName"


	public static class extColumnName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "extColumnName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2132:1: extColumnName : identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )* ;
	public final HiveParser.extColumnName_return extColumnName() throws RecognitionException {
		HiveParser.extColumnName_return retval = new HiveParser.extColumnName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token DOT818=null;
		Token KW_ELEM_TYPE819=null;
		Token KW_KEY_TYPE820=null;
		Token KW_VALUE_TYPE821=null;
		ParserRuleReturnScope identifier817 =null;
		ParserRuleReturnScope identifier822 =null;

		ASTNode DOT818_tree=null;
		ASTNode KW_ELEM_TYPE819_tree=null;
		ASTNode KW_KEY_TYPE820_tree=null;
		ASTNode KW_VALUE_TYPE821_tree=null;

		 pushMsg("column name for complex types", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2135:5: ( identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )* )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:7: identifier ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )*
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_identifier_in_extColumnName12991);
			identifier817=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier817.getTree());

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:18: ( DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier ) )*
			loop242:
			while (true) {
				int alt242=2;
				int LA242_0 = input.LA(1);
				if ( (LA242_0==DOT) ) {
					alt242=1;
				}

				switch (alt242) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:19: DOT ^ ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier )
					{
					DOT818=(Token)match(input,DOT,FOLLOW_DOT_in_extColumnName12994); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					DOT818_tree = (ASTNode)adaptor.create(DOT818);
					root_0 = (ASTNode)adaptor.becomeRoot(DOT818_tree, root_0);
					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:24: ( ( KW_ELEM_TYPE )=> KW_ELEM_TYPE | ( KW_KEY_TYPE )=> KW_KEY_TYPE | ( KW_VALUE_TYPE )=> KW_VALUE_TYPE | identifier )
					int alt241=4;
					switch ( input.LA(1) ) {
					case KW_ELEM_TYPE:
						{
						int LA241_1 = input.LA(2);
						if ( (synpred19_HiveParser()) ) {
							alt241=1;
						}
						else if ( (true) ) {
							alt241=4;
						}

						}
						break;
					case KW_KEY_TYPE:
						{
						int LA241_2 = input.LA(2);
						if ( (synpred20_HiveParser()) ) {
							alt241=2;
						}
						else if ( (true) ) {
							alt241=4;
						}

						}
						break;
					case KW_VALUE_TYPE:
						{
						int LA241_3 = input.LA(2);
						if ( (synpred21_HiveParser()) ) {
							alt241=3;
						}
						else if ( (true) ) {
							alt241=4;
						}

						}
						break;
					case Identifier:
					case KW_ABORT:
					case KW_ADD:
					case KW_ADMIN:
					case KW_AFTER:
					case KW_ANALYZE:
					case KW_ARCHIVE:
					case KW_ASC:
					case KW_AUTOCOMMIT:
					case KW_BEFORE:
					case KW_BUCKET:
					case KW_BUCKETS:
					case KW_CACHE:
					case KW_CASCADE:
					case KW_CHANGE:
					case KW_CLUSTER:
					case KW_CLUSTERED:
					case KW_CLUSTERSTATUS:
					case KW_COLLECTION:
					case KW_COLUMNS:
					case KW_COMMENT:
					case KW_COMPACT:
					case KW_COMPACTIONS:
					case KW_COMPUTE:
					case KW_CONCATENATE:
					case KW_CONTINUE:
					case KW_DATA:
					case KW_DATABASES:
					case KW_DATETIME:
					case KW_DAY:
					case KW_DBPROPERTIES:
					case KW_DEFERRED:
					case KW_DEFINED:
					case KW_DELIMITED:
					case KW_DEPENDENCY:
					case KW_DESC:
					case KW_DETAIL:
					case KW_DIRECTORIES:
					case KW_DIRECTORY:
					case KW_DISABLE:
					case KW_DISTRIBUTE:
					case KW_DOW:
					case KW_DUMP:
					case KW_ENABLE:
					case KW_ESCAPED:
					case KW_EXCLUSIVE:
					case KW_EXPLAIN:
					case KW_EXPORT:
					case KW_EXPRESSION:
					case KW_FIELDS:
					case KW_FILE:
					case KW_FILEFORMAT:
					case KW_FIRST:
					case KW_FORMAT:
					case KW_FORMATTED:
					case KW_FUNCTIONS:
					case KW_HOUR:
					case KW_IDXPROPERTIES:
					case KW_INDEX:
					case KW_INDEXES:
					case KW_INPATH:
					case KW_INPUTDRIVER:
					case KW_INPUTFORMAT:
					case KW_ISOLATION:
					case KW_ITEMS:
					case KW_JAR:
					case KW_KEY:
					case KW_KEYS:
					case KW_LAST:
					case KW_LEVEL:
					case KW_LIMIT:
					case KW_LINES:
					case KW_LOAD:
					case KW_LOCATION:
					case KW_LOCK:
					case KW_LOCKS:
					case KW_LOGICAL:
					case KW_LONG:
					case KW_MAPJOIN:
					case KW_MATCHED:
					case KW_MATERIALIZED:
					case KW_METADATA:
					case KW_MINUTE:
					case KW_MONTH:
					case KW_MSCK:
					case KW_NORELY:
					case KW_NOSCAN:
					case KW_NOVALIDATE:
					case KW_NULLS:
					case KW_OFFSET:
					case KW_OPERATOR:
					case KW_OPTION:
					case KW_OUTPUTDRIVER:
					case KW_OUTPUTFORMAT:
					case KW_OVERWRITE:
					case KW_OWNER:
					case KW_PARTITIONED:
					case KW_PARTITIONS:
					case KW_PLUS:
					case KW_PRETTY:
					case KW_PRINCIPALS:
					case KW_PURGE:
					case KW_QUARTER:
					case KW_READ:
					case KW_REBUILD:
					case KW_RECORDREADER:
					case KW_RECORDWRITER:
					case KW_RELOAD:
					case KW_RELY:
					case KW_RENAME:
					case KW_REPAIR:
					case KW_REPL:
					case KW_REPLACE:
					case KW_REPLICATION:
					case KW_RESTRICT:
					case KW_REWRITE:
					case KW_ROLE:
					case KW_ROLES:
					case KW_SCHEMA:
					case KW_SCHEMAS:
					case KW_SECOND:
					case KW_SEMI:
					case KW_SERDE:
					case KW_SERDEPROPERTIES:
					case KW_SERVER:
					case KW_SETS:
					case KW_SHARED:
					case KW_SHOW:
					case KW_SHOW_DATABASE:
					case KW_SKEWED:
					case KW_SNAPSHOT:
					case KW_SORT:
					case KW_SORTED:
					case KW_SSL:
					case KW_STATISTICS:
					case KW_STATUS:
					case KW_STORED:
					case KW_STREAMTABLE:
					case KW_STRING:
					case KW_STRUCT:
					case KW_SUMMARY:
					case KW_TABLES:
					case KW_TBLPROPERTIES:
					case KW_TEMPORARY:
					case KW_TERMINATED:
					case KW_TINYINT:
					case KW_TOUCH:
					case KW_TRANSACTION:
					case KW_TRANSACTIONS:
					case KW_UNARCHIVE:
					case KW_UNDO:
					case KW_UNIONTYPE:
					case KW_UNLOCK:
					case KW_UNSET:
					case KW_UNSIGNED:
					case KW_URI:
					case KW_USE:
					case KW_UTC:
					case KW_UTCTIMESTAMP:
					case KW_VALIDATE:
					case KW_VECTORIZATION:
					case KW_VIEW:
					case KW_VIEWS:
					case KW_WAIT:
					case KW_WEEK:
					case KW_WHILE:
					case KW_WORK:
					case KW_WRITE:
					case KW_YEAR:
					case KW_BATCH:
					case KW_DAYOFWEEK:
					case KW_HOLD_DDLTIME:
					case KW_IGNORE:
					case KW_NO_DROP:
					case KW_OFFLINE:
					case KW_PROTECTION:
					case KW_READONLY:
						{
						alt241=4;
						}
						break;
					default:
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 241, 0, input);
						throw nvae;
					}
					switch (alt241) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:25: ( KW_ELEM_TYPE )=> KW_ELEM_TYPE
							{
							KW_ELEM_TYPE819=(Token)match(input,KW_ELEM_TYPE,FOLLOW_KW_ELEM_TYPE_in_extColumnName13004); if (state.failed) return retval;
							if ( state.backtracking==0 ) {
							KW_ELEM_TYPE819_tree = (ASTNode)adaptor.create(KW_ELEM_TYPE819);
							adaptor.addChild(root_0, KW_ELEM_TYPE819_tree);
							}

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:58: ( KW_KEY_TYPE )=> KW_KEY_TYPE
							{
							KW_KEY_TYPE820=(Token)match(input,KW_KEY_TYPE,FOLLOW_KW_KEY_TYPE_in_extColumnName13014); if (state.failed) return retval;
							if ( state.backtracking==0 ) {
							KW_KEY_TYPE820_tree = (ASTNode)adaptor.create(KW_KEY_TYPE820);
							adaptor.addChild(root_0, KW_KEY_TYPE820_tree);
							}

							}
							break;
						case 3 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:89: ( KW_VALUE_TYPE )=> KW_VALUE_TYPE
							{
							KW_VALUE_TYPE821=(Token)match(input,KW_VALUE_TYPE,FOLLOW_KW_VALUE_TYPE_in_extColumnName13024); if (state.failed) return retval;
							if ( state.backtracking==0 ) {
							KW_VALUE_TYPE821_tree = (ASTNode)adaptor.create(KW_VALUE_TYPE821);
							adaptor.addChild(root_0, KW_VALUE_TYPE821_tree);
							}

							}
							break;
						case 4 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:124: identifier
							{
							pushFollow(FOLLOW_identifier_in_extColumnName13028);
							identifier822=identifier();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) adaptor.addChild(root_0, identifier822.getTree());

							}
							break;

					}

					}
					break;

				default :
					break loop242;
				}
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "extColumnName"


	public static class columnNameOrderList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameOrderList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2139:1: columnNameOrderList : columnNameOrder ( COMMA columnNameOrder )* -> ^( TOK_TABCOLNAME ( columnNameOrder )+ ) ;
	public final HiveParser.columnNameOrderList_return columnNameOrderList() throws RecognitionException {
		HiveParser.columnNameOrderList_return retval = new HiveParser.columnNameOrderList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA824=null;
		ParserRuleReturnScope columnNameOrder823 =null;
		ParserRuleReturnScope columnNameOrder825 =null;

		ASTNode COMMA824_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_columnNameOrder=new RewriteRuleSubtreeStream(adaptor,"rule columnNameOrder");

		 pushMsg("column name order list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2142:5: ( columnNameOrder ( COMMA columnNameOrder )* -> ^( TOK_TABCOLNAME ( columnNameOrder )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2142:7: columnNameOrder ( COMMA columnNameOrder )*
			{
			pushFollow(FOLLOW_columnNameOrder_in_columnNameOrderList13058);
			columnNameOrder823=columnNameOrder();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameOrder.add(columnNameOrder823.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2142:23: ( COMMA columnNameOrder )*
			loop243:
			while (true) {
				int alt243=2;
				int LA243_0 = input.LA(1);
				if ( (LA243_0==COMMA) ) {
					alt243=1;
				}

				switch (alt243) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2142:24: COMMA columnNameOrder
					{
					COMMA824=(Token)match(input,COMMA,FOLLOW_COMMA_in_columnNameOrderList13061); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA824);

					pushFollow(FOLLOW_columnNameOrder_in_columnNameOrderList13063);
					columnNameOrder825=columnNameOrder();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameOrder.add(columnNameOrder825.getTree());
					}
					break;

				default :
					break loop243;
				}
			}

			// AST REWRITE
			// elements: columnNameOrder
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2142:48: -> ^( TOK_TABCOLNAME ( columnNameOrder )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2142:51: ^( TOK_TABCOLNAME ( columnNameOrder )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLNAME, "TOK_TABCOLNAME"), root_1);
				if ( !(stream_columnNameOrder.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_columnNameOrder.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameOrder.nextTree());
				}
				stream_columnNameOrder.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameOrderList"


	public static class columnParenthesesList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnParenthesesList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2145:1: columnParenthesesList : LPAREN ! columnNameList RPAREN !;
	public final HiveParser.columnParenthesesList_return columnParenthesesList() throws RecognitionException {
		HiveParser.columnParenthesesList_return retval = new HiveParser.columnParenthesesList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN826=null;
		Token RPAREN828=null;
		ParserRuleReturnScope columnNameList827 =null;

		ASTNode LPAREN826_tree=null;
		ASTNode RPAREN828_tree=null;

		 pushMsg("column parentheses list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2148:5: ( LPAREN ! columnNameList RPAREN !)
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2148:7: LPAREN ! columnNameList RPAREN !
			{
			root_0 = (ASTNode)adaptor.nil();


			LPAREN826=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_columnParenthesesList13101); if (state.failed) return retval;
			pushFollow(FOLLOW_columnNameList_in_columnParenthesesList13104);
			columnNameList827=columnNameList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, columnNameList827.getTree());

			RPAREN828=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_columnParenthesesList13106); if (state.failed) return retval;
			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnParenthesesList"


	public static class enableSpecification_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "enableSpecification"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2151:1: enableSpecification : ( KW_ENABLE -> ^( TOK_ENABLE ) | KW_DISABLE -> ^( TOK_DISABLE ) );
	public final HiveParser.enableSpecification_return enableSpecification() throws RecognitionException {
		HiveParser.enableSpecification_return retval = new HiveParser.enableSpecification_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ENABLE829=null;
		Token KW_DISABLE830=null;

		ASTNode KW_ENABLE829_tree=null;
		ASTNode KW_DISABLE830_tree=null;
		RewriteRuleTokenStream stream_KW_DISABLE=new RewriteRuleTokenStream(adaptor,"token KW_DISABLE");
		RewriteRuleTokenStream stream_KW_ENABLE=new RewriteRuleTokenStream(adaptor,"token KW_ENABLE");

		 pushMsg("enable specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2154:5: ( KW_ENABLE -> ^( TOK_ENABLE ) | KW_DISABLE -> ^( TOK_DISABLE ) )
			int alt244=2;
			int LA244_0 = input.LA(1);
			if ( (LA244_0==KW_ENABLE) ) {
				alt244=1;
			}
			else if ( (LA244_0==KW_DISABLE) ) {
				alt244=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 244, 0, input);
				throw nvae;
			}

			switch (alt244) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2154:7: KW_ENABLE
					{
					KW_ENABLE829=(Token)match(input,KW_ENABLE,FOLLOW_KW_ENABLE_in_enableSpecification13134); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ENABLE.add(KW_ENABLE829);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2154:17: -> ^( TOK_ENABLE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2154:20: ^( TOK_ENABLE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ENABLE, "TOK_ENABLE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2155:7: KW_DISABLE
					{
					KW_DISABLE830=(Token)match(input,KW_DISABLE,FOLLOW_KW_DISABLE_in_enableSpecification13148); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DISABLE.add(KW_DISABLE830);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2155:18: -> ^( TOK_DISABLE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2155:21: ^( TOK_DISABLE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DISABLE, "TOK_DISABLE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "enableSpecification"


	public static class validateSpecification_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "validateSpecification"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2158:1: validateSpecification : ( KW_VALIDATE -> ^( TOK_VALIDATE ) | KW_NOVALIDATE -> ^( TOK_NOVALIDATE ) );
	public final HiveParser.validateSpecification_return validateSpecification() throws RecognitionException {
		HiveParser.validateSpecification_return retval = new HiveParser.validateSpecification_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_VALIDATE831=null;
		Token KW_NOVALIDATE832=null;

		ASTNode KW_VALIDATE831_tree=null;
		ASTNode KW_NOVALIDATE832_tree=null;
		RewriteRuleTokenStream stream_KW_VALIDATE=new RewriteRuleTokenStream(adaptor,"token KW_VALIDATE");
		RewriteRuleTokenStream stream_KW_NOVALIDATE=new RewriteRuleTokenStream(adaptor,"token KW_NOVALIDATE");

		 pushMsg("validate specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2161:5: ( KW_VALIDATE -> ^( TOK_VALIDATE ) | KW_NOVALIDATE -> ^( TOK_NOVALIDATE ) )
			int alt245=2;
			int LA245_0 = input.LA(1);
			if ( (LA245_0==KW_VALIDATE) ) {
				alt245=1;
			}
			else if ( (LA245_0==KW_NOVALIDATE) ) {
				alt245=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 245, 0, input);
				throw nvae;
			}

			switch (alt245) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2161:7: KW_VALIDATE
					{
					KW_VALIDATE831=(Token)match(input,KW_VALIDATE,FOLLOW_KW_VALIDATE_in_validateSpecification13181); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_VALIDATE.add(KW_VALIDATE831);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2161:19: -> ^( TOK_VALIDATE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2161:22: ^( TOK_VALIDATE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_VALIDATE, "TOK_VALIDATE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2162:7: KW_NOVALIDATE
					{
					KW_NOVALIDATE832=(Token)match(input,KW_NOVALIDATE,FOLLOW_KW_NOVALIDATE_in_validateSpecification13195); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NOVALIDATE.add(KW_NOVALIDATE832);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2162:21: -> ^( TOK_NOVALIDATE )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2162:24: ^( TOK_NOVALIDATE )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NOVALIDATE, "TOK_NOVALIDATE"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "validateSpecification"


	public static class relySpecification_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "relySpecification"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2165:1: relySpecification : ( KW_RELY -> ^( TOK_RELY ) | ( KW_NORELY )? -> ^( TOK_NORELY ) );
	public final HiveParser.relySpecification_return relySpecification() throws RecognitionException {
		HiveParser.relySpecification_return retval = new HiveParser.relySpecification_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_RELY833=null;
		Token KW_NORELY834=null;

		ASTNode KW_RELY833_tree=null;
		ASTNode KW_NORELY834_tree=null;
		RewriteRuleTokenStream stream_KW_NORELY=new RewriteRuleTokenStream(adaptor,"token KW_NORELY");
		RewriteRuleTokenStream stream_KW_RELY=new RewriteRuleTokenStream(adaptor,"token KW_RELY");

		 pushMsg("rely specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2168:5: ( KW_RELY -> ^( TOK_RELY ) | ( KW_NORELY )? -> ^( TOK_NORELY ) )
			int alt247=2;
			int LA247_0 = input.LA(1);
			if ( (LA247_0==KW_RELY) ) {
				alt247=1;
			}
			else if ( (LA247_0==EOF||LA247_0==COMMA||LA247_0==KW_NORELY||LA247_0==RPAREN) ) {
				alt247=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 247, 0, input);
				throw nvae;
			}

			switch (alt247) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2168:8: KW_RELY
					{
					KW_RELY833=(Token)match(input,KW_RELY,FOLLOW_KW_RELY_in_relySpecification13229); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_RELY.add(KW_RELY833);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2168:16: -> ^( TOK_RELY )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2168:19: ^( TOK_RELY )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_RELY, "TOK_RELY"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2169:8: ( KW_NORELY )?
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2169:8: ( KW_NORELY )?
					int alt246=2;
					int LA246_0 = input.LA(1);
					if ( (LA246_0==KW_NORELY) ) {
						alt246=1;
					}
					switch (alt246) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2169:9: KW_NORELY
							{
							KW_NORELY834=(Token)match(input,KW_NORELY,FOLLOW_KW_NORELY_in_relySpecification13245); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_NORELY.add(KW_NORELY834);

							}
							break;

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2169:21: -> ^( TOK_NORELY )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2169:24: ^( TOK_NORELY )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NORELY, "TOK_NORELY"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "relySpecification"


	public static class primaryKeyWithoutName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "primaryKeyWithoutName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2172:1: primaryKeyWithoutName : KW_PRIMARY KW_KEY columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_PRIMARY_KEY columnParenthesesList $relySpec $enableSpec $validateSpec) ;
	public final HiveParser.primaryKeyWithoutName_return primaryKeyWithoutName() throws RecognitionException {
		HiveParser.primaryKeyWithoutName_return retval = new HiveParser.primaryKeyWithoutName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_PRIMARY835=null;
		Token KW_KEY836=null;
		ParserRuleReturnScope enableSpec =null;
		ParserRuleReturnScope validateSpec =null;
		ParserRuleReturnScope relySpec =null;
		ParserRuleReturnScope columnParenthesesList837 =null;

		ASTNode KW_PRIMARY835_tree=null;
		ASTNode KW_KEY836_tree=null;
		RewriteRuleTokenStream stream_KW_PRIMARY=new RewriteRuleTokenStream(adaptor,"token KW_PRIMARY");
		RewriteRuleTokenStream stream_KW_KEY=new RewriteRuleTokenStream(adaptor,"token KW_KEY");
		RewriteRuleSubtreeStream stream_enableSpecification=new RewriteRuleSubtreeStream(adaptor,"rule enableSpecification");
		RewriteRuleSubtreeStream stream_columnParenthesesList=new RewriteRuleSubtreeStream(adaptor,"rule columnParenthesesList");
		RewriteRuleSubtreeStream stream_relySpecification=new RewriteRuleSubtreeStream(adaptor,"rule relySpecification");
		RewriteRuleSubtreeStream stream_validateSpecification=new RewriteRuleSubtreeStream(adaptor,"rule validateSpecification");

		 pushMsg("primary key without key name", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2175:5: ( KW_PRIMARY KW_KEY columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_PRIMARY_KEY columnParenthesesList $relySpec $enableSpec $validateSpec) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2175:7: KW_PRIMARY KW_KEY columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification
			{
			KW_PRIMARY835=(Token)match(input,KW_PRIMARY,FOLLOW_KW_PRIMARY_in_primaryKeyWithoutName13280); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_PRIMARY.add(KW_PRIMARY835);

			KW_KEY836=(Token)match(input,KW_KEY,FOLLOW_KW_KEY_in_primaryKeyWithoutName13282); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_KEY.add(KW_KEY836);

			pushFollow(FOLLOW_columnParenthesesList_in_primaryKeyWithoutName13284);
			columnParenthesesList837=columnParenthesesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnParenthesesList.add(columnParenthesesList837.getTree());
			pushFollow(FOLLOW_enableSpecification_in_primaryKeyWithoutName13288);
			enableSpec=enableSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_enableSpecification.add(enableSpec.getTree());
			pushFollow(FOLLOW_validateSpecification_in_primaryKeyWithoutName13292);
			validateSpec=validateSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_validateSpecification.add(validateSpec.getTree());
			pushFollow(FOLLOW_relySpecification_in_primaryKeyWithoutName13296);
			relySpec=relySpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_relySpecification.add(relySpec.getTree());
			// AST REWRITE
			// elements: columnParenthesesList, enableSpec, validateSpec, relySpec
			// token labels: 
			// rule labels: validateSpec, enableSpec, relySpec, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_validateSpec=new RewriteRuleSubtreeStream(adaptor,"rule validateSpec",validateSpec!=null?validateSpec.getTree():null);
			RewriteRuleSubtreeStream stream_enableSpec=new RewriteRuleSubtreeStream(adaptor,"rule enableSpec",enableSpec!=null?enableSpec.getTree():null);
			RewriteRuleSubtreeStream stream_relySpec=new RewriteRuleSubtreeStream(adaptor,"rule relySpec",relySpec!=null?relySpec.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2176:5: -> ^( TOK_PRIMARY_KEY columnParenthesesList $relySpec $enableSpec $validateSpec)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2176:8: ^( TOK_PRIMARY_KEY columnParenthesesList $relySpec $enableSpec $validateSpec)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIMARY_KEY, "TOK_PRIMARY_KEY"), root_1);
				adaptor.addChild(root_1, stream_columnParenthesesList.nextTree());
				adaptor.addChild(root_1, stream_relySpec.nextTree());
				adaptor.addChild(root_1, stream_enableSpec.nextTree());
				adaptor.addChild(root_1, stream_validateSpec.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "primaryKeyWithoutName"


	public static class primaryKeyWithName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "primaryKeyWithName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2179:1: primaryKeyWithName : KW_CONSTRAINT idfr= identifier KW_PRIMARY KW_KEY pkCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_PRIMARY_KEY $pkCols $idfr $relySpec $enableSpec $validateSpec) ;
	public final HiveParser.primaryKeyWithName_return primaryKeyWithName() throws RecognitionException {
		HiveParser.primaryKeyWithName_return retval = new HiveParser.primaryKeyWithName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CONSTRAINT838=null;
		Token KW_PRIMARY839=null;
		Token KW_KEY840=null;
		ParserRuleReturnScope idfr =null;
		ParserRuleReturnScope pkCols =null;
		ParserRuleReturnScope enableSpec =null;
		ParserRuleReturnScope validateSpec =null;
		ParserRuleReturnScope relySpec =null;

		ASTNode KW_CONSTRAINT838_tree=null;
		ASTNode KW_PRIMARY839_tree=null;
		ASTNode KW_KEY840_tree=null;
		RewriteRuleTokenStream stream_KW_CONSTRAINT=new RewriteRuleTokenStream(adaptor,"token KW_CONSTRAINT");
		RewriteRuleTokenStream stream_KW_PRIMARY=new RewriteRuleTokenStream(adaptor,"token KW_PRIMARY");
		RewriteRuleTokenStream stream_KW_KEY=new RewriteRuleTokenStream(adaptor,"token KW_KEY");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_enableSpecification=new RewriteRuleSubtreeStream(adaptor,"rule enableSpecification");
		RewriteRuleSubtreeStream stream_columnParenthesesList=new RewriteRuleSubtreeStream(adaptor,"rule columnParenthesesList");
		RewriteRuleSubtreeStream stream_relySpecification=new RewriteRuleSubtreeStream(adaptor,"rule relySpecification");
		RewriteRuleSubtreeStream stream_validateSpecification=new RewriteRuleSubtreeStream(adaptor,"rule validateSpecification");

		 pushMsg("primary key with key name", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2182:5: ( KW_CONSTRAINT idfr= identifier KW_PRIMARY KW_KEY pkCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_PRIMARY_KEY $pkCols $idfr $relySpec $enableSpec $validateSpec) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2182:7: KW_CONSTRAINT idfr= identifier KW_PRIMARY KW_KEY pkCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification
			{
			KW_CONSTRAINT838=(Token)match(input,KW_CONSTRAINT,FOLLOW_KW_CONSTRAINT_in_primaryKeyWithName13344); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CONSTRAINT.add(KW_CONSTRAINT838);

			pushFollow(FOLLOW_identifier_in_primaryKeyWithName13348);
			idfr=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(idfr.getTree());
			KW_PRIMARY839=(Token)match(input,KW_PRIMARY,FOLLOW_KW_PRIMARY_in_primaryKeyWithName13350); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_PRIMARY.add(KW_PRIMARY839);

			KW_KEY840=(Token)match(input,KW_KEY,FOLLOW_KW_KEY_in_primaryKeyWithName13352); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_KEY.add(KW_KEY840);

			pushFollow(FOLLOW_columnParenthesesList_in_primaryKeyWithName13356);
			pkCols=columnParenthesesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnParenthesesList.add(pkCols.getTree());
			pushFollow(FOLLOW_enableSpecification_in_primaryKeyWithName13360);
			enableSpec=enableSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_enableSpecification.add(enableSpec.getTree());
			pushFollow(FOLLOW_validateSpecification_in_primaryKeyWithName13364);
			validateSpec=validateSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_validateSpecification.add(validateSpec.getTree());
			pushFollow(FOLLOW_relySpecification_in_primaryKeyWithName13368);
			relySpec=relySpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_relySpecification.add(relySpec.getTree());
			// AST REWRITE
			// elements: pkCols, validateSpec, idfr, relySpec, enableSpec
			// token labels: 
			// rule labels: validateSpec, idfr, enableSpec, pkCols, relySpec, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_validateSpec=new RewriteRuleSubtreeStream(adaptor,"rule validateSpec",validateSpec!=null?validateSpec.getTree():null);
			RewriteRuleSubtreeStream stream_idfr=new RewriteRuleSubtreeStream(adaptor,"rule idfr",idfr!=null?idfr.getTree():null);
			RewriteRuleSubtreeStream stream_enableSpec=new RewriteRuleSubtreeStream(adaptor,"rule enableSpec",enableSpec!=null?enableSpec.getTree():null);
			RewriteRuleSubtreeStream stream_pkCols=new RewriteRuleSubtreeStream(adaptor,"rule pkCols",pkCols!=null?pkCols.getTree():null);
			RewriteRuleSubtreeStream stream_relySpec=new RewriteRuleSubtreeStream(adaptor,"rule relySpec",relySpec!=null?relySpec.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2183:5: -> ^( TOK_PRIMARY_KEY $pkCols $idfr $relySpec $enableSpec $validateSpec)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2183:8: ^( TOK_PRIMARY_KEY $pkCols $idfr $relySpec $enableSpec $validateSpec)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_PRIMARY_KEY, "TOK_PRIMARY_KEY"), root_1);
				adaptor.addChild(root_1, stream_pkCols.nextTree());
				adaptor.addChild(root_1, stream_idfr.nextTree());
				adaptor.addChild(root_1, stream_relySpec.nextTree());
				adaptor.addChild(root_1, stream_enableSpec.nextTree());
				adaptor.addChild(root_1, stream_validateSpec.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "primaryKeyWithName"


	public static class foreignKeyWithName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "foreignKeyWithName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2186:1: foreignKeyWithName : KW_CONSTRAINT idfr= identifier KW_FOREIGN KW_KEY fkCols= columnParenthesesList KW_REFERENCES tabName= tableName parCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_FOREIGN_KEY $idfr $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec) ;
	public final HiveParser.foreignKeyWithName_return foreignKeyWithName() throws RecognitionException {
		HiveParser.foreignKeyWithName_return retval = new HiveParser.foreignKeyWithName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_CONSTRAINT841=null;
		Token KW_FOREIGN842=null;
		Token KW_KEY843=null;
		Token KW_REFERENCES844=null;
		ParserRuleReturnScope idfr =null;
		ParserRuleReturnScope fkCols =null;
		ParserRuleReturnScope tabName =null;
		ParserRuleReturnScope parCols =null;
		ParserRuleReturnScope enableSpec =null;
		ParserRuleReturnScope validateSpec =null;
		ParserRuleReturnScope relySpec =null;

		ASTNode KW_CONSTRAINT841_tree=null;
		ASTNode KW_FOREIGN842_tree=null;
		ASTNode KW_KEY843_tree=null;
		ASTNode KW_REFERENCES844_tree=null;
		RewriteRuleTokenStream stream_KW_CONSTRAINT=new RewriteRuleTokenStream(adaptor,"token KW_CONSTRAINT");
		RewriteRuleTokenStream stream_KW_REFERENCES=new RewriteRuleTokenStream(adaptor,"token KW_REFERENCES");
		RewriteRuleTokenStream stream_KW_FOREIGN=new RewriteRuleTokenStream(adaptor,"token KW_FOREIGN");
		RewriteRuleTokenStream stream_KW_KEY=new RewriteRuleTokenStream(adaptor,"token KW_KEY");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_enableSpecification=new RewriteRuleSubtreeStream(adaptor,"rule enableSpecification");
		RewriteRuleSubtreeStream stream_columnParenthesesList=new RewriteRuleSubtreeStream(adaptor,"rule columnParenthesesList");
		RewriteRuleSubtreeStream stream_relySpecification=new RewriteRuleSubtreeStream(adaptor,"rule relySpecification");
		RewriteRuleSubtreeStream stream_validateSpecification=new RewriteRuleSubtreeStream(adaptor,"rule validateSpecification");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("foreign key with key name", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2189:5: ( KW_CONSTRAINT idfr= identifier KW_FOREIGN KW_KEY fkCols= columnParenthesesList KW_REFERENCES tabName= tableName parCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_FOREIGN_KEY $idfr $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2189:7: KW_CONSTRAINT idfr= identifier KW_FOREIGN KW_KEY fkCols= columnParenthesesList KW_REFERENCES tabName= tableName parCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification
			{
			KW_CONSTRAINT841=(Token)match(input,KW_CONSTRAINT,FOLLOW_KW_CONSTRAINT_in_foreignKeyWithName13420); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_CONSTRAINT.add(KW_CONSTRAINT841);

			pushFollow(FOLLOW_identifier_in_foreignKeyWithName13424);
			idfr=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(idfr.getTree());
			KW_FOREIGN842=(Token)match(input,KW_FOREIGN,FOLLOW_KW_FOREIGN_in_foreignKeyWithName13426); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOREIGN.add(KW_FOREIGN842);

			KW_KEY843=(Token)match(input,KW_KEY,FOLLOW_KW_KEY_in_foreignKeyWithName13428); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_KEY.add(KW_KEY843);

			pushFollow(FOLLOW_columnParenthesesList_in_foreignKeyWithName13432);
			fkCols=columnParenthesesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnParenthesesList.add(fkCols.getTree());
			KW_REFERENCES844=(Token)match(input,KW_REFERENCES,FOLLOW_KW_REFERENCES_in_foreignKeyWithName13435); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REFERENCES.add(KW_REFERENCES844);

			pushFollow(FOLLOW_tableName_in_foreignKeyWithName13439);
			tabName=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tabName.getTree());
			pushFollow(FOLLOW_columnParenthesesList_in_foreignKeyWithName13443);
			parCols=columnParenthesesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnParenthesesList.add(parCols.getTree());
			pushFollow(FOLLOW_enableSpecification_in_foreignKeyWithName13447);
			enableSpec=enableSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_enableSpecification.add(enableSpec.getTree());
			pushFollow(FOLLOW_validateSpecification_in_foreignKeyWithName13451);
			validateSpec=validateSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_validateSpecification.add(validateSpec.getTree());
			pushFollow(FOLLOW_relySpecification_in_foreignKeyWithName13455);
			relySpec=relySpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_relySpecification.add(relySpec.getTree());
			// AST REWRITE
			// elements: idfr, relySpec, validateSpec, enableSpec, parCols, tabName, fkCols
			// token labels: 
			// rule labels: parCols, tabName, validateSpec, idfr, enableSpec, fkCols, relySpec, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_parCols=new RewriteRuleSubtreeStream(adaptor,"rule parCols",parCols!=null?parCols.getTree():null);
			RewriteRuleSubtreeStream stream_tabName=new RewriteRuleSubtreeStream(adaptor,"rule tabName",tabName!=null?tabName.getTree():null);
			RewriteRuleSubtreeStream stream_validateSpec=new RewriteRuleSubtreeStream(adaptor,"rule validateSpec",validateSpec!=null?validateSpec.getTree():null);
			RewriteRuleSubtreeStream stream_idfr=new RewriteRuleSubtreeStream(adaptor,"rule idfr",idfr!=null?idfr.getTree():null);
			RewriteRuleSubtreeStream stream_enableSpec=new RewriteRuleSubtreeStream(adaptor,"rule enableSpec",enableSpec!=null?enableSpec.getTree():null);
			RewriteRuleSubtreeStream stream_fkCols=new RewriteRuleSubtreeStream(adaptor,"rule fkCols",fkCols!=null?fkCols.getTree():null);
			RewriteRuleSubtreeStream stream_relySpec=new RewriteRuleSubtreeStream(adaptor,"rule relySpec",relySpec!=null?relySpec.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2190:5: -> ^( TOK_FOREIGN_KEY $idfr $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2190:8: ^( TOK_FOREIGN_KEY $idfr $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FOREIGN_KEY, "TOK_FOREIGN_KEY"), root_1);
				adaptor.addChild(root_1, stream_idfr.nextTree());
				adaptor.addChild(root_1, stream_fkCols.nextTree());
				adaptor.addChild(root_1, stream_tabName.nextTree());
				adaptor.addChild(root_1, stream_parCols.nextTree());
				adaptor.addChild(root_1, stream_relySpec.nextTree());
				adaptor.addChild(root_1, stream_enableSpec.nextTree());
				adaptor.addChild(root_1, stream_validateSpec.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "foreignKeyWithName"


	public static class foreignKeyWithoutName_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "foreignKeyWithoutName"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2193:1: foreignKeyWithoutName : KW_FOREIGN KW_KEY fkCols= columnParenthesesList KW_REFERENCES tabName= tableName parCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_FOREIGN_KEY $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec) ;
	public final HiveParser.foreignKeyWithoutName_return foreignKeyWithoutName() throws RecognitionException {
		HiveParser.foreignKeyWithoutName_return retval = new HiveParser.foreignKeyWithoutName_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_FOREIGN845=null;
		Token KW_KEY846=null;
		Token KW_REFERENCES847=null;
		ParserRuleReturnScope fkCols =null;
		ParserRuleReturnScope tabName =null;
		ParserRuleReturnScope parCols =null;
		ParserRuleReturnScope enableSpec =null;
		ParserRuleReturnScope validateSpec =null;
		ParserRuleReturnScope relySpec =null;

		ASTNode KW_FOREIGN845_tree=null;
		ASTNode KW_KEY846_tree=null;
		ASTNode KW_REFERENCES847_tree=null;
		RewriteRuleTokenStream stream_KW_REFERENCES=new RewriteRuleTokenStream(adaptor,"token KW_REFERENCES");
		RewriteRuleTokenStream stream_KW_FOREIGN=new RewriteRuleTokenStream(adaptor,"token KW_FOREIGN");
		RewriteRuleTokenStream stream_KW_KEY=new RewriteRuleTokenStream(adaptor,"token KW_KEY");
		RewriteRuleSubtreeStream stream_enableSpecification=new RewriteRuleSubtreeStream(adaptor,"rule enableSpecification");
		RewriteRuleSubtreeStream stream_columnParenthesesList=new RewriteRuleSubtreeStream(adaptor,"rule columnParenthesesList");
		RewriteRuleSubtreeStream stream_relySpecification=new RewriteRuleSubtreeStream(adaptor,"rule relySpecification");
		RewriteRuleSubtreeStream stream_validateSpecification=new RewriteRuleSubtreeStream(adaptor,"rule validateSpecification");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("foreign key without key name", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2196:5: ( KW_FOREIGN KW_KEY fkCols= columnParenthesesList KW_REFERENCES tabName= tableName parCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification -> ^( TOK_FOREIGN_KEY $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2196:7: KW_FOREIGN KW_KEY fkCols= columnParenthesesList KW_REFERENCES tabName= tableName parCols= columnParenthesesList enableSpec= enableSpecification validateSpec= validateSpecification relySpec= relySpecification
			{
			KW_FOREIGN845=(Token)match(input,KW_FOREIGN,FOLLOW_KW_FOREIGN_in_foreignKeyWithoutName13513); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FOREIGN.add(KW_FOREIGN845);

			KW_KEY846=(Token)match(input,KW_KEY,FOLLOW_KW_KEY_in_foreignKeyWithoutName13515); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_KEY.add(KW_KEY846);

			pushFollow(FOLLOW_columnParenthesesList_in_foreignKeyWithoutName13519);
			fkCols=columnParenthesesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnParenthesesList.add(fkCols.getTree());
			KW_REFERENCES847=(Token)match(input,KW_REFERENCES,FOLLOW_KW_REFERENCES_in_foreignKeyWithoutName13522); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_REFERENCES.add(KW_REFERENCES847);

			pushFollow(FOLLOW_tableName_in_foreignKeyWithoutName13526);
			tabName=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tabName.getTree());
			pushFollow(FOLLOW_columnParenthesesList_in_foreignKeyWithoutName13530);
			parCols=columnParenthesesList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnParenthesesList.add(parCols.getTree());
			pushFollow(FOLLOW_enableSpecification_in_foreignKeyWithoutName13534);
			enableSpec=enableSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_enableSpecification.add(enableSpec.getTree());
			pushFollow(FOLLOW_validateSpecification_in_foreignKeyWithoutName13538);
			validateSpec=validateSpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_validateSpecification.add(validateSpec.getTree());
			pushFollow(FOLLOW_relySpecification_in_foreignKeyWithoutName13542);
			relySpec=relySpecification();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_relySpecification.add(relySpec.getTree());
			// AST REWRITE
			// elements: tabName, enableSpec, parCols, fkCols, validateSpec, relySpec
			// token labels: 
			// rule labels: tabName, parCols, validateSpec, enableSpec, fkCols, relySpec, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_tabName=new RewriteRuleSubtreeStream(adaptor,"rule tabName",tabName!=null?tabName.getTree():null);
			RewriteRuleSubtreeStream stream_parCols=new RewriteRuleSubtreeStream(adaptor,"rule parCols",parCols!=null?parCols.getTree():null);
			RewriteRuleSubtreeStream stream_validateSpec=new RewriteRuleSubtreeStream(adaptor,"rule validateSpec",validateSpec!=null?validateSpec.getTree():null);
			RewriteRuleSubtreeStream stream_enableSpec=new RewriteRuleSubtreeStream(adaptor,"rule enableSpec",enableSpec!=null?enableSpec.getTree():null);
			RewriteRuleSubtreeStream stream_fkCols=new RewriteRuleSubtreeStream(adaptor,"rule fkCols",fkCols!=null?fkCols.getTree():null);
			RewriteRuleSubtreeStream stream_relySpec=new RewriteRuleSubtreeStream(adaptor,"rule relySpec",relySpec!=null?relySpec.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2197:5: -> ^( TOK_FOREIGN_KEY $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2197:8: ^( TOK_FOREIGN_KEY $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FOREIGN_KEY, "TOK_FOREIGN_KEY"), root_1);
				adaptor.addChild(root_1, stream_fkCols.nextTree());
				adaptor.addChild(root_1, stream_tabName.nextTree());
				adaptor.addChild(root_1, stream_parCols.nextTree());
				adaptor.addChild(root_1, stream_relySpec.nextTree());
				adaptor.addChild(root_1, stream_enableSpec.nextTree());
				adaptor.addChild(root_1, stream_validateSpec.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "foreignKeyWithoutName"


	public static class skewedValueElement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedValueElement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2200:1: skewedValueElement : ( skewedColumnValues | skewedColumnValuePairList );
	public final HiveParser.skewedValueElement_return skewedValueElement() throws RecognitionException {
		HiveParser.skewedValueElement_return retval = new HiveParser.skewedValueElement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope skewedColumnValues848 =null;
		ParserRuleReturnScope skewedColumnValuePairList849 =null;


		 pushMsg("skewed value element", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2203:5: ( skewedColumnValues | skewedColumnValuePairList )
			int alt248=2;
			int LA248_0 = input.LA(1);
			if ( (LA248_0==CharSetName||LA248_0==IntegralLiteral||(LA248_0 >= KW_CURRENT_DATE && LA248_0 <= KW_CURRENT_TIMESTAMP)||LA248_0==KW_DATE||LA248_0==KW_FALSE||LA248_0==KW_NULL||LA248_0==KW_TIMESTAMP||LA248_0==KW_TRUE||(LA248_0 >= Number && LA248_0 <= NumberLiteral)||LA248_0==StringLiteral) ) {
				alt248=1;
			}
			else if ( (LA248_0==LPAREN) ) {
				alt248=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 248, 0, input);
				throw nvae;
			}

			switch (alt248) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2204:7: skewedColumnValues
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_skewedColumnValues_in_skewedValueElement13605);
					skewedColumnValues848=skewedColumnValues();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, skewedColumnValues848.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2205:8: skewedColumnValuePairList
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_skewedColumnValuePairList_in_skewedValueElement13614);
					skewedColumnValuePairList849=skewedColumnValuePairList();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, skewedColumnValuePairList849.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedValueElement"


	public static class skewedColumnValuePairList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedColumnValuePairList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2208:1: skewedColumnValuePairList : skewedColumnValuePair ( COMMA skewedColumnValuePair )* -> ^( TOK_TABCOLVALUE_PAIR ( skewedColumnValuePair )+ ) ;
	public final HiveParser.skewedColumnValuePairList_return skewedColumnValuePairList() throws RecognitionException {
		HiveParser.skewedColumnValuePairList_return retval = new HiveParser.skewedColumnValuePairList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA851=null;
		ParserRuleReturnScope skewedColumnValuePair850 =null;
		ParserRuleReturnScope skewedColumnValuePair852 =null;

		ASTNode COMMA851_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_skewedColumnValuePair=new RewriteRuleSubtreeStream(adaptor,"rule skewedColumnValuePair");

		 pushMsg("column value pair list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2211:5: ( skewedColumnValuePair ( COMMA skewedColumnValuePair )* -> ^( TOK_TABCOLVALUE_PAIR ( skewedColumnValuePair )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2211:7: skewedColumnValuePair ( COMMA skewedColumnValuePair )*
			{
			pushFollow(FOLLOW_skewedColumnValuePair_in_skewedColumnValuePairList13641);
			skewedColumnValuePair850=skewedColumnValuePair();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedColumnValuePair.add(skewedColumnValuePair850.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2211:29: ( COMMA skewedColumnValuePair )*
			loop249:
			while (true) {
				int alt249=2;
				int LA249_0 = input.LA(1);
				if ( (LA249_0==COMMA) ) {
					alt249=1;
				}

				switch (alt249) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2211:30: COMMA skewedColumnValuePair
					{
					COMMA851=(Token)match(input,COMMA,FOLLOW_COMMA_in_skewedColumnValuePairList13644); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA851);

					pushFollow(FOLLOW_skewedColumnValuePair_in_skewedColumnValuePairList13646);
					skewedColumnValuePair852=skewedColumnValuePair();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_skewedColumnValuePair.add(skewedColumnValuePair852.getTree());
					}
					break;

				default :
					break loop249;
				}
			}

			// AST REWRITE
			// elements: skewedColumnValuePair
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2211:60: -> ^( TOK_TABCOLVALUE_PAIR ( skewedColumnValuePair )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2211:63: ^( TOK_TABCOLVALUE_PAIR ( skewedColumnValuePair )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLVALUE_PAIR, "TOK_TABCOLVALUE_PAIR"), root_1);
				if ( !(stream_skewedColumnValuePair.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_skewedColumnValuePair.hasNext() ) {
					adaptor.addChild(root_1, stream_skewedColumnValuePair.nextTree());
				}
				stream_skewedColumnValuePair.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedColumnValuePairList"


	public static class skewedColumnValuePair_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedColumnValuePair"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2214:1: skewedColumnValuePair : LPAREN colValues= skewedColumnValues RPAREN -> ^( TOK_TABCOLVALUES $colValues) ;
	public final HiveParser.skewedColumnValuePair_return skewedColumnValuePair() throws RecognitionException {
		HiveParser.skewedColumnValuePair_return retval = new HiveParser.skewedColumnValuePair_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN853=null;
		Token RPAREN854=null;
		ParserRuleReturnScope colValues =null;

		ASTNode LPAREN853_tree=null;
		ASTNode RPAREN854_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleSubtreeStream stream_skewedColumnValues=new RewriteRuleSubtreeStream(adaptor,"rule skewedColumnValues");

		 pushMsg("column value pair", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2217:5: ( LPAREN colValues= skewedColumnValues RPAREN -> ^( TOK_TABCOLVALUES $colValues) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2218:7: LPAREN colValues= skewedColumnValues RPAREN
			{
			LPAREN853=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_skewedColumnValuePair13691); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN853);

			pushFollow(FOLLOW_skewedColumnValues_in_skewedColumnValuePair13695);
			colValues=skewedColumnValues();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedColumnValues.add(colValues.getTree());
			RPAREN854=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_skewedColumnValuePair13697); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN854);

			// AST REWRITE
			// elements: colValues
			// token labels: 
			// rule labels: colValues, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_colValues=new RewriteRuleSubtreeStream(adaptor,"rule colValues",colValues!=null?colValues.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2219:7: -> ^( TOK_TABCOLVALUES $colValues)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2219:10: ^( TOK_TABCOLVALUES $colValues)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLVALUES, "TOK_TABCOLVALUES"), root_1);
				adaptor.addChild(root_1, stream_colValues.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedColumnValuePair"


	public static class skewedColumnValues_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedColumnValues"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2222:1: skewedColumnValues : skewedColumnValue ( COMMA skewedColumnValue )* -> ^( TOK_TABCOLVALUE ( skewedColumnValue )+ ) ;
	public final HiveParser.skewedColumnValues_return skewedColumnValues() throws RecognitionException {
		HiveParser.skewedColumnValues_return retval = new HiveParser.skewedColumnValues_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA856=null;
		ParserRuleReturnScope skewedColumnValue855 =null;
		ParserRuleReturnScope skewedColumnValue857 =null;

		ASTNode COMMA856_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_skewedColumnValue=new RewriteRuleSubtreeStream(adaptor,"rule skewedColumnValue");

		 pushMsg("column values", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2225:5: ( skewedColumnValue ( COMMA skewedColumnValue )* -> ^( TOK_TABCOLVALUE ( skewedColumnValue )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2225:7: skewedColumnValue ( COMMA skewedColumnValue )*
			{
			pushFollow(FOLLOW_skewedColumnValue_in_skewedColumnValues13740);
			skewedColumnValue855=skewedColumnValue();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_skewedColumnValue.add(skewedColumnValue855.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2225:25: ( COMMA skewedColumnValue )*
			loop250:
			while (true) {
				int alt250=2;
				int LA250_0 = input.LA(1);
				if ( (LA250_0==COMMA) ) {
					alt250=1;
				}

				switch (alt250) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2225:26: COMMA skewedColumnValue
					{
					COMMA856=(Token)match(input,COMMA,FOLLOW_COMMA_in_skewedColumnValues13743); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA856);

					pushFollow(FOLLOW_skewedColumnValue_in_skewedColumnValues13745);
					skewedColumnValue857=skewedColumnValue();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_skewedColumnValue.add(skewedColumnValue857.getTree());
					}
					break;

				default :
					break loop250;
				}
			}

			// AST REWRITE
			// elements: skewedColumnValue
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2225:52: -> ^( TOK_TABCOLVALUE ( skewedColumnValue )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2225:55: ^( TOK_TABCOLVALUE ( skewedColumnValue )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLVALUE, "TOK_TABCOLVALUE"), root_1);
				if ( !(stream_skewedColumnValue.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_skewedColumnValue.hasNext() ) {
					adaptor.addChild(root_1, stream_skewedColumnValue.nextTree());
				}
				stream_skewedColumnValue.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedColumnValues"


	public static class skewedColumnValue_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedColumnValue"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2228:1: skewedColumnValue : constant ;
	public final HiveParser.skewedColumnValue_return skewedColumnValue() throws RecognitionException {
		HiveParser.skewedColumnValue_return retval = new HiveParser.skewedColumnValue_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope constant858 =null;


		 pushMsg("column value", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2231:5: ( constant )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2232:7: constant
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_constant_in_skewedColumnValue13789);
			constant858=constant();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, constant858.getTree());

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedColumnValue"


	public static class skewedValueLocationElement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "skewedValueLocationElement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2235:1: skewedValueLocationElement : ( skewedColumnValue | skewedColumnValuePair );
	public final HiveParser.skewedValueLocationElement_return skewedValueLocationElement() throws RecognitionException {
		HiveParser.skewedValueLocationElement_return retval = new HiveParser.skewedValueLocationElement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope skewedColumnValue859 =null;
		ParserRuleReturnScope skewedColumnValuePair860 =null;


		 pushMsg("skewed value location element", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2238:5: ( skewedColumnValue | skewedColumnValuePair )
			int alt251=2;
			int LA251_0 = input.LA(1);
			if ( (LA251_0==CharSetName||LA251_0==IntegralLiteral||(LA251_0 >= KW_CURRENT_DATE && LA251_0 <= KW_CURRENT_TIMESTAMP)||LA251_0==KW_DATE||LA251_0==KW_FALSE||LA251_0==KW_NULL||LA251_0==KW_TIMESTAMP||LA251_0==KW_TRUE||(LA251_0 >= Number && LA251_0 <= NumberLiteral)||LA251_0==StringLiteral) ) {
				alt251=1;
			}
			else if ( (LA251_0==LPAREN) ) {
				alt251=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 251, 0, input);
				throw nvae;
			}

			switch (alt251) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2239:7: skewedColumnValue
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_skewedColumnValue_in_skewedValueLocationElement13823);
					skewedColumnValue859=skewedColumnValue();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, skewedColumnValue859.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2240:8: skewedColumnValuePair
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_skewedColumnValuePair_in_skewedValueLocationElement13832);
					skewedColumnValuePair860=skewedColumnValuePair();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, skewedColumnValuePair860.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "skewedValueLocationElement"


	public static class orderSpecification_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "orderSpecification"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2243:1: orderSpecification : ( KW_ASC | KW_DESC );
	public final HiveParser.orderSpecification_return orderSpecification() throws RecognitionException {
		HiveParser.orderSpecification_return retval = new HiveParser.orderSpecification_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token set861=null;

		ASTNode set861_tree=null;

		 pushMsg("order specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2246:5: ( KW_ASC | KW_DESC )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:
			{
			root_0 = (ASTNode)adaptor.nil();


			set861=input.LT(1);
			if ( input.LA(1)==KW_ASC||input.LA(1)==KW_DESC ) {
				input.consume();
				if ( state.backtracking==0 ) adaptor.addChild(root_0, (ASTNode)adaptor.create(set861));
				state.errorRecovery=false;
				state.failed=false;
			}
			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "orderSpecification"


	public static class nullOrdering_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "nullOrdering"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2248:1: nullOrdering : ( KW_NULLS KW_FIRST -> ^( TOK_NULLS_FIRST ) | KW_NULLS KW_LAST -> ^( TOK_NULLS_LAST ) );
	public final HiveParser.nullOrdering_return nullOrdering() throws RecognitionException {
		HiveParser.nullOrdering_return retval = new HiveParser.nullOrdering_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_NULLS862=null;
		Token KW_FIRST863=null;
		Token KW_NULLS864=null;
		Token KW_LAST865=null;

		ASTNode KW_NULLS862_tree=null;
		ASTNode KW_FIRST863_tree=null;
		ASTNode KW_NULLS864_tree=null;
		ASTNode KW_LAST865_tree=null;
		RewriteRuleTokenStream stream_KW_FIRST=new RewriteRuleTokenStream(adaptor,"token KW_FIRST");
		RewriteRuleTokenStream stream_KW_NULLS=new RewriteRuleTokenStream(adaptor,"token KW_NULLS");
		RewriteRuleTokenStream stream_KW_LAST=new RewriteRuleTokenStream(adaptor,"token KW_LAST");

		 pushMsg("nulls ordering", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2251:5: ( KW_NULLS KW_FIRST -> ^( TOK_NULLS_FIRST ) | KW_NULLS KW_LAST -> ^( TOK_NULLS_LAST ) )
			int alt252=2;
			int LA252_0 = input.LA(1);
			if ( (LA252_0==KW_NULLS) ) {
				int LA252_1 = input.LA(2);
				if ( (LA252_1==KW_FIRST) ) {
					alt252=1;
				}
				else if ( (LA252_1==KW_LAST) ) {
					alt252=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 252, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 252, 0, input);
				throw nvae;
			}

			switch (alt252) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2251:7: KW_NULLS KW_FIRST
					{
					KW_NULLS862=(Token)match(input,KW_NULLS,FOLLOW_KW_NULLS_in_nullOrdering13886); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NULLS.add(KW_NULLS862);

					KW_FIRST863=(Token)match(input,KW_FIRST,FOLLOW_KW_FIRST_in_nullOrdering13888); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_FIRST.add(KW_FIRST863);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2251:25: -> ^( TOK_NULLS_FIRST )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2251:28: ^( TOK_NULLS_FIRST )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_FIRST, "TOK_NULLS_FIRST"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2252:7: KW_NULLS KW_LAST
					{
					KW_NULLS864=(Token)match(input,KW_NULLS,FOLLOW_KW_NULLS_in_nullOrdering13902); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_NULLS.add(KW_NULLS864);

					KW_LAST865=(Token)match(input,KW_LAST,FOLLOW_KW_LAST_in_nullOrdering13904); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LAST.add(KW_LAST865);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2252:24: -> ^( TOK_NULLS_LAST )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2252:27: ^( TOK_NULLS_LAST )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_LAST, "TOK_NULLS_LAST"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "nullOrdering"


	public static class columnNameOrder_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameOrder"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2255:1: columnNameOrder : identifier (orderSpec= orderSpecification )? (nullSpec= nullOrdering )? -> {$orderSpec.tree == null && $nullSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) ) -> {$orderSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_DESC}? ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST identifier ) ) -> {$orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) ) -> ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec identifier ) ) ;
	public final HiveParser.columnNameOrder_return columnNameOrder() throws RecognitionException {
		HiveParser.columnNameOrder_return retval = new HiveParser.columnNameOrder_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope orderSpec =null;
		ParserRuleReturnScope nullSpec =null;
		ParserRuleReturnScope identifier866 =null;

		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_nullOrdering=new RewriteRuleSubtreeStream(adaptor,"rule nullOrdering");
		RewriteRuleSubtreeStream stream_orderSpecification=new RewriteRuleSubtreeStream(adaptor,"rule orderSpecification");

		 pushMsg("column name order", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2258:5: ( identifier (orderSpec= orderSpecification )? (nullSpec= nullOrdering )? -> {$orderSpec.tree == null && $nullSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) ) -> {$orderSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_DESC}? ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST identifier ) ) -> {$orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) ) -> ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec identifier ) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2258:7: identifier (orderSpec= orderSpecification )? (nullSpec= nullOrdering )?
			{
			pushFollow(FOLLOW_identifier_in_columnNameOrder13937);
			identifier866=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(identifier866.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2258:27: (orderSpec= orderSpecification )?
			int alt253=2;
			int LA253_0 = input.LA(1);
			if ( (LA253_0==KW_ASC||LA253_0==KW_DESC) ) {
				alt253=1;
			}
			switch (alt253) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2258:27: orderSpec= orderSpecification
					{
					pushFollow(FOLLOW_orderSpecification_in_columnNameOrder13941);
					orderSpec=orderSpecification();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_orderSpecification.add(orderSpec.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2258:56: (nullSpec= nullOrdering )?
			int alt254=2;
			int LA254_0 = input.LA(1);
			if ( (LA254_0==KW_NULLS) ) {
				alt254=1;
			}
			switch (alt254) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2258:56: nullSpec= nullOrdering
					{
					pushFollow(FOLLOW_nullOrdering_in_columnNameOrder13946);
					nullSpec=nullOrdering();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_nullOrdering.add(nullSpec.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: nullSpec, nullSpec, identifier, identifier, identifier, identifier, identifier, identifier, nullSpec
			// token labels: 
			// rule labels: nullSpec, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_nullSpec=new RewriteRuleSubtreeStream(adaptor,"rule nullSpec",nullSpec!=null?nullSpec.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2259:5: -> {$orderSpec.tree == null && $nullSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) )
			if ((orderSpec!=null?((ASTNode)orderSpec.getTree()):null) == null && (nullSpec!=null?((ASTNode)nullSpec.getTree()):null) == null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2260:13: ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2260:37: ^( TOK_NULLS_FIRST identifier )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_FIRST, "TOK_NULLS_FIRST"), root_2);
				adaptor.addChild(root_2, stream_identifier.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2261:5: -> {$orderSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) )
			if ((orderSpec!=null?((ASTNode)orderSpec.getTree()):null) == null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2262:13: ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2262:37: ^( $nullSpec identifier )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot(stream_nullSpec.nextNode(), root_2);
				adaptor.addChild(root_2, stream_identifier.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2263:5: -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) )
			if ((nullSpec!=null?((ASTNode)nullSpec.getTree()):null) == null && (orderSpec!=null?((ASTNode)orderSpec.getTree()):null).getType()==HiveParser.KW_ASC) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2264:13: ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST identifier ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2264:37: ^( TOK_NULLS_FIRST identifier )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_FIRST, "TOK_NULLS_FIRST"), root_2);
				adaptor.addChild(root_2, stream_identifier.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2265:5: -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_DESC}? ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST identifier ) )
			if ((nullSpec!=null?((ASTNode)nullSpec.getTree()):null) == null && (orderSpec!=null?((ASTNode)orderSpec.getTree()):null).getType()==HiveParser.KW_DESC) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2266:13: ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST identifier ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEDESC, "TOK_TABSORTCOLNAMEDESC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2266:38: ^( TOK_NULLS_LAST identifier )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_LAST, "TOK_NULLS_LAST"), root_2);
				adaptor.addChild(root_2, stream_identifier.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2267:5: -> {$orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) )
			if ((orderSpec!=null?((ASTNode)orderSpec.getTree()):null).getType()==HiveParser.KW_ASC) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2268:13: ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec identifier ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2268:37: ^( $nullSpec identifier )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot(stream_nullSpec.nextNode(), root_2);
				adaptor.addChild(root_2, stream_identifier.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2269:5: -> ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec identifier ) )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2269:8: ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec identifier ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEDESC, "TOK_TABSORTCOLNAMEDESC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2269:33: ^( $nullSpec identifier )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot(stream_nullSpec.nextNode(), root_2);
				adaptor.addChild(root_2, stream_identifier.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameOrder"


	public static class columnNameCommentList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameCommentList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2272:1: columnNameCommentList : columnNameComment ( COMMA columnNameComment )* -> ^( TOK_TABCOLNAME ( columnNameComment )+ ) ;
	public final HiveParser.columnNameCommentList_return columnNameCommentList() throws RecognitionException {
		HiveParser.columnNameCommentList_return retval = new HiveParser.columnNameCommentList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA868=null;
		ParserRuleReturnScope columnNameComment867 =null;
		ParserRuleReturnScope columnNameComment869 =null;

		ASTNode COMMA868_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_columnNameComment=new RewriteRuleSubtreeStream(adaptor,"rule columnNameComment");

		 pushMsg("column name comment list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2275:5: ( columnNameComment ( COMMA columnNameComment )* -> ^( TOK_TABCOLNAME ( columnNameComment )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2275:7: columnNameComment ( COMMA columnNameComment )*
			{
			pushFollow(FOLLOW_columnNameComment_in_columnNameCommentList14143);
			columnNameComment867=columnNameComment();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameComment.add(columnNameComment867.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2275:25: ( COMMA columnNameComment )*
			loop255:
			while (true) {
				int alt255=2;
				int LA255_0 = input.LA(1);
				if ( (LA255_0==COMMA) ) {
					alt255=1;
				}

				switch (alt255) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2275:26: COMMA columnNameComment
					{
					COMMA868=(Token)match(input,COMMA,FOLLOW_COMMA_in_columnNameCommentList14146); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA868);

					pushFollow(FOLLOW_columnNameComment_in_columnNameCommentList14148);
					columnNameComment869=columnNameComment();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnNameComment.add(columnNameComment869.getTree());
					}
					break;

				default :
					break loop255;
				}
			}

			// AST REWRITE
			// elements: columnNameComment
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2275:52: -> ^( TOK_TABCOLNAME ( columnNameComment )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2275:55: ^( TOK_TABCOLNAME ( columnNameComment )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOLNAME, "TOK_TABCOLNAME"), root_1);
				if ( !(stream_columnNameComment.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_columnNameComment.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameComment.nextTree());
				}
				stream_columnNameComment.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameCommentList"


	public static class columnNameComment_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameComment"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2278:1: columnNameComment : colName= identifier ( KW_COMMENT comment= StringLiteral )? -> ^( TOK_TABCOL $colName TOK_NULL ( $comment)? ) ;
	public final HiveParser.columnNameComment_return columnNameComment() throws RecognitionException {
		HiveParser.columnNameComment_return retval = new HiveParser.columnNameComment_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_COMMENT870=null;
		ParserRuleReturnScope colName =null;

		ASTNode comment_tree=null;
		ASTNode KW_COMMENT870_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 pushMsg("column name comment", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2281:5: (colName= identifier ( KW_COMMENT comment= StringLiteral )? -> ^( TOK_TABCOL $colName TOK_NULL ( $comment)? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2281:7: colName= identifier ( KW_COMMENT comment= StringLiteral )?
			{
			pushFollow(FOLLOW_identifier_in_columnNameComment14188);
			colName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(colName.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2281:26: ( KW_COMMENT comment= StringLiteral )?
			int alt256=2;
			int LA256_0 = input.LA(1);
			if ( (LA256_0==KW_COMMENT) ) {
				alt256=1;
			}
			switch (alt256) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2281:27: KW_COMMENT comment= StringLiteral
					{
					KW_COMMENT870=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_columnNameComment14191); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT870);

					comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_columnNameComment14195); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

					}
					break;

			}

			// AST REWRITE
			// elements: comment, colName
			// token labels: comment
			// rule labels: colName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_colName=new RewriteRuleSubtreeStream(adaptor,"rule colName",colName!=null?colName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2282:5: -> ^( TOK_TABCOL $colName TOK_NULL ( $comment)? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2282:8: ^( TOK_TABCOL $colName TOK_NULL ( $comment)? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOL, "TOK_TABCOL"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, (ASTNode)adaptor.create(TOK_NULL, "TOK_NULL"));
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2282:40: ( $comment)?
				if ( stream_comment.hasNext() ) {
					adaptor.addChild(root_1, stream_comment.nextNode());
				}
				stream_comment.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameComment"


	public static class columnRefOrder_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnRefOrder"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2285:1: columnRefOrder : expression (orderSpec= orderSpecification )? (nullSpec= nullOrdering )? -> {$orderSpec.tree == null && $nullSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) ) -> {$orderSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_DESC}? ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST expression ) ) -> {$orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) ) -> ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec expression ) ) ;
	public final HiveParser.columnRefOrder_return columnRefOrder() throws RecognitionException {
		HiveParser.columnRefOrder_return retval = new HiveParser.columnRefOrder_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope orderSpec =null;
		ParserRuleReturnScope nullSpec =null;
		ParserRuleReturnScope expression871 =null;

		RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
		RewriteRuleSubtreeStream stream_nullOrdering=new RewriteRuleSubtreeStream(adaptor,"rule nullOrdering");
		RewriteRuleSubtreeStream stream_orderSpecification=new RewriteRuleSubtreeStream(adaptor,"rule orderSpecification");

		 pushMsg("column order", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2288:5: ( expression (orderSpec= orderSpecification )? (nullSpec= nullOrdering )? -> {$orderSpec.tree == null && $nullSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) ) -> {$orderSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) ) -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_DESC}? ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST expression ) ) -> {$orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) ) -> ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec expression ) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2288:7: expression (orderSpec= orderSpecification )? (nullSpec= nullOrdering )?
			{
			pushFollow(FOLLOW_expression_in_columnRefOrder14243);
			expression871=expression();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_expression.add(expression871.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2288:27: (orderSpec= orderSpecification )?
			int alt257=2;
			int LA257_0 = input.LA(1);
			if ( (LA257_0==KW_ASC||LA257_0==KW_DESC) ) {
				alt257=1;
			}
			switch (alt257) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2288:27: orderSpec= orderSpecification
					{
					pushFollow(FOLLOW_orderSpecification_in_columnRefOrder14247);
					orderSpec=orderSpecification();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_orderSpecification.add(orderSpec.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2288:56: (nullSpec= nullOrdering )?
			int alt258=2;
			int LA258_0 = input.LA(1);
			if ( (LA258_0==KW_NULLS) ) {
				alt258=1;
			}
			switch (alt258) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2288:56: nullSpec= nullOrdering
					{
					pushFollow(FOLLOW_nullOrdering_in_columnRefOrder14252);
					nullSpec=nullOrdering();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_nullOrdering.add(nullSpec.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: expression, expression, expression, nullSpec, expression, nullSpec, expression, expression, nullSpec
			// token labels: 
			// rule labels: nullSpec, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_nullSpec=new RewriteRuleSubtreeStream(adaptor,"rule nullSpec",nullSpec!=null?nullSpec.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2289:5: -> {$orderSpec.tree == null && $nullSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) )
			if ((orderSpec!=null?((ASTNode)orderSpec.getTree()):null) == null && (nullSpec!=null?((ASTNode)nullSpec.getTree()):null) == null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2290:13: ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2290:37: ^( TOK_NULLS_FIRST expression )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_FIRST, "TOK_NULLS_FIRST"), root_2);
				adaptor.addChild(root_2, stream_expression.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2291:5: -> {$orderSpec.tree == null}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) )
			if ((orderSpec!=null?((ASTNode)orderSpec.getTree()):null) == null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2292:13: ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2292:37: ^( $nullSpec expression )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot(stream_nullSpec.nextNode(), root_2);
				adaptor.addChild(root_2, stream_expression.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2293:5: -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) )
			if ((nullSpec!=null?((ASTNode)nullSpec.getTree()):null) == null && (orderSpec!=null?((ASTNode)orderSpec.getTree()):null).getType()==HiveParser.KW_ASC) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2294:13: ^( TOK_TABSORTCOLNAMEASC ^( TOK_NULLS_FIRST expression ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2294:37: ^( TOK_NULLS_FIRST expression )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_FIRST, "TOK_NULLS_FIRST"), root_2);
				adaptor.addChild(root_2, stream_expression.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2295:5: -> {$nullSpec.tree == null && $orderSpec.tree.getType()==HiveParser.KW_DESC}? ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST expression ) )
			if ((nullSpec!=null?((ASTNode)nullSpec.getTree()):null) == null && (orderSpec!=null?((ASTNode)orderSpec.getTree()):null).getType()==HiveParser.KW_DESC) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2296:13: ^( TOK_TABSORTCOLNAMEDESC ^( TOK_NULLS_LAST expression ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEDESC, "TOK_TABSORTCOLNAMEDESC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2296:38: ^( TOK_NULLS_LAST expression )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NULLS_LAST, "TOK_NULLS_LAST"), root_2);
				adaptor.addChild(root_2, stream_expression.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2297:5: -> {$orderSpec.tree.getType()==HiveParser.KW_ASC}? ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) )
			if ((orderSpec!=null?((ASTNode)orderSpec.getTree()):null).getType()==HiveParser.KW_ASC) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2298:13: ^( TOK_TABSORTCOLNAMEASC ^( $nullSpec expression ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEASC, "TOK_TABSORTCOLNAMEASC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2298:37: ^( $nullSpec expression )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot(stream_nullSpec.nextNode(), root_2);
				adaptor.addChild(root_2, stream_expression.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2299:5: -> ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec expression ) )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2299:8: ^( TOK_TABSORTCOLNAMEDESC ^( $nullSpec expression ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABSORTCOLNAMEDESC, "TOK_TABSORTCOLNAMEDESC"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2299:33: ^( $nullSpec expression )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot(stream_nullSpec.nextNode(), root_2);
				adaptor.addChild(root_2, stream_expression.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnRefOrder"


	public static class columnNameType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2302:1: columnNameType : colName= identifier colType ( KW_COMMENT comment= StringLiteral )? -> {containExcludedCharForCreateTableColumnName($colName.text)}? -> {$comment == null}? ^( TOK_TABCOL $colName colType ) -> ^( TOK_TABCOL $colName colType $comment) ;
	public final HiveParser.columnNameType_return columnNameType() throws RecognitionException {
		HiveParser.columnNameType_return retval = new HiveParser.columnNameType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token KW_COMMENT873=null;
		ParserRuleReturnScope colName =null;
		ParserRuleReturnScope colType872 =null;

		ASTNode comment_tree=null;
		ASTNode KW_COMMENT873_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_colType=new RewriteRuleSubtreeStream(adaptor,"rule colType");

		 pushMsg("column specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2305:5: (colName= identifier colType ( KW_COMMENT comment= StringLiteral )? -> {containExcludedCharForCreateTableColumnName($colName.text)}? -> {$comment == null}? ^( TOK_TABCOL $colName colType ) -> ^( TOK_TABCOL $colName colType $comment) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2305:7: colName= identifier colType ( KW_COMMENT comment= StringLiteral )?
			{
			pushFollow(FOLLOW_identifier_in_columnNameType14451);
			colName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(colName.getTree());
			pushFollow(FOLLOW_colType_in_columnNameType14453);
			colType872=colType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_colType.add(colType872.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2305:34: ( KW_COMMENT comment= StringLiteral )?
			int alt259=2;
			int LA259_0 = input.LA(1);
			if ( (LA259_0==KW_COMMENT) ) {
				alt259=1;
			}
			switch (alt259) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2305:35: KW_COMMENT comment= StringLiteral
					{
					KW_COMMENT873=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_columnNameType14456); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT873);

					comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_columnNameType14460); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

					}
					break;

			}

			// AST REWRITE
			// elements: colType, comment, colName, colName, colType
			// token labels: comment
			// rule labels: colName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_colName=new RewriteRuleSubtreeStream(adaptor,"rule colName",colName!=null?colName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2306:5: -> {containExcludedCharForCreateTableColumnName($colName.text)}?
			if (containExcludedCharForCreateTableColumnName((colName!=null?input.toString(colName.start,colName.stop):null))) {
				adaptor.addChild(root_0, throwColumnNameException());
			}

			else // 2307:5: -> {$comment == null}? ^( TOK_TABCOL $colName colType )
			if (comment == null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2307:28: ^( TOK_TABCOL $colName colType )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOL, "TOK_TABCOL"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, stream_colType.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2308:5: -> ^( TOK_TABCOL $colName colType $comment)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2308:28: ^( TOK_TABCOL $colName colType $comment)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOL, "TOK_TABCOL"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, stream_colType.nextTree());
				adaptor.addChild(root_1, stream_comment.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameType"


	public static class columnNameTypeOrPKOrFK_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameTypeOrPKOrFK"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2311:1: columnNameTypeOrPKOrFK : ( ( foreignKeyWithName ) | ( primaryKeyWithName ) | ( primaryKeyWithoutName ) | ( foreignKeyWithoutName ) | ( columnNameType ) );
	public final HiveParser.columnNameTypeOrPKOrFK_return columnNameTypeOrPKOrFK() throws RecognitionException {
		HiveParser.columnNameTypeOrPKOrFK_return retval = new HiveParser.columnNameTypeOrPKOrFK_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope foreignKeyWithName874 =null;
		ParserRuleReturnScope primaryKeyWithName875 =null;
		ParserRuleReturnScope primaryKeyWithoutName876 =null;
		ParserRuleReturnScope foreignKeyWithoutName877 =null;
		ParserRuleReturnScope columnNameType878 =null;


		 pushMsg("column name or primary key or foreign key", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2314:5: ( ( foreignKeyWithName ) | ( primaryKeyWithName ) | ( primaryKeyWithoutName ) | ( foreignKeyWithoutName ) | ( columnNameType ) )
			int alt260=5;
			switch ( input.LA(1) ) {
			case KW_CONSTRAINT:
				{
				int LA260_1 = input.LA(2);
				if ( (LA260_1==Identifier) ) {
					int LA260_6 = input.LA(3);
					if ( (LA260_6==KW_FOREIGN) ) {
						alt260=1;
					}
					else if ( (LA260_6==KW_PRIMARY) ) {
						alt260=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 260, 6, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}
				else if ( ((LA260_1 >= KW_ABORT && LA260_1 <= KW_AFTER)||LA260_1==KW_ANALYZE||LA260_1==KW_ARCHIVE||LA260_1==KW_ASC||(LA260_1 >= KW_AUTOCOMMIT && LA260_1 <= KW_BEFORE)||(LA260_1 >= KW_BUCKET && LA260_1 <= KW_BUCKETS)||(LA260_1 >= KW_CACHE && LA260_1 <= KW_CASCADE)||LA260_1==KW_CHANGE||(LA260_1 >= KW_CLUSTER && LA260_1 <= KW_COLLECTION)||(LA260_1 >= KW_COLUMNS && LA260_1 <= KW_COMMENT)||(LA260_1 >= KW_COMPACT && LA260_1 <= KW_CONCATENATE)||LA260_1==KW_CONTINUE||LA260_1==KW_DATA||LA260_1==KW_DATABASES||(LA260_1 >= KW_DATETIME && LA260_1 <= KW_DBPROPERTIES)||(LA260_1 >= KW_DEFERRED && LA260_1 <= KW_DEFINED)||(LA260_1 >= KW_DELIMITED && LA260_1 <= KW_DESC)||(LA260_1 >= KW_DETAIL && LA260_1 <= KW_DISABLE)||LA260_1==KW_DISTRIBUTE||LA260_1==KW_DOW||(LA260_1 >= KW_DUMP && LA260_1 <= KW_ELEM_TYPE)||LA260_1==KW_ENABLE||LA260_1==KW_ESCAPED||LA260_1==KW_EXCLUSIVE||(LA260_1 >= KW_EXPLAIN && LA260_1 <= KW_EXPRESSION)||(LA260_1 >= KW_FIELDS && LA260_1 <= KW_FIRST)||(LA260_1 >= KW_FORMAT && LA260_1 <= KW_FORMATTED)||LA260_1==KW_FUNCTIONS||(LA260_1 >= KW_HOUR && LA260_1 <= KW_IDXPROPERTIES)||(LA260_1 >= KW_INDEX && LA260_1 <= KW_INDEXES)||(LA260_1 >= KW_INPATH && LA260_1 <= KW_INPUTFORMAT)||(LA260_1 >= KW_ISOLATION && LA260_1 <= KW_JAR)||(LA260_1 >= KW_KEY && LA260_1 <= KW_LAST)||LA260_1==KW_LEVEL||(LA260_1 >= KW_LIMIT && LA260_1 <= KW_LOAD)||(LA260_1 >= KW_LOCATION && LA260_1 <= KW_LONG)||(LA260_1 >= KW_MAPJOIN && LA260_1 <= KW_MATERIALIZED)||LA260_1==KW_METADATA||(LA260_1 >= KW_MINUTE && LA260_1 <= KW_MONTH)||LA260_1==KW_MSCK||(LA260_1 >= KW_NORELY && LA260_1 <= KW_NOSCAN)||LA260_1==KW_NOVALIDATE||LA260_1==KW_NULLS||LA260_1==KW_OFFSET||(LA260_1 >= KW_OPERATOR && LA260_1 <= KW_OPTION)||(LA260_1 >= KW_OUTPUTDRIVER && LA260_1 <= KW_OUTPUTFORMAT)||(LA260_1 >= KW_OVERWRITE && LA260_1 <= KW_OWNER)||(LA260_1 >= KW_PARTITIONED && LA260_1 <= KW_PARTITIONS)||LA260_1==KW_PLUS||LA260_1==KW_PRETTY||LA260_1==KW_PRINCIPALS||(LA260_1 >= KW_PURGE && LA260_1 <= KW_QUARTER)||LA260_1==KW_READ||(LA260_1 >= KW_REBUILD && LA260_1 <= KW_RECORDWRITER)||(LA260_1 >= KW_RELOAD && LA260_1 <= KW_RESTRICT)||LA260_1==KW_REWRITE||(LA260_1 >= KW_ROLE && LA260_1 <= KW_ROLES)||(LA260_1 >= KW_SCHEMA && LA260_1 <= KW_SECOND)||(LA260_1 >= KW_SEMI && LA260_1 <= KW_SERVER)||(LA260_1 >= KW_SETS && LA260_1 <= KW_SKEWED)||(LA260_1 >= KW_SNAPSHOT && LA260_1 <= KW_SSL)||(LA260_1 >= KW_STATISTICS && LA260_1 <= KW_SUMMARY)||LA260_1==KW_TABLES||(LA260_1 >= KW_TBLPROPERTIES && LA260_1 <= KW_TERMINATED)||LA260_1==KW_TINYINT||(LA260_1 >= KW_TOUCH && LA260_1 <= KW_TRANSACTIONS)||LA260_1==KW_UNARCHIVE||LA260_1==KW_UNDO||LA260_1==KW_UNIONTYPE||(LA260_1 >= KW_UNLOCK && LA260_1 <= KW_UNSIGNED)||(LA260_1 >= KW_URI && LA260_1 <= KW_USE)||(LA260_1 >= KW_UTC && LA260_1 <= KW_VALIDATE)||LA260_1==KW_VALUE_TYPE||(LA260_1 >= KW_VECTORIZATION && LA260_1 <= KW_WEEK)||LA260_1==KW_WHILE||(LA260_1 >= KW_WORK && LA260_1 <= KW_YEAR)||LA260_1==KW_BATCH||LA260_1==KW_DAYOFWEEK||LA260_1==KW_HOLD_DDLTIME||LA260_1==KW_IGNORE||LA260_1==KW_NO_DROP||LA260_1==KW_OFFLINE||LA260_1==KW_PROTECTION||LA260_1==KW_READONLY) ) {
					int LA260_7 = input.LA(3);
					if ( (LA260_7==KW_FOREIGN) ) {
						alt260=1;
					}
					else if ( (LA260_7==KW_PRIMARY) ) {
						alt260=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 260, 7, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 260, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_PRIMARY:
				{
				alt260=3;
				}
				break;
			case KW_FOREIGN:
				{
				alt260=4;
				}
				break;
			case Identifier:
			case KW_ABORT:
			case KW_ADD:
			case KW_ADMIN:
			case KW_AFTER:
			case KW_ANALYZE:
			case KW_ARCHIVE:
			case KW_ASC:
			case KW_AUTOCOMMIT:
			case KW_BEFORE:
			case KW_BUCKET:
			case KW_BUCKETS:
			case KW_CACHE:
			case KW_CASCADE:
			case KW_CHANGE:
			case KW_CLUSTER:
			case KW_CLUSTERED:
			case KW_CLUSTERSTATUS:
			case KW_COLLECTION:
			case KW_COLUMNS:
			case KW_COMMENT:
			case KW_COMPACT:
			case KW_COMPACTIONS:
			case KW_COMPUTE:
			case KW_CONCATENATE:
			case KW_CONTINUE:
			case KW_DATA:
			case KW_DATABASES:
			case KW_DATETIME:
			case KW_DAY:
			case KW_DBPROPERTIES:
			case KW_DEFERRED:
			case KW_DEFINED:
			case KW_DELIMITED:
			case KW_DEPENDENCY:
			case KW_DESC:
			case KW_DETAIL:
			case KW_DIRECTORIES:
			case KW_DIRECTORY:
			case KW_DISABLE:
			case KW_DISTRIBUTE:
			case KW_DOW:
			case KW_DUMP:
			case KW_ELEM_TYPE:
			case KW_ENABLE:
			case KW_ESCAPED:
			case KW_EXCLUSIVE:
			case KW_EXPLAIN:
			case KW_EXPORT:
			case KW_EXPRESSION:
			case KW_FIELDS:
			case KW_FILE:
			case KW_FILEFORMAT:
			case KW_FIRST:
			case KW_FORMAT:
			case KW_FORMATTED:
			case KW_FUNCTIONS:
			case KW_HOUR:
			case KW_IDXPROPERTIES:
			case KW_INDEX:
			case KW_INDEXES:
			case KW_INPATH:
			case KW_INPUTDRIVER:
			case KW_INPUTFORMAT:
			case KW_ISOLATION:
			case KW_ITEMS:
			case KW_JAR:
			case KW_KEY:
			case KW_KEYS:
			case KW_KEY_TYPE:
			case KW_LAST:
			case KW_LEVEL:
			case KW_LIMIT:
			case KW_LINES:
			case KW_LOAD:
			case KW_LOCATION:
			case KW_LOCK:
			case KW_LOCKS:
			case KW_LOGICAL:
			case KW_LONG:
			case KW_MAPJOIN:
			case KW_MATCHED:
			case KW_MATERIALIZED:
			case KW_METADATA:
			case KW_MINUTE:
			case KW_MONTH:
			case KW_MSCK:
			case KW_NORELY:
			case KW_NOSCAN:
			case KW_NOVALIDATE:
			case KW_NULLS:
			case KW_OFFSET:
			case KW_OPERATOR:
			case KW_OPTION:
			case KW_OUTPUTDRIVER:
			case KW_OUTPUTFORMAT:
			case KW_OVERWRITE:
			case KW_OWNER:
			case KW_PARTITIONED:
			case KW_PARTITIONS:
			case KW_PLUS:
			case KW_PRETTY:
			case KW_PRINCIPALS:
			case KW_PURGE:
			case KW_QUARTER:
			case KW_READ:
			case KW_REBUILD:
			case KW_RECORDREADER:
			case KW_RECORDWRITER:
			case KW_RELOAD:
			case KW_RELY:
			case KW_RENAME:
			case KW_REPAIR:
			case KW_REPL:
			case KW_REPLACE:
			case KW_REPLICATION:
			case KW_RESTRICT:
			case KW_REWRITE:
			case KW_ROLE:
			case KW_ROLES:
			case KW_SCHEMA:
			case KW_SCHEMAS:
			case KW_SECOND:
			case KW_SEMI:
			case KW_SERDE:
			case KW_SERDEPROPERTIES:
			case KW_SERVER:
			case KW_SETS:
			case KW_SHARED:
			case KW_SHOW:
			case KW_SHOW_DATABASE:
			case KW_SKEWED:
			case KW_SNAPSHOT:
			case KW_SORT:
			case KW_SORTED:
			case KW_SSL:
			case KW_STATISTICS:
			case KW_STATUS:
			case KW_STORED:
			case KW_STREAMTABLE:
			case KW_STRING:
			case KW_STRUCT:
			case KW_SUMMARY:
			case KW_TABLES:
			case KW_TBLPROPERTIES:
			case KW_TEMPORARY:
			case KW_TERMINATED:
			case KW_TINYINT:
			case KW_TOUCH:
			case KW_TRANSACTION:
			case KW_TRANSACTIONS:
			case KW_UNARCHIVE:
			case KW_UNDO:
			case KW_UNIONTYPE:
			case KW_UNLOCK:
			case KW_UNSET:
			case KW_UNSIGNED:
			case KW_URI:
			case KW_USE:
			case KW_UTC:
			case KW_UTCTIMESTAMP:
			case KW_VALIDATE:
			case KW_VALUE_TYPE:
			case KW_VECTORIZATION:
			case KW_VIEW:
			case KW_VIEWS:
			case KW_WAIT:
			case KW_WEEK:
			case KW_WHILE:
			case KW_WORK:
			case KW_WRITE:
			case KW_YEAR:
			case KW_BATCH:
			case KW_DAYOFWEEK:
			case KW_HOLD_DDLTIME:
			case KW_IGNORE:
			case KW_NO_DROP:
			case KW_OFFLINE:
			case KW_PROTECTION:
			case KW_READONLY:
				{
				alt260=5;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 260, 0, input);
				throw nvae;
			}
			switch (alt260) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2314:7: ( foreignKeyWithName )
					{
					root_0 = (ASTNode)adaptor.nil();


					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2314:7: ( foreignKeyWithName )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2314:9: foreignKeyWithName
					{
					pushFollow(FOLLOW_foreignKeyWithName_in_columnNameTypeOrPKOrFK14556);
					foreignKeyWithName874=foreignKeyWithName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, foreignKeyWithName874.getTree());

					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2315:7: ( primaryKeyWithName )
					{
					root_0 = (ASTNode)adaptor.nil();


					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2315:7: ( primaryKeyWithName )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2315:9: primaryKeyWithName
					{
					pushFollow(FOLLOW_primaryKeyWithName_in_columnNameTypeOrPKOrFK14568);
					primaryKeyWithName875=primaryKeyWithName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, primaryKeyWithName875.getTree());

					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2316:7: ( primaryKeyWithoutName )
					{
					root_0 = (ASTNode)adaptor.nil();


					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2316:7: ( primaryKeyWithoutName )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2316:9: primaryKeyWithoutName
					{
					pushFollow(FOLLOW_primaryKeyWithoutName_in_columnNameTypeOrPKOrFK14580);
					primaryKeyWithoutName876=primaryKeyWithoutName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, primaryKeyWithoutName876.getTree());

					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2317:7: ( foreignKeyWithoutName )
					{
					root_0 = (ASTNode)adaptor.nil();


					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2317:7: ( foreignKeyWithoutName )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2317:9: foreignKeyWithoutName
					{
					pushFollow(FOLLOW_foreignKeyWithoutName_in_columnNameTypeOrPKOrFK14592);
					foreignKeyWithoutName877=foreignKeyWithoutName();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, foreignKeyWithoutName877.getTree());

					}

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2318:7: ( columnNameType )
					{
					root_0 = (ASTNode)adaptor.nil();


					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2318:7: ( columnNameType )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2318:9: columnNameType
					{
					pushFollow(FOLLOW_columnNameType_in_columnNameTypeOrPKOrFK14604);
					columnNameType878=columnNameType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, columnNameType878.getTree());

					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameTypeOrPKOrFK"


	public static class columnNameColonType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnNameColonType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2321:1: columnNameColonType : colName= identifier COLON colType ( KW_COMMENT comment= StringLiteral )? -> {$comment == null}? ^( TOK_TABCOL $colName colType ) -> ^( TOK_TABCOL $colName colType $comment) ;
	public final HiveParser.columnNameColonType_return columnNameColonType() throws RecognitionException {
		HiveParser.columnNameColonType_return retval = new HiveParser.columnNameColonType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token comment=null;
		Token COLON879=null;
		Token KW_COMMENT881=null;
		ParserRuleReturnScope colName =null;
		ParserRuleReturnScope colType880 =null;

		ASTNode comment_tree=null;
		ASTNode COLON879_tree=null;
		ASTNode KW_COMMENT881_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
		RewriteRuleTokenStream stream_KW_COMMENT=new RewriteRuleTokenStream(adaptor,"token KW_COMMENT");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_colType=new RewriteRuleSubtreeStream(adaptor,"rule colType");

		 pushMsg("column specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2324:5: (colName= identifier COLON colType ( KW_COMMENT comment= StringLiteral )? -> {$comment == null}? ^( TOK_TABCOL $colName colType ) -> ^( TOK_TABCOL $colName colType $comment) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2324:7: colName= identifier COLON colType ( KW_COMMENT comment= StringLiteral )?
			{
			pushFollow(FOLLOW_identifier_in_columnNameColonType14635);
			colName=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(colName.getTree());
			COLON879=(Token)match(input,COLON,FOLLOW_COLON_in_columnNameColonType14637); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_COLON.add(COLON879);

			pushFollow(FOLLOW_colType_in_columnNameColonType14639);
			colType880=colType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_colType.add(colType880.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2324:40: ( KW_COMMENT comment= StringLiteral )?
			int alt261=2;
			int LA261_0 = input.LA(1);
			if ( (LA261_0==KW_COMMENT) ) {
				alt261=1;
			}
			switch (alt261) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2324:41: KW_COMMENT comment= StringLiteral
					{
					KW_COMMENT881=(Token)match(input,KW_COMMENT,FOLLOW_KW_COMMENT_in_columnNameColonType14642); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_COMMENT.add(KW_COMMENT881);

					comment=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_columnNameColonType14646); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(comment);

					}
					break;

			}

			// AST REWRITE
			// elements: comment, colName, colType, colName, colType
			// token labels: comment
			// rule labels: colName, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleTokenStream stream_comment=new RewriteRuleTokenStream(adaptor,"token comment",comment);
			RewriteRuleSubtreeStream stream_colName=new RewriteRuleSubtreeStream(adaptor,"rule colName",colName!=null?colName.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2325:5: -> {$comment == null}? ^( TOK_TABCOL $colName colType )
			if (comment == null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2325:28: ^( TOK_TABCOL $colName colType )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOL, "TOK_TABCOL"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, stream_colType.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2326:5: -> ^( TOK_TABCOL $colName colType $comment)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2326:28: ^( TOK_TABCOL $colName colType $comment)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABCOL, "TOK_TABCOL"), root_1);
				adaptor.addChild(root_1, stream_colName.nextTree());
				adaptor.addChild(root_1, stream_colType.nextTree());
				adaptor.addChild(root_1, stream_comment.nextNode());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnNameColonType"


	public static class colType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "colType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2329:1: colType : type ;
	public final HiveParser.colType_return colType() throws RecognitionException {
		HiveParser.colType_return retval = new HiveParser.colType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope type882 =null;


		 pushMsg("column type", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2332:5: ( type )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2332:7: type
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_type_in_colType14730);
			type882=type();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, type882.getTree());

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "colType"


	public static class colTypeList_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "colTypeList"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2335:1: colTypeList : colType ( COMMA colType )* -> ^( TOK_COLTYPELIST ( colType )+ ) ;
	public final HiveParser.colTypeList_return colTypeList() throws RecognitionException {
		HiveParser.colTypeList_return retval = new HiveParser.colTypeList_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token COMMA884=null;
		ParserRuleReturnScope colType883 =null;
		ParserRuleReturnScope colType885 =null;

		ASTNode COMMA884_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleSubtreeStream stream_colType=new RewriteRuleSubtreeStream(adaptor,"rule colType");

		 pushMsg("column type list", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2338:5: ( colType ( COMMA colType )* -> ^( TOK_COLTYPELIST ( colType )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2338:7: colType ( COMMA colType )*
			{
			pushFollow(FOLLOW_colType_in_colTypeList14757);
			colType883=colType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_colType.add(colType883.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2338:15: ( COMMA colType )*
			loop262:
			while (true) {
				int alt262=2;
				int LA262_0 = input.LA(1);
				if ( (LA262_0==COMMA) ) {
					alt262=1;
				}

				switch (alt262) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2338:16: COMMA colType
					{
					COMMA884=(Token)match(input,COMMA,FOLLOW_COMMA_in_colTypeList14760); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA884);

					pushFollow(FOLLOW_colType_in_colTypeList14762);
					colType885=colType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_colType.add(colType885.getTree());
					}
					break;

				default :
					break loop262;
				}
			}

			// AST REWRITE
			// elements: colType
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2338:32: -> ^( TOK_COLTYPELIST ( colType )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2338:35: ^( TOK_COLTYPELIST ( colType )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_COLTYPELIST, "TOK_COLTYPELIST"), root_1);
				if ( !(stream_colType.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_colType.hasNext() ) {
					adaptor.addChild(root_1, stream_colType.nextTree());
				}
				stream_colType.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "colTypeList"


	public static class type_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "type"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2341:1: type : ( primitiveType | listType | structType | mapType | unionType );
	public final HiveParser.type_return type() throws RecognitionException {
		HiveParser.type_return retval = new HiveParser.type_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope primitiveType886 =null;
		ParserRuleReturnScope listType887 =null;
		ParserRuleReturnScope structType888 =null;
		ParserRuleReturnScope mapType889 =null;
		ParserRuleReturnScope unionType890 =null;


		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2342:5: ( primitiveType | listType | structType | mapType | unionType )
			int alt263=5;
			switch ( input.LA(1) ) {
			case KW_BIGINT:
			case KW_BINARY:
			case KW_BOOLEAN:
			case KW_CHAR:
			case KW_DATE:
			case KW_DATETIME:
			case KW_DECIMAL:
			case KW_DOUBLE:
			case KW_FLOAT:
			case KW_INT:
			case KW_SMALLINT:
			case KW_STRING:
			case KW_TIMESTAMP:
			case KW_TINYINT:
			case KW_VARCHAR:
				{
				alt263=1;
				}
				break;
			case KW_ARRAY:
				{
				alt263=2;
				}
				break;
			case KW_STRUCT:
				{
				alt263=3;
				}
				break;
			case KW_MAP:
				{
				alt263=4;
				}
				break;
			case KW_UNIONTYPE:
				{
				alt263=5;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 263, 0, input);
				throw nvae;
			}
			switch (alt263) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2342:7: primitiveType
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_primitiveType_in_type14790);
					primitiveType886=primitiveType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, primitiveType886.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2343:7: listType
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_listType_in_type14798);
					listType887=listType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, listType887.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2344:7: structType
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_structType_in_type14806);
					structType888=structType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, structType888.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2345:7: mapType
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_mapType_in_type14814);
					mapType889=mapType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, mapType889.getTree());

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2346:7: unionType
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_unionType_in_type14822);
					unionType890=unionType();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, unionType890.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "type"


	public static class primitiveType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "primitiveType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2348:1: primitiveType : ( KW_TINYINT -> TOK_TINYINT | KW_SMALLINT -> TOK_SMALLINT | KW_INT -> TOK_INT | KW_BIGINT -> TOK_BIGINT | KW_BOOLEAN -> TOK_BOOLEAN | KW_FLOAT -> TOK_FLOAT | KW_DOUBLE ( KW_PRECISION )? -> TOK_DOUBLE | KW_DATE -> TOK_DATE | KW_DATETIME -> TOK_DATETIME | KW_TIMESTAMP -> TOK_TIMESTAMP | KW_STRING -> TOK_STRING | KW_BINARY -> TOK_BINARY | KW_DECIMAL ( LPAREN prec= Number ( COMMA scale= Number )? RPAREN )? -> ^( TOK_DECIMAL ( $prec)? ( $scale)? ) | KW_VARCHAR LPAREN length= Number RPAREN -> ^( TOK_VARCHAR $length) | KW_CHAR LPAREN length= Number RPAREN -> ^( TOK_CHAR $length) );
	public final HiveParser.primitiveType_return primitiveType() throws RecognitionException {
		HiveParser.primitiveType_return retval = new HiveParser.primitiveType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token prec=null;
		Token scale=null;
		Token length=null;
		Token KW_TINYINT891=null;
		Token KW_SMALLINT892=null;
		Token KW_INT893=null;
		Token KW_BIGINT894=null;
		Token KW_BOOLEAN895=null;
		Token KW_FLOAT896=null;
		Token KW_DOUBLE897=null;
		Token KW_PRECISION898=null;
		Token KW_DATE899=null;
		Token KW_DATETIME900=null;
		Token KW_TIMESTAMP901=null;
		Token KW_STRING902=null;
		Token KW_BINARY903=null;
		Token KW_DECIMAL904=null;
		Token LPAREN905=null;
		Token COMMA906=null;
		Token RPAREN907=null;
		Token KW_VARCHAR908=null;
		Token LPAREN909=null;
		Token RPAREN910=null;
		Token KW_CHAR911=null;
		Token LPAREN912=null;
		Token RPAREN913=null;

		ASTNode prec_tree=null;
		ASTNode scale_tree=null;
		ASTNode length_tree=null;
		ASTNode KW_TINYINT891_tree=null;
		ASTNode KW_SMALLINT892_tree=null;
		ASTNode KW_INT893_tree=null;
		ASTNode KW_BIGINT894_tree=null;
		ASTNode KW_BOOLEAN895_tree=null;
		ASTNode KW_FLOAT896_tree=null;
		ASTNode KW_DOUBLE897_tree=null;
		ASTNode KW_PRECISION898_tree=null;
		ASTNode KW_DATE899_tree=null;
		ASTNode KW_DATETIME900_tree=null;
		ASTNode KW_TIMESTAMP901_tree=null;
		ASTNode KW_STRING902_tree=null;
		ASTNode KW_BINARY903_tree=null;
		ASTNode KW_DECIMAL904_tree=null;
		ASTNode LPAREN905_tree=null;
		ASTNode COMMA906_tree=null;
		ASTNode RPAREN907_tree=null;
		ASTNode KW_VARCHAR908_tree=null;
		ASTNode LPAREN909_tree=null;
		ASTNode RPAREN910_tree=null;
		ASTNode KW_CHAR911_tree=null;
		ASTNode LPAREN912_tree=null;
		ASTNode RPAREN913_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_SMALLINT=new RewriteRuleTokenStream(adaptor,"token KW_SMALLINT");
		RewriteRuleTokenStream stream_KW_DATE=new RewriteRuleTokenStream(adaptor,"token KW_DATE");
		RewriteRuleTokenStream stream_KW_DATETIME=new RewriteRuleTokenStream(adaptor,"token KW_DATETIME");
		RewriteRuleTokenStream stream_KW_TIMESTAMP=new RewriteRuleTokenStream(adaptor,"token KW_TIMESTAMP");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_BOOLEAN=new RewriteRuleTokenStream(adaptor,"token KW_BOOLEAN");
		RewriteRuleTokenStream stream_KW_DOUBLE=new RewriteRuleTokenStream(adaptor,"token KW_DOUBLE");
		RewriteRuleTokenStream stream_KW_BIGINT=new RewriteRuleTokenStream(adaptor,"token KW_BIGINT");
		RewriteRuleTokenStream stream_KW_CHAR=new RewriteRuleTokenStream(adaptor,"token KW_CHAR");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_INT=new RewriteRuleTokenStream(adaptor,"token KW_INT");
		RewriteRuleTokenStream stream_KW_STRING=new RewriteRuleTokenStream(adaptor,"token KW_STRING");
		RewriteRuleTokenStream stream_KW_DECIMAL=new RewriteRuleTokenStream(adaptor,"token KW_DECIMAL");
		RewriteRuleTokenStream stream_KW_VARCHAR=new RewriteRuleTokenStream(adaptor,"token KW_VARCHAR");
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_FLOAT=new RewriteRuleTokenStream(adaptor,"token KW_FLOAT");
		RewriteRuleTokenStream stream_KW_TINYINT=new RewriteRuleTokenStream(adaptor,"token KW_TINYINT");
		RewriteRuleTokenStream stream_KW_PRECISION=new RewriteRuleTokenStream(adaptor,"token KW_PRECISION");
		RewriteRuleTokenStream stream_KW_BINARY=new RewriteRuleTokenStream(adaptor,"token KW_BINARY");

		 pushMsg("primitive type specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2351:5: ( KW_TINYINT -> TOK_TINYINT | KW_SMALLINT -> TOK_SMALLINT | KW_INT -> TOK_INT | KW_BIGINT -> TOK_BIGINT | KW_BOOLEAN -> TOK_BOOLEAN | KW_FLOAT -> TOK_FLOAT | KW_DOUBLE ( KW_PRECISION )? -> TOK_DOUBLE | KW_DATE -> TOK_DATE | KW_DATETIME -> TOK_DATETIME | KW_TIMESTAMP -> TOK_TIMESTAMP | KW_STRING -> TOK_STRING | KW_BINARY -> TOK_BINARY | KW_DECIMAL ( LPAREN prec= Number ( COMMA scale= Number )? RPAREN )? -> ^( TOK_DECIMAL ( $prec)? ( $scale)? ) | KW_VARCHAR LPAREN length= Number RPAREN -> ^( TOK_VARCHAR $length) | KW_CHAR LPAREN length= Number RPAREN -> ^( TOK_CHAR $length) )
			int alt267=15;
			switch ( input.LA(1) ) {
			case KW_TINYINT:
				{
				alt267=1;
				}
				break;
			case KW_SMALLINT:
				{
				alt267=2;
				}
				break;
			case KW_INT:
				{
				alt267=3;
				}
				break;
			case KW_BIGINT:
				{
				alt267=4;
				}
				break;
			case KW_BOOLEAN:
				{
				alt267=5;
				}
				break;
			case KW_FLOAT:
				{
				alt267=6;
				}
				break;
			case KW_DOUBLE:
				{
				alt267=7;
				}
				break;
			case KW_DATE:
				{
				alt267=8;
				}
				break;
			case KW_DATETIME:
				{
				alt267=9;
				}
				break;
			case KW_TIMESTAMP:
				{
				alt267=10;
				}
				break;
			case KW_STRING:
				{
				alt267=11;
				}
				break;
			case KW_BINARY:
				{
				alt267=12;
				}
				break;
			case KW_DECIMAL:
				{
				alt267=13;
				}
				break;
			case KW_VARCHAR:
				{
				alt267=14;
				}
				break;
			case KW_CHAR:
				{
				alt267=15;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 267, 0, input);
				throw nvae;
			}
			switch (alt267) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2351:7: KW_TINYINT
					{
					KW_TINYINT891=(Token)match(input,KW_TINYINT,FOLLOW_KW_TINYINT_in_primitiveType14844); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TINYINT.add(KW_TINYINT891);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2351:24: -> TOK_TINYINT
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_TINYINT, "TOK_TINYINT"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2352:7: KW_SMALLINT
					{
					KW_SMALLINT892=(Token)match(input,KW_SMALLINT,FOLLOW_KW_SMALLINT_in_primitiveType14865); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_SMALLINT.add(KW_SMALLINT892);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2352:24: -> TOK_SMALLINT
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_SMALLINT, "TOK_SMALLINT"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2353:7: KW_INT
					{
					KW_INT893=(Token)match(input,KW_INT,FOLLOW_KW_INT_in_primitiveType14885); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INT.add(KW_INT893);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2353:24: -> TOK_INT
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_INT, "TOK_INT"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2354:7: KW_BIGINT
					{
					KW_BIGINT894=(Token)match(input,KW_BIGINT,FOLLOW_KW_BIGINT_in_primitiveType14910); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_BIGINT.add(KW_BIGINT894);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2354:24: -> TOK_BIGINT
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_BIGINT, "TOK_BIGINT"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2355:7: KW_BOOLEAN
					{
					KW_BOOLEAN895=(Token)match(input,KW_BOOLEAN,FOLLOW_KW_BOOLEAN_in_primitiveType14932); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_BOOLEAN.add(KW_BOOLEAN895);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2355:24: -> TOK_BOOLEAN
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_BOOLEAN, "TOK_BOOLEAN"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2356:7: KW_FLOAT
					{
					KW_FLOAT896=(Token)match(input,KW_FLOAT,FOLLOW_KW_FLOAT_in_primitiveType14953); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_FLOAT.add(KW_FLOAT896);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2356:24: -> TOK_FLOAT
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_FLOAT, "TOK_FLOAT"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2357:7: KW_DOUBLE ( KW_PRECISION )?
					{
					KW_DOUBLE897=(Token)match(input,KW_DOUBLE,FOLLOW_KW_DOUBLE_in_primitiveType14976); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DOUBLE.add(KW_DOUBLE897);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2357:17: ( KW_PRECISION )?
					int alt264=2;
					int LA264_0 = input.LA(1);
					if ( (LA264_0==KW_PRECISION) ) {
						alt264=1;
					}
					switch (alt264) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2357:17: KW_PRECISION
							{
							KW_PRECISION898=(Token)match(input,KW_PRECISION,FOLLOW_KW_PRECISION_in_primitiveType14978); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_PRECISION.add(KW_PRECISION898);

							}
							break;

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2357:37: -> TOK_DOUBLE
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_DOUBLE, "TOK_DOUBLE"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2358:7: KW_DATE
					{
					KW_DATE899=(Token)match(input,KW_DATE,FOLLOW_KW_DATE_in_primitiveType15000); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DATE.add(KW_DATE899);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2358:24: -> TOK_DATE
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_DATE, "TOK_DATE"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 9 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2359:7: KW_DATETIME
					{
					KW_DATETIME900=(Token)match(input,KW_DATETIME,FOLLOW_KW_DATETIME_in_primitiveType15024); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DATETIME.add(KW_DATETIME900);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2359:24: -> TOK_DATETIME
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_DATETIME, "TOK_DATETIME"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 10 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2360:7: KW_TIMESTAMP
					{
					KW_TIMESTAMP901=(Token)match(input,KW_TIMESTAMP,FOLLOW_KW_TIMESTAMP_in_primitiveType15044); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TIMESTAMP.add(KW_TIMESTAMP901);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2360:24: -> TOK_TIMESTAMP
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_TIMESTAMP, "TOK_TIMESTAMP"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 11 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2364:7: KW_STRING
					{
					KW_STRING902=(Token)match(input,KW_STRING,FOLLOW_KW_STRING_in_primitiveType15078); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_STRING.add(KW_STRING902);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2364:24: -> TOK_STRING
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_STRING, "TOK_STRING"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 12 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2365:7: KW_BINARY
					{
					KW_BINARY903=(Token)match(input,KW_BINARY,FOLLOW_KW_BINARY_in_primitiveType15100); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_BINARY.add(KW_BINARY903);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2365:24: -> TOK_BINARY
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_BINARY, "TOK_BINARY"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 13 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:7: KW_DECIMAL ( LPAREN prec= Number ( COMMA scale= Number )? RPAREN )?
					{
					KW_DECIMAL904=(Token)match(input,KW_DECIMAL,FOLLOW_KW_DECIMAL_in_primitiveType15122); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DECIMAL.add(KW_DECIMAL904);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:18: ( LPAREN prec= Number ( COMMA scale= Number )? RPAREN )?
					int alt266=2;
					int LA266_0 = input.LA(1);
					if ( (LA266_0==LPAREN) ) {
						alt266=1;
					}
					switch (alt266) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:19: LPAREN prec= Number ( COMMA scale= Number )? RPAREN
							{
							LPAREN905=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_primitiveType15125); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN905);

							prec=(Token)match(input,Number,FOLLOW_Number_in_primitiveType15129); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_Number.add(prec);

							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:38: ( COMMA scale= Number )?
							int alt265=2;
							int LA265_0 = input.LA(1);
							if ( (LA265_0==COMMA) ) {
								alt265=1;
							}
							switch (alt265) {
								case 1 :
									// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:39: COMMA scale= Number
									{
									COMMA906=(Token)match(input,COMMA,FOLLOW_COMMA_in_primitiveType15132); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_COMMA.add(COMMA906);

									scale=(Token)match(input,Number,FOLLOW_Number_in_primitiveType15136); if (state.failed) return retval; 
									if ( state.backtracking==0 ) stream_Number.add(scale);

									}
									break;

							}

							RPAREN907=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_primitiveType15140); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN907);

							}
							break;

					}

					// AST REWRITE
					// elements: scale, prec
					// token labels: prec, scale
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_prec=new RewriteRuleTokenStream(adaptor,"token prec",prec);
					RewriteRuleTokenStream stream_scale=new RewriteRuleTokenStream(adaptor,"token scale",scale);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2366:69: -> ^( TOK_DECIMAL ( $prec)? ( $scale)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:72: ^( TOK_DECIMAL ( $prec)? ( $scale)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DECIMAL, "TOK_DECIMAL"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:87: ( $prec)?
						if ( stream_prec.hasNext() ) {
							adaptor.addChild(root_1, stream_prec.nextNode());
						}
						stream_prec.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2366:94: ( $scale)?
						if ( stream_scale.hasNext() ) {
							adaptor.addChild(root_1, stream_scale.nextNode());
						}
						stream_scale.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 14 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2367:7: KW_VARCHAR LPAREN length= Number RPAREN
					{
					KW_VARCHAR908=(Token)match(input,KW_VARCHAR,FOLLOW_KW_VARCHAR_in_primitiveType15164); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_VARCHAR.add(KW_VARCHAR908);

					LPAREN909=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_primitiveType15166); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN909);

					length=(Token)match(input,Number,FOLLOW_Number_in_primitiveType15170); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(length);

					RPAREN910=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_primitiveType15172); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN910);

					// AST REWRITE
					// elements: length
					// token labels: length
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_length=new RewriteRuleTokenStream(adaptor,"token length",length);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2367:51: -> ^( TOK_VARCHAR $length)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2367:57: ^( TOK_VARCHAR $length)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_VARCHAR, "TOK_VARCHAR"), root_1);
						adaptor.addChild(root_1, stream_length.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 15 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2368:7: KW_CHAR LPAREN length= Number RPAREN
					{
					KW_CHAR911=(Token)match(input,KW_CHAR,FOLLOW_KW_CHAR_in_primitiveType15197); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_CHAR.add(KW_CHAR911);

					LPAREN912=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_primitiveType15199); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN912);

					length=(Token)match(input,Number,FOLLOW_Number_in_primitiveType15203); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(length);

					RPAREN913=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_primitiveType15205); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN913);

					// AST REWRITE
					// elements: length
					// token labels: length
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_length=new RewriteRuleTokenStream(adaptor,"token length",length);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2368:48: -> ^( TOK_CHAR $length)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2368:54: ^( TOK_CHAR $length)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CHAR, "TOK_CHAR"), root_1);
						adaptor.addChild(root_1, stream_length.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "primitiveType"


	public static class listType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "listType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2371:1: listType : KW_ARRAY LESSTHAN type GREATERTHAN -> ^( TOK_LIST type ) ;
	public final HiveParser.listType_return listType() throws RecognitionException {
		HiveParser.listType_return retval = new HiveParser.listType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ARRAY914=null;
		Token LESSTHAN915=null;
		Token GREATERTHAN917=null;
		ParserRuleReturnScope type916 =null;

		ASTNode KW_ARRAY914_tree=null;
		ASTNode LESSTHAN915_tree=null;
		ASTNode GREATERTHAN917_tree=null;
		RewriteRuleTokenStream stream_LESSTHAN=new RewriteRuleTokenStream(adaptor,"token LESSTHAN");
		RewriteRuleTokenStream stream_KW_ARRAY=new RewriteRuleTokenStream(adaptor,"token KW_ARRAY");
		RewriteRuleTokenStream stream_GREATERTHAN=new RewriteRuleTokenStream(adaptor,"token GREATERTHAN");
		RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");

		 pushMsg("list type", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2374:5: ( KW_ARRAY LESSTHAN type GREATERTHAN -> ^( TOK_LIST type ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2374:7: KW_ARRAY LESSTHAN type GREATERTHAN
			{
			KW_ARRAY914=(Token)match(input,KW_ARRAY,FOLLOW_KW_ARRAY_in_listType15249); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ARRAY.add(KW_ARRAY914);

			LESSTHAN915=(Token)match(input,LESSTHAN,FOLLOW_LESSTHAN_in_listType15251); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LESSTHAN.add(LESSTHAN915);

			pushFollow(FOLLOW_type_in_listType15253);
			type916=type();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_type.add(type916.getTree());
			GREATERTHAN917=(Token)match(input,GREATERTHAN,FOLLOW_GREATERTHAN_in_listType15255); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_GREATERTHAN.add(GREATERTHAN917);

			// AST REWRITE
			// elements: type
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2374:44: -> ^( TOK_LIST type )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2374:47: ^( TOK_LIST type )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LIST, "TOK_LIST"), root_1);
				adaptor.addChild(root_1, stream_type.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "listType"


	public static class structType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "structType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2377:1: structType : KW_STRUCT LESSTHAN columnNameColonTypeList GREATERTHAN -> ^( TOK_STRUCT columnNameColonTypeList ) ;
	public final HiveParser.structType_return structType() throws RecognitionException {
		HiveParser.structType_return retval = new HiveParser.structType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_STRUCT918=null;
		Token LESSTHAN919=null;
		Token GREATERTHAN921=null;
		ParserRuleReturnScope columnNameColonTypeList920 =null;

		ASTNode KW_STRUCT918_tree=null;
		ASTNode LESSTHAN919_tree=null;
		ASTNode GREATERTHAN921_tree=null;
		RewriteRuleTokenStream stream_KW_STRUCT=new RewriteRuleTokenStream(adaptor,"token KW_STRUCT");
		RewriteRuleTokenStream stream_LESSTHAN=new RewriteRuleTokenStream(adaptor,"token LESSTHAN");
		RewriteRuleTokenStream stream_GREATERTHAN=new RewriteRuleTokenStream(adaptor,"token GREATERTHAN");
		RewriteRuleSubtreeStream stream_columnNameColonTypeList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameColonTypeList");

		 pushMsg("struct type", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2380:5: ( KW_STRUCT LESSTHAN columnNameColonTypeList GREATERTHAN -> ^( TOK_STRUCT columnNameColonTypeList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2380:7: KW_STRUCT LESSTHAN columnNameColonTypeList GREATERTHAN
			{
			KW_STRUCT918=(Token)match(input,KW_STRUCT,FOLLOW_KW_STRUCT_in_structType15292); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_STRUCT.add(KW_STRUCT918);

			LESSTHAN919=(Token)match(input,LESSTHAN,FOLLOW_LESSTHAN_in_structType15294); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LESSTHAN.add(LESSTHAN919);

			pushFollow(FOLLOW_columnNameColonTypeList_in_structType15296);
			columnNameColonTypeList920=columnNameColonTypeList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnNameColonTypeList.add(columnNameColonTypeList920.getTree());
			GREATERTHAN921=(Token)match(input,GREATERTHAN,FOLLOW_GREATERTHAN_in_structType15298); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_GREATERTHAN.add(GREATERTHAN921);

			// AST REWRITE
			// elements: columnNameColonTypeList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2380:62: -> ^( TOK_STRUCT columnNameColonTypeList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2380:65: ^( TOK_STRUCT columnNameColonTypeList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_STRUCT, "TOK_STRUCT"), root_1);
				adaptor.addChild(root_1, stream_columnNameColonTypeList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "structType"


	public static class mapType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "mapType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2383:1: mapType : KW_MAP LESSTHAN left= primitiveType COMMA right= type GREATERTHAN -> ^( TOK_MAP $left $right) ;
	public final HiveParser.mapType_return mapType() throws RecognitionException {
		HiveParser.mapType_return retval = new HiveParser.mapType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_MAP922=null;
		Token LESSTHAN923=null;
		Token COMMA924=null;
		Token GREATERTHAN925=null;
		ParserRuleReturnScope left =null;
		ParserRuleReturnScope right =null;

		ASTNode KW_MAP922_tree=null;
		ASTNode LESSTHAN923_tree=null;
		ASTNode COMMA924_tree=null;
		ASTNode GREATERTHAN925_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_MAP=new RewriteRuleTokenStream(adaptor,"token KW_MAP");
		RewriteRuleTokenStream stream_LESSTHAN=new RewriteRuleTokenStream(adaptor,"token LESSTHAN");
		RewriteRuleTokenStream stream_GREATERTHAN=new RewriteRuleTokenStream(adaptor,"token GREATERTHAN");
		RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");
		RewriteRuleSubtreeStream stream_primitiveType=new RewriteRuleSubtreeStream(adaptor,"rule primitiveType");

		 pushMsg("map type", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2386:5: ( KW_MAP LESSTHAN left= primitiveType COMMA right= type GREATERTHAN -> ^( TOK_MAP $left $right) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2386:7: KW_MAP LESSTHAN left= primitiveType COMMA right= type GREATERTHAN
			{
			KW_MAP922=(Token)match(input,KW_MAP,FOLLOW_KW_MAP_in_mapType15333); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MAP.add(KW_MAP922);

			LESSTHAN923=(Token)match(input,LESSTHAN,FOLLOW_LESSTHAN_in_mapType15335); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LESSTHAN.add(LESSTHAN923);

			pushFollow(FOLLOW_primitiveType_in_mapType15339);
			left=primitiveType();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_primitiveType.add(left.getTree());
			COMMA924=(Token)match(input,COMMA,FOLLOW_COMMA_in_mapType15341); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_COMMA.add(COMMA924);

			pushFollow(FOLLOW_type_in_mapType15345);
			right=type();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_type.add(right.getTree());
			GREATERTHAN925=(Token)match(input,GREATERTHAN,FOLLOW_GREATERTHAN_in_mapType15347); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_GREATERTHAN.add(GREATERTHAN925);

			// AST REWRITE
			// elements: left, right
			// token labels: 
			// rule labels: left, right, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_left=new RewriteRuleSubtreeStream(adaptor,"rule left",left!=null?left.getTree():null);
			RewriteRuleSubtreeStream stream_right=new RewriteRuleSubtreeStream(adaptor,"rule right",right!=null?right.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2387:5: -> ^( TOK_MAP $left $right)
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2387:8: ^( TOK_MAP $left $right)
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_MAP, "TOK_MAP"), root_1);
				adaptor.addChild(root_1, stream_left.nextTree());
				adaptor.addChild(root_1, stream_right.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "mapType"


	public static class unionType_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "unionType"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2390:1: unionType : KW_UNIONTYPE LESSTHAN colTypeList GREATERTHAN -> ^( TOK_UNIONTYPE colTypeList ) ;
	public final HiveParser.unionType_return unionType() throws RecognitionException {
		HiveParser.unionType_return retval = new HiveParser.unionType_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UNIONTYPE926=null;
		Token LESSTHAN927=null;
		Token GREATERTHAN929=null;
		ParserRuleReturnScope colTypeList928 =null;

		ASTNode KW_UNIONTYPE926_tree=null;
		ASTNode LESSTHAN927_tree=null;
		ASTNode GREATERTHAN929_tree=null;
		RewriteRuleTokenStream stream_KW_UNIONTYPE=new RewriteRuleTokenStream(adaptor,"token KW_UNIONTYPE");
		RewriteRuleTokenStream stream_LESSTHAN=new RewriteRuleTokenStream(adaptor,"token LESSTHAN");
		RewriteRuleTokenStream stream_GREATERTHAN=new RewriteRuleTokenStream(adaptor,"token GREATERTHAN");
		RewriteRuleSubtreeStream stream_colTypeList=new RewriteRuleSubtreeStream(adaptor,"rule colTypeList");

		 pushMsg("uniontype type", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2393:5: ( KW_UNIONTYPE LESSTHAN colTypeList GREATERTHAN -> ^( TOK_UNIONTYPE colTypeList ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2393:7: KW_UNIONTYPE LESSTHAN colTypeList GREATERTHAN
			{
			KW_UNIONTYPE926=(Token)match(input,KW_UNIONTYPE,FOLLOW_KW_UNIONTYPE_in_unionType15390); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UNIONTYPE.add(KW_UNIONTYPE926);

			LESSTHAN927=(Token)match(input,LESSTHAN,FOLLOW_LESSTHAN_in_unionType15392); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LESSTHAN.add(LESSTHAN927);

			pushFollow(FOLLOW_colTypeList_in_unionType15394);
			colTypeList928=colTypeList();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_colTypeList.add(colTypeList928.getTree());
			GREATERTHAN929=(Token)match(input,GREATERTHAN,FOLLOW_GREATERTHAN_in_unionType15396); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_GREATERTHAN.add(GREATERTHAN929);

			// AST REWRITE
			// elements: colTypeList
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2393:53: -> ^( TOK_UNIONTYPE colTypeList )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2393:56: ^( TOK_UNIONTYPE colTypeList )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNIONTYPE, "TOK_UNIONTYPE"), root_1);
				adaptor.addChild(root_1, stream_colTypeList.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "unionType"


	public static class setOperator_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "setOperator"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2396:1: setOperator : ( KW_UNION KW_ALL -> ^( TOK_UNIONALL ) | KW_UNION ( KW_DISTINCT )? -> ^( TOK_UNIONDISTINCT ) | KW_INTERSECT KW_ALL -> ^( TOK_INTERSECTALL ) | KW_INTERSECT ( KW_DISTINCT )? -> ^( TOK_INTERSECTDISTINCT ) | KW_EXCEPT KW_ALL -> ^( TOK_EXCEPTALL ) | KW_EXCEPT ( KW_DISTINCT )? -> ^( TOK_EXCEPTDISTINCT ) | KW_MINUS KW_ALL -> ^( TOK_EXCEPTALL ) | KW_MINUS ( KW_DISTINCT )? -> ^( TOK_EXCEPTDISTINCT ) );
	public final HiveParser.setOperator_return setOperator() throws RecognitionException {
		HiveParser.setOperator_return retval = new HiveParser.setOperator_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UNION930=null;
		Token KW_ALL931=null;
		Token KW_UNION932=null;
		Token KW_DISTINCT933=null;
		Token KW_INTERSECT934=null;
		Token KW_ALL935=null;
		Token KW_INTERSECT936=null;
		Token KW_DISTINCT937=null;
		Token KW_EXCEPT938=null;
		Token KW_ALL939=null;
		Token KW_EXCEPT940=null;
		Token KW_DISTINCT941=null;
		Token KW_MINUS942=null;
		Token KW_ALL943=null;
		Token KW_MINUS944=null;
		Token KW_DISTINCT945=null;

		ASTNode KW_UNION930_tree=null;
		ASTNode KW_ALL931_tree=null;
		ASTNode KW_UNION932_tree=null;
		ASTNode KW_DISTINCT933_tree=null;
		ASTNode KW_INTERSECT934_tree=null;
		ASTNode KW_ALL935_tree=null;
		ASTNode KW_INTERSECT936_tree=null;
		ASTNode KW_DISTINCT937_tree=null;
		ASTNode KW_EXCEPT938_tree=null;
		ASTNode KW_ALL939_tree=null;
		ASTNode KW_EXCEPT940_tree=null;
		ASTNode KW_DISTINCT941_tree=null;
		ASTNode KW_MINUS942_tree=null;
		ASTNode KW_ALL943_tree=null;
		ASTNode KW_MINUS944_tree=null;
		ASTNode KW_DISTINCT945_tree=null;
		RewriteRuleTokenStream stream_KW_INTERSECT=new RewriteRuleTokenStream(adaptor,"token KW_INTERSECT");
		RewriteRuleTokenStream stream_KW_EXCEPT=new RewriteRuleTokenStream(adaptor,"token KW_EXCEPT");
		RewriteRuleTokenStream stream_KW_UNION=new RewriteRuleTokenStream(adaptor,"token KW_UNION");
		RewriteRuleTokenStream stream_KW_DISTINCT=new RewriteRuleTokenStream(adaptor,"token KW_DISTINCT");
		RewriteRuleTokenStream stream_KW_ALL=new RewriteRuleTokenStream(adaptor,"token KW_ALL");
		RewriteRuleTokenStream stream_KW_MINUS=new RewriteRuleTokenStream(adaptor,"token KW_MINUS");

		 pushMsg("set operator", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2399:5: ( KW_UNION KW_ALL -> ^( TOK_UNIONALL ) | KW_UNION ( KW_DISTINCT )? -> ^( TOK_UNIONDISTINCT ) | KW_INTERSECT KW_ALL -> ^( TOK_INTERSECTALL ) | KW_INTERSECT ( KW_DISTINCT )? -> ^( TOK_INTERSECTDISTINCT ) | KW_EXCEPT KW_ALL -> ^( TOK_EXCEPTALL ) | KW_EXCEPT ( KW_DISTINCT )? -> ^( TOK_EXCEPTDISTINCT ) | KW_MINUS KW_ALL -> ^( TOK_EXCEPTALL ) | KW_MINUS ( KW_DISTINCT )? -> ^( TOK_EXCEPTDISTINCT ) )
			int alt272=8;
			switch ( input.LA(1) ) {
			case KW_UNION:
				{
				int LA272_1 = input.LA(2);
				if ( (LA272_1==KW_ALL) ) {
					alt272=1;
				}
				else if ( (LA272_1==KW_DISTINCT||LA272_1==KW_FROM||LA272_1==KW_MAP||LA272_1==KW_REDUCE||LA272_1==KW_SELECT||LA272_1==LPAREN) ) {
					alt272=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 272, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_INTERSECT:
				{
				int LA272_2 = input.LA(2);
				if ( (LA272_2==KW_ALL) ) {
					alt272=3;
				}
				else if ( (LA272_2==KW_DISTINCT||LA272_2==KW_FROM||LA272_2==KW_MAP||LA272_2==KW_REDUCE||LA272_2==KW_SELECT||LA272_2==LPAREN) ) {
					alt272=4;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 272, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_EXCEPT:
				{
				int LA272_3 = input.LA(2);
				if ( (LA272_3==KW_ALL) ) {
					alt272=5;
				}
				else if ( (LA272_3==KW_DISTINCT||LA272_3==KW_FROM||LA272_3==KW_MAP||LA272_3==KW_REDUCE||LA272_3==KW_SELECT||LA272_3==LPAREN) ) {
					alt272=6;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 272, 3, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case KW_MINUS:
				{
				int LA272_4 = input.LA(2);
				if ( (LA272_4==KW_ALL) ) {
					alt272=7;
				}
				else if ( (LA272_4==KW_DISTINCT||LA272_4==KW_FROM||LA272_4==KW_MAP||LA272_4==KW_REDUCE||LA272_4==KW_SELECT||LA272_4==LPAREN) ) {
					alt272=8;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 272, 4, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 272, 0, input);
				throw nvae;
			}
			switch (alt272) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2399:7: KW_UNION KW_ALL
					{
					KW_UNION930=(Token)match(input,KW_UNION,FOLLOW_KW_UNION_in_setOperator15431); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_UNION.add(KW_UNION930);

					KW_ALL931=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_setOperator15433); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(KW_ALL931);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2399:23: -> ^( TOK_UNIONALL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2399:26: ^( TOK_UNIONALL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNIONALL, "TOK_UNIONALL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2400:7: KW_UNION ( KW_DISTINCT )?
					{
					KW_UNION932=(Token)match(input,KW_UNION,FOLLOW_KW_UNION_in_setOperator15447); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_UNION.add(KW_UNION932);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2400:16: ( KW_DISTINCT )?
					int alt268=2;
					int LA268_0 = input.LA(1);
					if ( (LA268_0==KW_DISTINCT) ) {
						alt268=1;
					}
					switch (alt268) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2400:16: KW_DISTINCT
							{
							KW_DISTINCT933=(Token)match(input,KW_DISTINCT,FOLLOW_KW_DISTINCT_in_setOperator15449); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DISTINCT.add(KW_DISTINCT933);

							}
							break;

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2400:29: -> ^( TOK_UNIONDISTINCT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2400:32: ^( TOK_UNIONDISTINCT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNIONDISTINCT, "TOK_UNIONDISTINCT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2401:7: KW_INTERSECT KW_ALL
					{
					KW_INTERSECT934=(Token)match(input,KW_INTERSECT,FOLLOW_KW_INTERSECT_in_setOperator15464); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INTERSECT.add(KW_INTERSECT934);

					KW_ALL935=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_setOperator15466); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(KW_ALL935);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2401:27: -> ^( TOK_INTERSECTALL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2401:30: ^( TOK_INTERSECTALL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INTERSECTALL, "TOK_INTERSECTALL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2402:7: KW_INTERSECT ( KW_DISTINCT )?
					{
					KW_INTERSECT936=(Token)match(input,KW_INTERSECT,FOLLOW_KW_INTERSECT_in_setOperator15480); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INTERSECT.add(KW_INTERSECT936);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2402:20: ( KW_DISTINCT )?
					int alt269=2;
					int LA269_0 = input.LA(1);
					if ( (LA269_0==KW_DISTINCT) ) {
						alt269=1;
					}
					switch (alt269) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2402:20: KW_DISTINCT
							{
							KW_DISTINCT937=(Token)match(input,KW_DISTINCT,FOLLOW_KW_DISTINCT_in_setOperator15482); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DISTINCT.add(KW_DISTINCT937);

							}
							break;

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2402:33: -> ^( TOK_INTERSECTDISTINCT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2402:36: ^( TOK_INTERSECTDISTINCT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INTERSECTDISTINCT, "TOK_INTERSECTDISTINCT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 5 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2403:7: KW_EXCEPT KW_ALL
					{
					KW_EXCEPT938=(Token)match(input,KW_EXCEPT,FOLLOW_KW_EXCEPT_in_setOperator15497); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_EXCEPT.add(KW_EXCEPT938);

					KW_ALL939=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_setOperator15499); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(KW_ALL939);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2403:24: -> ^( TOK_EXCEPTALL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2403:27: ^( TOK_EXCEPTALL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXCEPTALL, "TOK_EXCEPTALL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 6 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2404:7: KW_EXCEPT ( KW_DISTINCT )?
					{
					KW_EXCEPT940=(Token)match(input,KW_EXCEPT,FOLLOW_KW_EXCEPT_in_setOperator15513); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_EXCEPT.add(KW_EXCEPT940);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2404:17: ( KW_DISTINCT )?
					int alt270=2;
					int LA270_0 = input.LA(1);
					if ( (LA270_0==KW_DISTINCT) ) {
						alt270=1;
					}
					switch (alt270) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2404:17: KW_DISTINCT
							{
							KW_DISTINCT941=(Token)match(input,KW_DISTINCT,FOLLOW_KW_DISTINCT_in_setOperator15515); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DISTINCT.add(KW_DISTINCT941);

							}
							break;

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2404:30: -> ^( TOK_EXCEPTDISTINCT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2404:33: ^( TOK_EXCEPTDISTINCT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXCEPTDISTINCT, "TOK_EXCEPTDISTINCT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 7 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2405:7: KW_MINUS KW_ALL
					{
					KW_MINUS942=(Token)match(input,KW_MINUS,FOLLOW_KW_MINUS_in_setOperator15530); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_MINUS.add(KW_MINUS942);

					KW_ALL943=(Token)match(input,KW_ALL,FOLLOW_KW_ALL_in_setOperator15532); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ALL.add(KW_ALL943);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2405:23: -> ^( TOK_EXCEPTALL )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2405:26: ^( TOK_EXCEPTALL )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXCEPTALL, "TOK_EXCEPTALL"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 8 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2406:7: KW_MINUS ( KW_DISTINCT )?
					{
					KW_MINUS944=(Token)match(input,KW_MINUS,FOLLOW_KW_MINUS_in_setOperator15546); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_MINUS.add(KW_MINUS944);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2406:16: ( KW_DISTINCT )?
					int alt271=2;
					int LA271_0 = input.LA(1);
					if ( (LA271_0==KW_DISTINCT) ) {
						alt271=1;
					}
					switch (alt271) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2406:16: KW_DISTINCT
							{
							KW_DISTINCT945=(Token)match(input,KW_DISTINCT,FOLLOW_KW_DISTINCT_in_setOperator15548); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_DISTINCT.add(KW_DISTINCT945);

							}
							break;

					}

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2406:29: -> ^( TOK_EXCEPTDISTINCT )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2406:32: ^( TOK_EXCEPTDISTINCT )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_EXCEPTDISTINCT, "TOK_EXCEPTDISTINCT"), root_1);
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "setOperator"


	public static class queryStatementExpression_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "queryStatementExpression"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2409:1: queryStatementExpression : (w= withClause )? queryStatementExpressionBody -> queryStatementExpressionBody ;
	public final HiveParser.queryStatementExpression_return queryStatementExpression() throws RecognitionException {
		HiveParser.queryStatementExpression_return retval = new HiveParser.queryStatementExpression_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope w =null;
		ParserRuleReturnScope queryStatementExpressionBody946 =null;

		RewriteRuleSubtreeStream stream_withClause=new RewriteRuleSubtreeStream(adaptor,"rule withClause");
		RewriteRuleSubtreeStream stream_queryStatementExpressionBody=new RewriteRuleSubtreeStream(adaptor,"rule queryStatementExpressionBody");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2410:5: ( (w= withClause )? queryStatementExpressionBody -> queryStatementExpressionBody )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2415:5: (w= withClause )? queryStatementExpressionBody
			{
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2415:5: (w= withClause )?
			int alt273=2;
			int LA273_0 = input.LA(1);
			if ( (LA273_0==KW_WITH) ) {
				alt273=1;
			}
			switch (alt273) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2415:6: w= withClause
					{
					pushFollow(FOLLOW_withClause_in_queryStatementExpression15585);
					w=withClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_withClause.add(w.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_queryStatementExpressionBody_in_queryStatementExpression15593);
			queryStatementExpressionBody946=queryStatementExpressionBody();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_queryStatementExpressionBody.add(queryStatementExpressionBody946.getTree());
			if ( state.backtracking==0 ) {
			      if ((w!=null?((ASTNode)w.getTree()):null) != null) {
			      (queryStatementExpressionBody946!=null?((ASTNode)queryStatementExpressionBody946.getTree()):null).insertChild(0, (w!=null?((ASTNode)w.getTree()):null));
			      }
			    }
			// AST REWRITE
			// elements: queryStatementExpressionBody
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2421:5: -> queryStatementExpressionBody
			{
				adaptor.addChild(root_0, stream_queryStatementExpressionBody.nextTree());
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "queryStatementExpression"


	public static class queryStatementExpressionBody_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "queryStatementExpressionBody"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2424:1: queryStatementExpressionBody : ( fromStatement | regularBody );
	public final HiveParser.queryStatementExpressionBody_return queryStatementExpressionBody() throws RecognitionException {
		HiveParser.queryStatementExpressionBody_return retval = new HiveParser.queryStatementExpressionBody_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope fromStatement947 =null;
		ParserRuleReturnScope regularBody948 =null;


		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2425:5: ( fromStatement | regularBody )
			int alt274=2;
			int LA274_0 = input.LA(1);
			if ( (LA274_0==KW_FROM) ) {
				alt274=1;
			}
			else if ( (LA274_0==KW_INSERT||LA274_0==KW_MAP||LA274_0==KW_REDUCE||LA274_0==KW_SELECT||LA274_0==LPAREN) ) {
				alt274=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 274, 0, input);
				throw nvae;
			}

			switch (alt274) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2426:5: fromStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_fromStatement_in_queryStatementExpressionBody15625);
					fromStatement947=fromStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, fromStatement947.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2427:7: regularBody
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_regularBody_in_queryStatementExpressionBody15633);
					regularBody948=regularBody();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, regularBody948.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "queryStatementExpressionBody"


	public static class withClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "withClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2430:1: withClause : KW_WITH cteStatement ( COMMA cteStatement )* -> ^( TOK_CTE ( cteStatement )+ ) ;
	public final HiveParser.withClause_return withClause() throws RecognitionException {
		HiveParser.withClause_return retval = new HiveParser.withClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WITH949=null;
		Token COMMA951=null;
		ParserRuleReturnScope cteStatement950 =null;
		ParserRuleReturnScope cteStatement952 =null;

		ASTNode KW_WITH949_tree=null;
		ASTNode COMMA951_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleSubtreeStream stream_cteStatement=new RewriteRuleSubtreeStream(adaptor,"rule cteStatement");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2431:3: ( KW_WITH cteStatement ( COMMA cteStatement )* -> ^( TOK_CTE ( cteStatement )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2432:3: KW_WITH cteStatement ( COMMA cteStatement )*
			{
			KW_WITH949=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_withClause15650); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WITH.add(KW_WITH949);

			pushFollow(FOLLOW_cteStatement_in_withClause15652);
			cteStatement950=cteStatement();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_cteStatement.add(cteStatement950.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2432:24: ( COMMA cteStatement )*
			loop275:
			while (true) {
				int alt275=2;
				int LA275_0 = input.LA(1);
				if ( (LA275_0==COMMA) ) {
					alt275=1;
				}

				switch (alt275) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2432:25: COMMA cteStatement
					{
					COMMA951=(Token)match(input,COMMA,FOLLOW_COMMA_in_withClause15655); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA951);

					pushFollow(FOLLOW_cteStatement_in_withClause15657);
					cteStatement952=cteStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_cteStatement.add(cteStatement952.getTree());
					}
					break;

				default :
					break loop275;
				}
			}

			// AST REWRITE
			// elements: cteStatement
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2432:46: -> ^( TOK_CTE ( cteStatement )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2432:49: ^( TOK_CTE ( cteStatement )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_CTE, "TOK_CTE"), root_1);
				if ( !(stream_cteStatement.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_cteStatement.hasNext() ) {
					adaptor.addChild(root_1, stream_cteStatement.nextTree());
				}
				stream_cteStatement.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "withClause"


	public static class cteStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "cteStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2435:1: cteStatement : identifier KW_AS LPAREN queryStatementExpression RPAREN -> ^( TOK_SUBQUERY queryStatementExpression identifier ) ;
	public final HiveParser.cteStatement_return cteStatement() throws RecognitionException {
		HiveParser.cteStatement_return retval = new HiveParser.cteStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_AS954=null;
		Token LPAREN955=null;
		Token RPAREN957=null;
		ParserRuleReturnScope identifier953 =null;
		ParserRuleReturnScope queryStatementExpression956 =null;

		ASTNode KW_AS954_tree=null;
		ASTNode LPAREN955_tree=null;
		ASTNode RPAREN957_tree=null;
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_queryStatementExpression=new RewriteRuleSubtreeStream(adaptor,"rule queryStatementExpression");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2436:4: ( identifier KW_AS LPAREN queryStatementExpression RPAREN -> ^( TOK_SUBQUERY queryStatementExpression identifier ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2437:4: identifier KW_AS LPAREN queryStatementExpression RPAREN
			{
			pushFollow(FOLLOW_identifier_in_cteStatement15683);
			identifier953=identifier();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_identifier.add(identifier953.getTree());
			KW_AS954=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_cteStatement15685); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS954);

			LPAREN955=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_cteStatement15687); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN955);

			pushFollow(FOLLOW_queryStatementExpression_in_cteStatement15689);
			queryStatementExpression956=queryStatementExpression();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_queryStatementExpression.add(queryStatementExpression956.getTree());
			RPAREN957=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_cteStatement15691); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN957);

			// AST REWRITE
			// elements: identifier, queryStatementExpression
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2438:4: -> ^( TOK_SUBQUERY queryStatementExpression identifier )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2438:7: ^( TOK_SUBQUERY queryStatementExpression identifier )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUBQUERY, "TOK_SUBQUERY"), root_1);
				adaptor.addChild(root_1, stream_queryStatementExpression.nextTree());
				adaptor.addChild(root_1, stream_identifier.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "cteStatement"


	public static class fromStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "fromStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2441:1: fromStatement : ( singleFromStatement -> singleFromStatement ) (u= setOperator r= singleFromStatement -> ^( $u $r) )* -> {u != null}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) ->;
	public final HiveParser.fromStatement_return fromStatement() throws RecognitionException {
		HiveParser.fromStatement_return retval = new HiveParser.fromStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope u =null;
		ParserRuleReturnScope r =null;
		ParserRuleReturnScope singleFromStatement958 =null;

		RewriteRuleSubtreeStream stream_setOperator=new RewriteRuleSubtreeStream(adaptor,"rule setOperator");
		RewriteRuleSubtreeStream stream_singleFromStatement=new RewriteRuleSubtreeStream(adaptor,"rule singleFromStatement");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2442:3: ( ( singleFromStatement -> singleFromStatement ) (u= setOperator r= singleFromStatement -> ^( $u $r) )* -> {u != null}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) ->)
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2442:3: ( singleFromStatement -> singleFromStatement ) (u= setOperator r= singleFromStatement -> ^( $u $r) )*
			{
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2442:3: ( singleFromStatement -> singleFromStatement )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2442:4: singleFromStatement
			{
			pushFollow(FOLLOW_singleFromStatement_in_fromStatement15714);
			singleFromStatement958=singleFromStatement();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_singleFromStatement.add(singleFromStatement958.getTree());
			// AST REWRITE
			// elements: singleFromStatement
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2442:25: -> singleFromStatement
			{
				adaptor.addChild(root_0, stream_singleFromStatement.nextTree());
			}


			retval.tree = root_0;
			}

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2443:2: (u= setOperator r= singleFromStatement -> ^( $u $r) )*
			loop276:
			while (true) {
				int alt276=2;
				int LA276_0 = input.LA(1);
				if ( (LA276_0==KW_EXCEPT||LA276_0==KW_INTERSECT||LA276_0==KW_MINUS||LA276_0==KW_UNION) ) {
					alt276=1;
				}

				switch (alt276) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2443:3: u= setOperator r= singleFromStatement
					{
					pushFollow(FOLLOW_setOperator_in_fromStatement15726);
					u=setOperator();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_setOperator.add(u.getTree());
					pushFollow(FOLLOW_singleFromStatement_in_fromStatement15730);
					r=singleFromStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_singleFromStatement.add(r.getTree());
					// AST REWRITE
					// elements: r, u
					// token labels: 
					// rule labels: r, u, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_r=new RewriteRuleSubtreeStream(adaptor,"rule r",r!=null?r.getTree():null);
					RewriteRuleSubtreeStream stream_u=new RewriteRuleSubtreeStream(adaptor,"rule u",u!=null?u.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2444:4: -> ^( $u $r)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2444:7: ^( $u $r)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot(stream_u.nextNode(), root_1);
						adaptor.addChild(root_1, retval.tree);
						adaptor.addChild(root_1, stream_r.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

				default :
					break loop276;
				}
			}

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2446:3: -> {u != null}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
			if (u != null) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2446:19: ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2447:9: ^( TOK_FROM ^( TOK_SUBQUERY ) )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2448:11: ^( TOK_SUBQUERY )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUBQUERY, "TOK_SUBQUERY"), root_3);
				adaptor.addChild(root_3, retval.tree);
				adaptor.addChild(root_3, adaptor.create(Identifier, generateUnionAlias()));
				adaptor.addChild(root_2, root_3);
				}

				adaptor.addChild(root_1, root_2);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2453:9: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2454:12: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_3);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2454:30: ^( TOK_DIR TOK_TMP_FILE )
				{
				ASTNode root_4 = (ASTNode)adaptor.nil();
				root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_4);
				adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
				adaptor.addChild(root_3, root_4);
				}

				adaptor.addChild(root_2, root_3);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2455:12: ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELECT, "TOK_SELECT"), root_3);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2455:25: ^( TOK_SELEXPR TOK_SETCOLREF )
				{
				ASTNode root_4 = (ASTNode)adaptor.nil();
				root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELEXPR, "TOK_SELEXPR"), root_4);
				adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_SETCOLREF, "TOK_SETCOLREF"));
				adaptor.addChild(root_3, root_4);
				}

				adaptor.addChild(root_2, root_3);
				}

				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2458:5: ->
			{
				adaptor.addChild(root_0, retval.tree);
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "fromStatement"


	public static class singleFromStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "singleFromStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2462:1: singleFromStatement : fromClause (b+= body )+ -> ^( TOK_QUERY fromClause ( body )+ ) ;
	public final HiveParser.singleFromStatement_return singleFromStatement() throws RecognitionException {
		HiveParser.singleFromStatement_return retval = new HiveParser.singleFromStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		List list_b=null;
		ParserRuleReturnScope fromClause959 =null;
		RuleReturnScope b = null;
		RewriteRuleSubtreeStream stream_fromClause=new RewriteRuleSubtreeStream(adaptor,"rule fromClause");
		RewriteRuleSubtreeStream stream_body=new RewriteRuleSubtreeStream(adaptor,"rule body");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2463:5: ( fromClause (b+= body )+ -> ^( TOK_QUERY fromClause ( body )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2464:5: fromClause (b+= body )+
			{
			pushFollow(FOLLOW_fromClause_in_singleFromStatement15937);
			fromClause959=fromClause();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_fromClause.add(fromClause959.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2465:5: (b+= body )+
			int cnt277=0;
			loop277:
			while (true) {
				int alt277=2;
				int LA277_0 = input.LA(1);
				if ( (LA277_0==KW_INSERT||LA277_0==KW_MAP||LA277_0==KW_REDUCE||LA277_0==KW_SELECT) ) {
					alt277=1;
				}

				switch (alt277) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2465:7: b+= body
					{
					pushFollow(FOLLOW_body_in_singleFromStatement15947);
					b=body();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_body.add(b.getTree());
					if (list_b==null) list_b=new ArrayList();
					list_b.add(b.getTree());
					}
					break;

				default :
					if ( cnt277 >= 1 ) break loop277;
					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee = new EarlyExitException(277, input);
					throw eee;
				}
				cnt277++;
			}

			// AST REWRITE
			// elements: body, fromClause
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2465:18: -> ^( TOK_QUERY fromClause ( body )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2465:21: ^( TOK_QUERY fromClause ( body )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
				adaptor.addChild(root_1, stream_fromClause.nextTree());
				if ( !(stream_body.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_body.hasNext() ) {
					adaptor.addChild(root_1, stream_body.nextTree());
				}
				stream_body.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "singleFromStatement"


	public static class regularBody_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "regularBody"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2475:1: regularBody : (i= insertClause (s= selectStatement ->| valuesClause -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) ) ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) ) ) ) | selectStatement );
	public final HiveParser.regularBody_return regularBody() throws RecognitionException {
		HiveParser.regularBody_return retval = new HiveParser.regularBody_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope i =null;
		ParserRuleReturnScope s =null;
		ParserRuleReturnScope valuesClause960 =null;
		ParserRuleReturnScope selectStatement961 =null;

		RewriteRuleSubtreeStream stream_insertClause=new RewriteRuleSubtreeStream(adaptor,"rule insertClause");
		RewriteRuleSubtreeStream stream_valuesClause=new RewriteRuleSubtreeStream(adaptor,"rule valuesClause");
		RewriteRuleSubtreeStream stream_selectStatement=new RewriteRuleSubtreeStream(adaptor,"rule selectStatement");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2476:4: (i= insertClause (s= selectStatement ->| valuesClause -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) ) ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) ) ) ) | selectStatement )
			int alt279=2;
			int LA279_0 = input.LA(1);
			if ( (LA279_0==KW_INSERT) ) {
				alt279=1;
			}
			else if ( (LA279_0==KW_MAP||LA279_0==KW_REDUCE||LA279_0==KW_SELECT||LA279_0==LPAREN) ) {
				alt279=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 279, 0, input);
				throw nvae;
			}

			switch (alt279) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2477:4: i= insertClause (s= selectStatement ->| valuesClause -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) ) ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) ) ) )
					{
					pushFollow(FOLLOW_insertClause_in_regularBody15984);
					i=insertClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_insertClause.add(i.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2478:4: (s= selectStatement ->| valuesClause -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) ) ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) ) ) )
					int alt278=2;
					int LA278_0 = input.LA(1);
					if ( (LA278_0==KW_MAP||LA278_0==KW_REDUCE||LA278_0==KW_SELECT||LA278_0==LPAREN) ) {
						alt278=1;
					}
					else if ( (LA278_0==KW_VALUES) ) {
						alt278=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						NoViableAltException nvae =
							new NoViableAltException("", 278, 0, input);
						throw nvae;
					}

					switch (alt278) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2479:4: s= selectStatement
							{
							pushFollow(FOLLOW_selectStatement_in_regularBody15996);
							s=selectStatement();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_selectStatement.add(s.getTree());
							if ( state.backtracking==0 ) {(s!=null?((ASTNode)s.getTree()):null).getFirstChildWithType(TOK_INSERT).replaceChildren(0, 0, (i!=null?((ASTNode)i.getTree()):null));}
							// AST REWRITE
							// elements: 
							// token labels: 
							// rule labels: retval
							// token list labels: 
							// rule list labels: 
							// wildcard labels: 
							if ( state.backtracking==0 ) {
							retval.tree = root_0;
							RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

							root_0 = (ASTNode)adaptor.nil();
							// 2480:82: ->
							{
								adaptor.addChild(root_0, (s!=null?((ASTNode)s.getTree()):null));
							}


							retval.tree = root_0;
							}

							}
							break;
						case 2 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2482:6: valuesClause
							{
							pushFollow(FOLLOW_valuesClause_in_regularBody16021);
							valuesClause960=valuesClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_valuesClause.add(valuesClause960.getTree());
							// AST REWRITE
							// elements: valuesClause
							// token labels: 
							// rule labels: retval
							// token list labels: 
							// rule list labels: 
							// wildcard labels: 
							if ( state.backtracking==0 ) {
							retval.tree = root_0;
							RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

							root_0 = (ASTNode)adaptor.nil();
							// 2483:7: -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) ) ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) ) )
							{
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2483:10: ^( TOK_QUERY ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) ) ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) ) )
								{
								ASTNode root_1 = (ASTNode)adaptor.nil();
								root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2484:13: ^( TOK_FROM ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause ) )
								{
								ASTNode root_2 = (ASTNode)adaptor.nil();
								root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2485:15: ^( TOK_VIRTUAL_TABLE ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) ) valuesClause )
								{
								ASTNode root_3 = (ASTNode)adaptor.nil();
								root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_VIRTUAL_TABLE, "TOK_VIRTUAL_TABLE"), root_3);
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2485:35: ^( TOK_VIRTUAL_TABREF ^( TOK_ANONYMOUS ) )
								{
								ASTNode root_4 = (ASTNode)adaptor.nil();
								root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_VIRTUAL_TABREF, "TOK_VIRTUAL_TABREF"), root_4);
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2485:56: ^( TOK_ANONYMOUS )
								{
								ASTNode root_5 = (ASTNode)adaptor.nil();
								root_5 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ANONYMOUS, "TOK_ANONYMOUS"), root_5);
								adaptor.addChild(root_4, root_5);
								}

								adaptor.addChild(root_3, root_4);
								}

								adaptor.addChild(root_3, stream_valuesClause.nextTree());
								adaptor.addChild(root_2, root_3);
								}

								adaptor.addChild(root_1, root_2);
								}

								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2487:13: ^( TOK_INSERT ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) ) )
								{
								ASTNode root_2 = (ASTNode)adaptor.nil();
								root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
								adaptor.addChild(root_2, (i!=null?((ASTNode)i.getTree()):null));
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2487:36: ^( TOK_SELECT ^( TOK_SELEXPR TOK_ALLCOLREF ) )
								{
								ASTNode root_3 = (ASTNode)adaptor.nil();
								root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELECT, "TOK_SELECT"), root_3);
								// org/apache/hadoop/hive/ql/parse/HiveParser.g:2487:49: ^( TOK_SELEXPR TOK_ALLCOLREF )
								{
								ASTNode root_4 = (ASTNode)adaptor.nil();
								root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELEXPR, "TOK_SELEXPR"), root_4);
								adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_ALLCOLREF, "TOK_ALLCOLREF"));
								adaptor.addChild(root_3, root_4);
								}

								adaptor.addChild(root_2, root_3);
								}

								adaptor.addChild(root_1, root_2);
								}

								adaptor.addChild(root_0, root_1);
								}

							}


							retval.tree = root_0;
							}

							}
							break;

					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2491:4: selectStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_selectStatement_in_regularBody16145);
					selectStatement961=selectStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, selectStatement961.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "regularBody"


	public static class atomSelectStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "atomSelectStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2494:1: atomSelectStatement : (s= selectClause (f= fromClause )? (w= whereClause )? (g= groupByClause )? (h= havingClause )? (win= window_clause )? -> ^( TOK_QUERY ( $f)? ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) $s ( $w)? ( $g)? ( $h)? ( $win)? ) ) | LPAREN ! selectStatement RPAREN !);
	public final HiveParser.atomSelectStatement_return atomSelectStatement() throws RecognitionException {
		HiveParser.atomSelectStatement_return retval = new HiveParser.atomSelectStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token LPAREN962=null;
		Token RPAREN964=null;
		ParserRuleReturnScope s =null;
		ParserRuleReturnScope f =null;
		ParserRuleReturnScope w =null;
		ParserRuleReturnScope g =null;
		ParserRuleReturnScope h =null;
		ParserRuleReturnScope win =null;
		ParserRuleReturnScope selectStatement963 =null;

		ASTNode LPAREN962_tree=null;
		ASTNode RPAREN964_tree=null;
		RewriteRuleSubtreeStream stream_whereClause=new RewriteRuleSubtreeStream(adaptor,"rule whereClause");
		RewriteRuleSubtreeStream stream_havingClause=new RewriteRuleSubtreeStream(adaptor,"rule havingClause");
		RewriteRuleSubtreeStream stream_fromClause=new RewriteRuleSubtreeStream(adaptor,"rule fromClause");
		RewriteRuleSubtreeStream stream_selectClause=new RewriteRuleSubtreeStream(adaptor,"rule selectClause");
		RewriteRuleSubtreeStream stream_groupByClause=new RewriteRuleSubtreeStream(adaptor,"rule groupByClause");
		RewriteRuleSubtreeStream stream_window_clause=new RewriteRuleSubtreeStream(adaptor,"rule window_clause");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2495:4: (s= selectClause (f= fromClause )? (w= whereClause )? (g= groupByClause )? (h= havingClause )? (win= window_clause )? -> ^( TOK_QUERY ( $f)? ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) $s ( $w)? ( $g)? ( $h)? ( $win)? ) ) | LPAREN ! selectStatement RPAREN !)
			int alt285=2;
			int LA285_0 = input.LA(1);
			if ( (LA285_0==KW_MAP||LA285_0==KW_REDUCE||LA285_0==KW_SELECT) ) {
				alt285=1;
			}
			else if ( (LA285_0==LPAREN) ) {
				alt285=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 285, 0, input);
				throw nvae;
			}

			switch (alt285) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2496:4: s= selectClause (f= fromClause )? (w= whereClause )? (g= groupByClause )? (h= havingClause )? (win= window_clause )?
					{
					pushFollow(FOLLOW_selectClause_in_atomSelectStatement16165);
					s=selectClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_selectClause.add(s.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2497:5: (f= fromClause )?
					int alt280=2;
					int LA280_0 = input.LA(1);
					if ( (LA280_0==KW_FROM) ) {
						alt280=1;
					}
					switch (alt280) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2497:5: f= fromClause
							{
							pushFollow(FOLLOW_fromClause_in_atomSelectStatement16172);
							f=fromClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_fromClause.add(f.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2498:5: (w= whereClause )?
					int alt281=2;
					int LA281_0 = input.LA(1);
					if ( (LA281_0==KW_WHERE) ) {
						alt281=1;
					}
					switch (alt281) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2498:5: w= whereClause
							{
							pushFollow(FOLLOW_whereClause_in_atomSelectStatement16180);
							w=whereClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_whereClause.add(w.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2499:5: (g= groupByClause )?
					int alt282=2;
					int LA282_0 = input.LA(1);
					if ( (LA282_0==KW_GROUP) ) {
						alt282=1;
					}
					switch (alt282) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2499:5: g= groupByClause
							{
							pushFollow(FOLLOW_groupByClause_in_atomSelectStatement16188);
							g=groupByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_groupByClause.add(g.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2500:5: (h= havingClause )?
					int alt283=2;
					int LA283_0 = input.LA(1);
					if ( (LA283_0==KW_HAVING) ) {
						alt283=1;
					}
					switch (alt283) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2500:5: h= havingClause
							{
							pushFollow(FOLLOW_havingClause_in_atomSelectStatement16196);
							h=havingClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_havingClause.add(h.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2501:7: (win= window_clause )?
					int alt284=2;
					int LA284_0 = input.LA(1);
					if ( (LA284_0==KW_WINDOW) ) {
						alt284=1;
					}
					switch (alt284) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2501:7: win= window_clause
							{
							pushFollow(FOLLOW_window_clause_in_atomSelectStatement16204);
							win=window_clause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_window_clause.add(win.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: win, s, f, w, g, h
					// token labels: 
					// rule labels: s, f, w, g, h, win, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"rule s",s!=null?s.getTree():null);
					RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"rule f",f!=null?f.getTree():null);
					RewriteRuleSubtreeStream stream_w=new RewriteRuleSubtreeStream(adaptor,"rule w",w!=null?w.getTree():null);
					RewriteRuleSubtreeStream stream_g=new RewriteRuleSubtreeStream(adaptor,"rule g",g!=null?g.getTree():null);
					RewriteRuleSubtreeStream stream_h=new RewriteRuleSubtreeStream(adaptor,"rule h",h!=null?h.getTree():null);
					RewriteRuleSubtreeStream stream_win=new RewriteRuleSubtreeStream(adaptor,"rule win",win!=null?win.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2502:4: -> ^( TOK_QUERY ( $f)? ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) $s ( $w)? ( $g)? ( $h)? ( $win)? ) )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2502:7: ^( TOK_QUERY ( $f)? ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) $s ( $w)? ( $g)? ( $h)? ( $win)? ) )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2502:20: ( $f)?
						if ( stream_f.hasNext() ) {
							adaptor.addChild(root_1, stream_f.nextTree());
						}
						stream_f.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2502:23: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) $s ( $w)? ( $g)? ( $h)? ( $win)? )
						{
						ASTNode root_2 = (ASTNode)adaptor.nil();
						root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2502:36: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2502:54: ^( TOK_DIR TOK_TMP_FILE )
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_4);
						adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_2, root_3);
						}

						adaptor.addChild(root_2, stream_s.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2503:26: ( $w)?
						if ( stream_w.hasNext() ) {
							adaptor.addChild(root_2, stream_w.nextTree());
						}
						stream_w.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2503:30: ( $g)?
						if ( stream_g.hasNext() ) {
							adaptor.addChild(root_2, stream_g.nextTree());
						}
						stream_g.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2503:34: ( $h)?
						if ( stream_h.hasNext() ) {
							adaptor.addChild(root_2, stream_h.nextTree());
						}
						stream_h.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2503:38: ( $win)?
						if ( stream_win.hasNext() ) {
							adaptor.addChild(root_2, stream_win.nextTree());
						}
						stream_win.reset();

						adaptor.addChild(root_1, root_2);
						}

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2505:4: LPAREN ! selectStatement RPAREN !
					{
					root_0 = (ASTNode)adaptor.nil();


					LPAREN962=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_atomSelectStatement16282); if (state.failed) return retval;
					pushFollow(FOLLOW_selectStatement_in_atomSelectStatement16285);
					selectStatement963=selectStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, selectStatement963.getTree());

					RPAREN964=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_atomSelectStatement16287); if (state.failed) return retval;
					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "atomSelectStatement"


	public static class selectStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "selectStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2508:1: selectStatement : a= atomSelectStatement (set= setOpSelectStatement[$atomSelectStatement.tree] )? (o= orderByClause )? (c= clusterByClause )? (d= distributeByClause )? (sort= sortByClause )? (l= limitClause )? -> {set == null}? -> {o==null && c==null && d==null && sort==null && l==null}? -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ( $o)? ( $c)? ( $d)? ( $sort)? ( $l)? ) ) ;
	public final HiveParser.selectStatement_return selectStatement() throws RecognitionException {
		HiveParser.selectStatement_return retval = new HiveParser.selectStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope a =null;
		ParserRuleReturnScope set =null;
		ParserRuleReturnScope o =null;
		ParserRuleReturnScope c =null;
		ParserRuleReturnScope d =null;
		ParserRuleReturnScope sort =null;
		ParserRuleReturnScope l =null;

		RewriteRuleSubtreeStream stream_clusterByClause=new RewriteRuleSubtreeStream(adaptor,"rule clusterByClause");
		RewriteRuleSubtreeStream stream_setOpSelectStatement=new RewriteRuleSubtreeStream(adaptor,"rule setOpSelectStatement");
		RewriteRuleSubtreeStream stream_sortByClause=new RewriteRuleSubtreeStream(adaptor,"rule sortByClause");
		RewriteRuleSubtreeStream stream_distributeByClause=new RewriteRuleSubtreeStream(adaptor,"rule distributeByClause");
		RewriteRuleSubtreeStream stream_limitClause=new RewriteRuleSubtreeStream(adaptor,"rule limitClause");
		RewriteRuleSubtreeStream stream_atomSelectStatement=new RewriteRuleSubtreeStream(adaptor,"rule atomSelectStatement");
		RewriteRuleSubtreeStream stream_orderByClause=new RewriteRuleSubtreeStream(adaptor,"rule orderByClause");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2509:4: (a= atomSelectStatement (set= setOpSelectStatement[$atomSelectStatement.tree] )? (o= orderByClause )? (c= clusterByClause )? (d= distributeByClause )? (sort= sortByClause )? (l= limitClause )? -> {set == null}? -> {o==null && c==null && d==null && sort==null && l==null}? -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ( $o)? ( $c)? ( $d)? ( $sort)? ( $l)? ) ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2510:4: a= atomSelectStatement (set= setOpSelectStatement[$atomSelectStatement.tree] )? (o= orderByClause )? (c= clusterByClause )? (d= distributeByClause )? (sort= sortByClause )? (l= limitClause )?
			{
			pushFollow(FOLLOW_atomSelectStatement_in_selectStatement16308);
			a=atomSelectStatement();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_atomSelectStatement.add(a.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2511:7: (set= setOpSelectStatement[$atomSelectStatement.tree] )?
			int alt286=2;
			int LA286_0 = input.LA(1);
			if ( (LA286_0==KW_EXCEPT||LA286_0==KW_INTERSECT||LA286_0==KW_MINUS||LA286_0==KW_UNION) ) {
				alt286=1;
			}
			switch (alt286) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2511:7: set= setOpSelectStatement[$atomSelectStatement.tree]
					{
					pushFollow(FOLLOW_setOpSelectStatement_in_selectStatement16315);
					set=setOpSelectStatement((a!=null?((ASTNode)a.getTree()):null));
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_setOpSelectStatement.add(set.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2512:5: (o= orderByClause )?
			int alt287=2;
			int LA287_0 = input.LA(1);
			if ( (LA287_0==KW_ORDER) ) {
				alt287=1;
			}
			switch (alt287) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2512:5: o= orderByClause
					{
					pushFollow(FOLLOW_orderByClause_in_selectStatement16324);
					o=orderByClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_orderByClause.add(o.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2513:5: (c= clusterByClause )?
			int alt288=2;
			int LA288_0 = input.LA(1);
			if ( (LA288_0==KW_CLUSTER) ) {
				alt288=1;
			}
			switch (alt288) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2513:5: c= clusterByClause
					{
					pushFollow(FOLLOW_clusterByClause_in_selectStatement16332);
					c=clusterByClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_clusterByClause.add(c.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2514:5: (d= distributeByClause )?
			int alt289=2;
			int LA289_0 = input.LA(1);
			if ( (LA289_0==KW_DISTRIBUTE) ) {
				alt289=1;
			}
			switch (alt289) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2514:5: d= distributeByClause
					{
					pushFollow(FOLLOW_distributeByClause_in_selectStatement16340);
					d=distributeByClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_distributeByClause.add(d.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2515:8: (sort= sortByClause )?
			int alt290=2;
			int LA290_0 = input.LA(1);
			if ( (LA290_0==KW_SORT) ) {
				alt290=1;
			}
			switch (alt290) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2515:8: sort= sortByClause
					{
					pushFollow(FOLLOW_sortByClause_in_selectStatement16348);
					sort=sortByClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_sortByClause.add(sort.getTree());
					}
					break;

			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2516:5: (l= limitClause )?
			int alt291=2;
			int LA291_0 = input.LA(1);
			if ( (LA291_0==KW_LIMIT) ) {
				alt291=1;
			}
			switch (alt291) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2516:5: l= limitClause
					{
					pushFollow(FOLLOW_limitClause_in_selectStatement16356);
					l=limitClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_limitClause.add(l.getTree());
					}
					break;

			}

			if ( state.backtracking==0 ) {
			   if(set == null){
			   (a!=null?((ASTNode)a.getTree()):null).getFirstChildWithType(TOK_INSERT).addChild((o!=null?((ASTNode)o.getTree()):null));
			   (a!=null?((ASTNode)a.getTree()):null).getFirstChildWithType(TOK_INSERT).addChild((c!=null?((ASTNode)c.getTree()):null));
			   (a!=null?((ASTNode)a.getTree()):null).getFirstChildWithType(TOK_INSERT).addChild((d!=null?((ASTNode)d.getTree()):null));
			   (a!=null?((ASTNode)a.getTree()):null).getFirstChildWithType(TOK_INSERT).addChild((sort!=null?((ASTNode)sort.getTree()):null));
			   (a!=null?((ASTNode)a.getTree()):null).getFirstChildWithType(TOK_INSERT).addChild((l!=null?((ASTNode)l.getTree()):null));
			   }
			   }
			// AST REWRITE
			// elements: d, o, sort, l, c
			// token labels: 
			// rule labels: c, d, sort, l, retval, o
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"rule c",c!=null?c.getTree():null);
			RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"rule d",d!=null?d.getTree():null);
			RewriteRuleSubtreeStream stream_sort=new RewriteRuleSubtreeStream(adaptor,"rule sort",sort!=null?sort.getTree():null);
			RewriteRuleSubtreeStream stream_l=new RewriteRuleSubtreeStream(adaptor,"rule l",l!=null?l.getTree():null);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
			RewriteRuleSubtreeStream stream_o=new RewriteRuleSubtreeStream(adaptor,"rule o",o!=null?o.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2526:4: -> {set == null}?
			if (set == null) {
				adaptor.addChild(root_0, (a!=null?((ASTNode)a.getTree()):null));
			}

			else // 2528:4: -> {o==null && c==null && d==null && sort==null && l==null}?
			if (o==null && c==null && d==null && sort==null && l==null) {
				adaptor.addChild(root_0, (set!=null?((ASTNode)set.getTree()):null));
			}

			else // 2530:4: -> ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ( $o)? ( $c)? ( $d)? ( $sort)? ( $l)? ) )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2530:7: ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ( $o)? ( $c)? ( $d)? ( $sort)? ( $l)? ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2531:11: ^( TOK_FROM ^( TOK_SUBQUERY ) )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2532:13: ^( TOK_SUBQUERY )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUBQUERY, "TOK_SUBQUERY"), root_3);
				adaptor.addChild(root_3, (set!=null?((ASTNode)set.getTree()):null));
				adaptor.addChild(root_3, adaptor.create(Identifier, generateUnionAlias()));
				adaptor.addChild(root_2, root_3);
				}

				adaptor.addChild(root_1, root_2);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2537:11: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ( $o)? ( $c)? ( $d)? ( $sort)? ( $l)? )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2538:14: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_3);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2538:32: ^( TOK_DIR TOK_TMP_FILE )
				{
				ASTNode root_4 = (ASTNode)adaptor.nil();
				root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_4);
				adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
				adaptor.addChild(root_3, root_4);
				}

				adaptor.addChild(root_2, root_3);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2539:14: ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELECT, "TOK_SELECT"), root_3);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2539:27: ^( TOK_SELEXPR TOK_SETCOLREF )
				{
				ASTNode root_4 = (ASTNode)adaptor.nil();
				root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELEXPR, "TOK_SELEXPR"), root_4);
				adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_SETCOLREF, "TOK_SETCOLREF"));
				adaptor.addChild(root_3, root_4);
				}

				adaptor.addChild(root_2, root_3);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2540:15: ( $o)?
				if ( stream_o.hasNext() ) {
					adaptor.addChild(root_2, stream_o.nextTree());
				}
				stream_o.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2540:19: ( $c)?
				if ( stream_c.hasNext() ) {
					adaptor.addChild(root_2, stream_c.nextTree());
				}
				stream_c.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2540:23: ( $d)?
				if ( stream_d.hasNext() ) {
					adaptor.addChild(root_2, stream_d.nextTree());
				}
				stream_d.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2540:27: ( $sort)?
				if ( stream_sort.hasNext() ) {
					adaptor.addChild(root_2, stream_sort.nextTree());
				}
				stream_sort.reset();

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2540:34: ( $l)?
				if ( stream_l.hasNext() ) {
					adaptor.addChild(root_2, stream_l.nextTree());
				}
				stream_l.reset();

				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "selectStatement"


	public static class setOpSelectStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "setOpSelectStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2545:1: setOpSelectStatement[CommonTree t] : (u= setOperator b= atomSelectStatement -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()!=HiveParser.TOK_UNIONDISTINCT}? ^( $u $b) -> {$setOpSelectStatement.tree == null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> ^( $u $b) )+ -> {$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_UNIONALL\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTDISTINCT\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTALL\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTDISTINCT\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTALL}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) ->;
	public final HiveParser.setOpSelectStatement_return setOpSelectStatement(CommonTree t) throws RecognitionException {
		HiveParser.setOpSelectStatement_return retval = new HiveParser.setOpSelectStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope u =null;
		ParserRuleReturnScope b =null;

		RewriteRuleSubtreeStream stream_setOperator=new RewriteRuleSubtreeStream(adaptor,"rule setOperator");
		RewriteRuleSubtreeStream stream_atomSelectStatement=new RewriteRuleSubtreeStream(adaptor,"rule atomSelectStatement");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2546:4: ( (u= setOperator b= atomSelectStatement -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()!=HiveParser.TOK_UNIONDISTINCT}? ^( $u $b) -> {$setOpSelectStatement.tree == null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> ^( $u $b) )+ -> {$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_UNIONALL\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTDISTINCT\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTALL\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTDISTINCT\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTALL}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) ->)
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2547:4: (u= setOperator b= atomSelectStatement -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()!=HiveParser.TOK_UNIONDISTINCT}? ^( $u $b) -> {$setOpSelectStatement.tree == null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> ^( $u $b) )+
			{
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2547:4: (u= setOperator b= atomSelectStatement -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()!=HiveParser.TOK_UNIONDISTINCT}? ^( $u $b) -> {$setOpSelectStatement.tree == null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) ) -> ^( $u $b) )+
			int cnt292=0;
			loop292:
			while (true) {
				int alt292=2;
				int LA292_0 = input.LA(1);
				if ( (LA292_0==KW_EXCEPT||LA292_0==KW_INTERSECT||LA292_0==KW_MINUS||LA292_0==KW_UNION) ) {
					alt292=1;
				}

				switch (alt292) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2547:5: u= setOperator b= atomSelectStatement
					{
					pushFollow(FOLLOW_setOperator_in_setOpSelectStatement16621);
					u=setOperator();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_setOperator.add(u.getTree());
					pushFollow(FOLLOW_atomSelectStatement_in_setOpSelectStatement16625);
					b=atomSelectStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_atomSelectStatement.add(b.getTree());
					// AST REWRITE
					// elements: b, b, b, u, b, u
					// token labels: 
					// rule labels: b, u, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"rule b",b!=null?b.getTree():null);
					RewriteRuleSubtreeStream stream_u=new RewriteRuleSubtreeStream(adaptor,"rule u",u!=null?u.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2548:4: -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
					if (retval.tree != null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT) {
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2549:7: ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2550:11: ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) )
						{
						ASTNode root_2 = (ASTNode)adaptor.nil();
						root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2551:13: ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUBQUERY, "TOK_SUBQUERY"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2552:15: ^( TOK_UNIONALL $b)
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNIONALL, "TOK_UNIONALL"), root_4);
						adaptor.addChild(root_4, retval.tree);
						adaptor.addChild(root_4, stream_b.nextTree());
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_3, adaptor.create(Identifier, generateUnionAlias()));
						adaptor.addChild(root_2, root_3);
						}

						adaptor.addChild(root_1, root_2);
						}

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2556:11: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) )
						{
						ASTNode root_2 = (ASTNode)adaptor.nil();
						root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2557:14: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2557:32: ^( TOK_DIR TOK_TMP_FILE )
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_4);
						adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_2, root_3);
						}

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2558:14: ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELECTDI, "TOK_SELECTDI"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2558:29: ^( TOK_SELEXPR TOK_SETCOLREF )
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELEXPR, "TOK_SELEXPR"), root_4);
						adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_SETCOLREF, "TOK_SETCOLREF"));
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_2, root_3);
						}

						adaptor.addChild(root_1, root_2);
						}

						adaptor.addChild(root_0, root_1);
						}

					}

					else // 2561:4: -> {$setOpSelectStatement.tree != null && ((CommonTree)u.getTree()).getType()!=HiveParser.TOK_UNIONDISTINCT}? ^( $u $b)
					if (retval.tree != null && ((CommonTree)u.getTree()).getType()!=HiveParser.TOK_UNIONDISTINCT) {
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2562:7: ^( $u $b)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot(stream_u.nextNode(), root_1);
						adaptor.addChild(root_1, retval.tree);
						adaptor.addChild(root_1, stream_b.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}

					else // 2563:4: -> {$setOpSelectStatement.tree == null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
					if (retval.tree == null && ((CommonTree)u.getTree()).getType()==HiveParser.TOK_UNIONDISTINCT) {
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2564:7: ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2565:11: ^( TOK_FROM ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) ) )
						{
						ASTNode root_2 = (ASTNode)adaptor.nil();
						root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2566:13: ^( TOK_SUBQUERY ^( TOK_UNIONALL $b) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUBQUERY, "TOK_SUBQUERY"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2567:15: ^( TOK_UNIONALL $b)
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UNIONALL, "TOK_UNIONALL"), root_4);
						adaptor.addChild(root_4, t);
						adaptor.addChild(root_4, stream_b.nextTree());
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_3, adaptor.create(Identifier, generateUnionAlias()));
						adaptor.addChild(root_2, root_3);
						}

						adaptor.addChild(root_1, root_2);
						}

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2571:11: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) ) )
						{
						ASTNode root_2 = (ASTNode)adaptor.nil();
						root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2572:13: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2572:31: ^( TOK_DIR TOK_TMP_FILE )
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_4);
						adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_2, root_3);
						}

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2573:13: ^( TOK_SELECTDI ^( TOK_SELEXPR TOK_SETCOLREF ) )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELECTDI, "TOK_SELECTDI"), root_3);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2573:28: ^( TOK_SELEXPR TOK_SETCOLREF )
						{
						ASTNode root_4 = (ASTNode)adaptor.nil();
						root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELEXPR, "TOK_SELEXPR"), root_4);
						adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_SETCOLREF, "TOK_SETCOLREF"));
						adaptor.addChild(root_3, root_4);
						}

						adaptor.addChild(root_2, root_3);
						}

						adaptor.addChild(root_1, root_2);
						}

						adaptor.addChild(root_0, root_1);
						}

					}

					else // 2576:4: -> ^( $u $b)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2576:7: ^( $u $b)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot(stream_u.nextNode(), root_1);
						adaptor.addChild(root_1, t);
						adaptor.addChild(root_1, stream_b.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

				default :
					if ( cnt292 >= 1 ) break loop292;
					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee = new EarlyExitException(292, input);
					throw eee;
				}
				cnt292++;
			}

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2578:4: -> {$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_UNIONALL\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTDISTINCT\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTALL\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTDISTINCT\n ||$setOpSelectStatement.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTALL}? ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
			if (retval.tree.getChild(0).getType()==HiveParser.TOK_UNIONALL
			   ||retval.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTDISTINCT
			   ||retval.tree.getChild(0).getType()==HiveParser.TOK_INTERSECTALL
			   ||retval.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTDISTINCT
			   ||retval.tree.getChild(0).getType()==HiveParser.TOK_EXCEPTALL) {
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2583:7: ^( TOK_QUERY ^( TOK_FROM ^( TOK_SUBQUERY ) ) ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) ) )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_QUERY, "TOK_QUERY"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2584:11: ^( TOK_FROM ^( TOK_SUBQUERY ) )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_FROM, "TOK_FROM"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2585:13: ^( TOK_SUBQUERY )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SUBQUERY, "TOK_SUBQUERY"), root_3);
				adaptor.addChild(root_3, retval.tree);
				adaptor.addChild(root_3, adaptor.create(Identifier, generateUnionAlias()));
				adaptor.addChild(root_2, root_3);
				}

				adaptor.addChild(root_1, root_2);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2590:11: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) ) )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2591:14: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_3);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2591:32: ^( TOK_DIR TOK_TMP_FILE )
				{
				ASTNode root_4 = (ASTNode)adaptor.nil();
				root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_4);
				adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
				adaptor.addChild(root_3, root_4);
				}

				adaptor.addChild(root_2, root_3);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2592:14: ^( TOK_SELECT ^( TOK_SELEXPR TOK_SETCOLREF ) )
				{
				ASTNode root_3 = (ASTNode)adaptor.nil();
				root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELECT, "TOK_SELECT"), root_3);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2592:27: ^( TOK_SELEXPR TOK_SETCOLREF )
				{
				ASTNode root_4 = (ASTNode)adaptor.nil();
				root_4 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SELEXPR, "TOK_SELEXPR"), root_4);
				adaptor.addChild(root_4, (ASTNode)adaptor.create(TOK_SETCOLREF, "TOK_SETCOLREF"));
				adaptor.addChild(root_3, root_4);
				}

				adaptor.addChild(root_2, root_3);
				}

				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_0, root_1);
				}

			}

			else // 2595:4: ->
			{
				adaptor.addChild(root_0, retval.tree);
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "setOpSelectStatement"


	public static class selectStatementWithCTE_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "selectStatementWithCTE"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2598:1: selectStatementWithCTE : (w= withClause )? selectStatement -> selectStatement ;
	public final HiveParser.selectStatementWithCTE_return selectStatementWithCTE() throws RecognitionException {
		HiveParser.selectStatementWithCTE_return retval = new HiveParser.selectStatementWithCTE_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope w =null;
		ParserRuleReturnScope selectStatement965 =null;

		RewriteRuleSubtreeStream stream_withClause=new RewriteRuleSubtreeStream(adaptor,"rule withClause");
		RewriteRuleSubtreeStream stream_selectStatement=new RewriteRuleSubtreeStream(adaptor,"rule selectStatement");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2599:5: ( (w= withClause )? selectStatement -> selectStatement )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2600:5: (w= withClause )? selectStatement
			{
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2600:5: (w= withClause )?
			int alt293=2;
			int LA293_0 = input.LA(1);
			if ( (LA293_0==KW_WITH) ) {
				alt293=1;
			}
			switch (alt293) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2600:6: w= withClause
					{
					pushFollow(FOLLOW_withClause_in_selectStatementWithCTE17260);
					w=withClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_withClause.add(w.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_selectStatement_in_selectStatementWithCTE17268);
			selectStatement965=selectStatement();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_selectStatement.add(selectStatement965.getTree());
			if ( state.backtracking==0 ) {
			      if ((w!=null?((ASTNode)w.getTree()):null) != null) {
			      (selectStatement965!=null?((ASTNode)selectStatement965.getTree()):null).insertChild(0, (w!=null?((ASTNode)w.getTree()):null));
			      }
			    }
			// AST REWRITE
			// elements: selectStatement
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2606:5: -> selectStatement
			{
				adaptor.addChild(root_0, stream_selectStatement.nextTree());
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "selectStatementWithCTE"


	public static class body_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "body"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2609:1: body : ( insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( window_clause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( limitClause )? -> ^( TOK_INSERT insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? ) | selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( window_clause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( limitClause )? -> ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? ) );
	public final HiveParser.body_return body() throws RecognitionException {
		HiveParser.body_return retval = new HiveParser.body_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope insertClause966 =null;
		ParserRuleReturnScope selectClause967 =null;
		ParserRuleReturnScope lateralView968 =null;
		ParserRuleReturnScope whereClause969 =null;
		ParserRuleReturnScope groupByClause970 =null;
		ParserRuleReturnScope havingClause971 =null;
		ParserRuleReturnScope window_clause972 =null;
		ParserRuleReturnScope orderByClause973 =null;
		ParserRuleReturnScope clusterByClause974 =null;
		ParserRuleReturnScope distributeByClause975 =null;
		ParserRuleReturnScope sortByClause976 =null;
		ParserRuleReturnScope limitClause977 =null;
		ParserRuleReturnScope selectClause978 =null;
		ParserRuleReturnScope lateralView979 =null;
		ParserRuleReturnScope whereClause980 =null;
		ParserRuleReturnScope groupByClause981 =null;
		ParserRuleReturnScope havingClause982 =null;
		ParserRuleReturnScope window_clause983 =null;
		ParserRuleReturnScope orderByClause984 =null;
		ParserRuleReturnScope clusterByClause985 =null;
		ParserRuleReturnScope distributeByClause986 =null;
		ParserRuleReturnScope sortByClause987 =null;
		ParserRuleReturnScope limitClause988 =null;

		RewriteRuleSubtreeStream stream_whereClause=new RewriteRuleSubtreeStream(adaptor,"rule whereClause");
		RewriteRuleSubtreeStream stream_havingClause=new RewriteRuleSubtreeStream(adaptor,"rule havingClause");
		RewriteRuleSubtreeStream stream_clusterByClause=new RewriteRuleSubtreeStream(adaptor,"rule clusterByClause");
		RewriteRuleSubtreeStream stream_lateralView=new RewriteRuleSubtreeStream(adaptor,"rule lateralView");
		RewriteRuleSubtreeStream stream_insertClause=new RewriteRuleSubtreeStream(adaptor,"rule insertClause");
		RewriteRuleSubtreeStream stream_selectClause=new RewriteRuleSubtreeStream(adaptor,"rule selectClause");
		RewriteRuleSubtreeStream stream_sortByClause=new RewriteRuleSubtreeStream(adaptor,"rule sortByClause");
		RewriteRuleSubtreeStream stream_groupByClause=new RewriteRuleSubtreeStream(adaptor,"rule groupByClause");
		RewriteRuleSubtreeStream stream_distributeByClause=new RewriteRuleSubtreeStream(adaptor,"rule distributeByClause");
		RewriteRuleSubtreeStream stream_limitClause=new RewriteRuleSubtreeStream(adaptor,"rule limitClause");
		RewriteRuleSubtreeStream stream_orderByClause=new RewriteRuleSubtreeStream(adaptor,"rule orderByClause");
		RewriteRuleSubtreeStream stream_window_clause=new RewriteRuleSubtreeStream(adaptor,"rule window_clause");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2610:4: ( insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( window_clause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( limitClause )? -> ^( TOK_INSERT insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? ) | selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( window_clause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( limitClause )? -> ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? ) )
			int alt314=2;
			int LA314_0 = input.LA(1);
			if ( (LA314_0==KW_INSERT) ) {
				alt314=1;
			}
			else if ( (LA314_0==KW_MAP||LA314_0==KW_REDUCE||LA314_0==KW_SELECT) ) {
				alt314=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 314, 0, input);
				throw nvae;
			}

			switch (alt314) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2611:4: insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( window_clause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( limitClause )?
					{
					pushFollow(FOLLOW_insertClause_in_body17298);
					insertClause966=insertClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_insertClause.add(insertClause966.getTree());
					pushFollow(FOLLOW_selectClause_in_body17303);
					selectClause967=selectClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_selectClause.add(selectClause967.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2613:4: ( lateralView )?
					int alt294=2;
					int LA294_0 = input.LA(1);
					if ( (LA294_0==KW_LATERAL) ) {
						alt294=1;
					}
					switch (alt294) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2613:4: lateralView
							{
							pushFollow(FOLLOW_lateralView_in_body17308);
							lateralView968=lateralView();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_lateralView.add(lateralView968.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2614:4: ( whereClause )?
					int alt295=2;
					int LA295_0 = input.LA(1);
					if ( (LA295_0==KW_WHERE) ) {
						alt295=1;
					}
					switch (alt295) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2614:4: whereClause
							{
							pushFollow(FOLLOW_whereClause_in_body17314);
							whereClause969=whereClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_whereClause.add(whereClause969.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2615:4: ( groupByClause )?
					int alt296=2;
					int LA296_0 = input.LA(1);
					if ( (LA296_0==KW_GROUP) ) {
						alt296=1;
					}
					switch (alt296) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2615:4: groupByClause
							{
							pushFollow(FOLLOW_groupByClause_in_body17320);
							groupByClause970=groupByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_groupByClause.add(groupByClause970.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2616:4: ( havingClause )?
					int alt297=2;
					int LA297_0 = input.LA(1);
					if ( (LA297_0==KW_HAVING) ) {
						alt297=1;
					}
					switch (alt297) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2616:4: havingClause
							{
							pushFollow(FOLLOW_havingClause_in_body17326);
							havingClause971=havingClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_havingClause.add(havingClause971.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2617:4: ( window_clause )?
					int alt298=2;
					int LA298_0 = input.LA(1);
					if ( (LA298_0==KW_WINDOW) ) {
						alt298=1;
					}
					switch (alt298) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2617:4: window_clause
							{
							pushFollow(FOLLOW_window_clause_in_body17332);
							window_clause972=window_clause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_window_clause.add(window_clause972.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2618:4: ( orderByClause )?
					int alt299=2;
					int LA299_0 = input.LA(1);
					if ( (LA299_0==KW_ORDER) ) {
						alt299=1;
					}
					switch (alt299) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2618:4: orderByClause
							{
							pushFollow(FOLLOW_orderByClause_in_body17338);
							orderByClause973=orderByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_orderByClause.add(orderByClause973.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2619:4: ( clusterByClause )?
					int alt300=2;
					int LA300_0 = input.LA(1);
					if ( (LA300_0==KW_CLUSTER) ) {
						alt300=1;
					}
					switch (alt300) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2619:4: clusterByClause
							{
							pushFollow(FOLLOW_clusterByClause_in_body17344);
							clusterByClause974=clusterByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_clusterByClause.add(clusterByClause974.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2620:4: ( distributeByClause )?
					int alt301=2;
					int LA301_0 = input.LA(1);
					if ( (LA301_0==KW_DISTRIBUTE) ) {
						alt301=1;
					}
					switch (alt301) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2620:4: distributeByClause
							{
							pushFollow(FOLLOW_distributeByClause_in_body17350);
							distributeByClause975=distributeByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_distributeByClause.add(distributeByClause975.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2621:4: ( sortByClause )?
					int alt302=2;
					int LA302_0 = input.LA(1);
					if ( (LA302_0==KW_SORT) ) {
						alt302=1;
					}
					switch (alt302) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2621:4: sortByClause
							{
							pushFollow(FOLLOW_sortByClause_in_body17356);
							sortByClause976=sortByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_sortByClause.add(sortByClause976.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2622:4: ( limitClause )?
					int alt303=2;
					int LA303_0 = input.LA(1);
					if ( (LA303_0==KW_LIMIT) ) {
						alt303=1;
					}
					switch (alt303) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2622:4: limitClause
							{
							pushFollow(FOLLOW_limitClause_in_body17362);
							limitClause977=limitClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_limitClause.add(limitClause977.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: havingClause, sortByClause, orderByClause, lateralView, selectClause, window_clause, limitClause, groupByClause, distributeByClause, whereClause, insertClause, clusterByClause
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2622:17: -> ^( TOK_INSERT insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2622:20: ^( TOK_INSERT insertClause selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_1);
						adaptor.addChild(root_1, stream_insertClause.nextTree());
						adaptor.addChild(root_1, stream_selectClause.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2623:35: ( lateralView )?
						if ( stream_lateralView.hasNext() ) {
							adaptor.addChild(root_1, stream_lateralView.nextTree());
						}
						stream_lateralView.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2623:48: ( whereClause )?
						if ( stream_whereClause.hasNext() ) {
							adaptor.addChild(root_1, stream_whereClause.nextTree());
						}
						stream_whereClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2623:61: ( groupByClause )?
						if ( stream_groupByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_groupByClause.nextTree());
						}
						stream_groupByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2623:76: ( havingClause )?
						if ( stream_havingClause.hasNext() ) {
							adaptor.addChild(root_1, stream_havingClause.nextTree());
						}
						stream_havingClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2623:90: ( orderByClause )?
						if ( stream_orderByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_orderByClause.nextTree());
						}
						stream_orderByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2623:105: ( clusterByClause )?
						if ( stream_clusterByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_clusterByClause.nextTree());
						}
						stream_clusterByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2624:22: ( distributeByClause )?
						if ( stream_distributeByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_distributeByClause.nextTree());
						}
						stream_distributeByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2624:42: ( sortByClause )?
						if ( stream_sortByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_sortByClause.nextTree());
						}
						stream_sortByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2624:56: ( window_clause )?
						if ( stream_window_clause.hasNext() ) {
							adaptor.addChild(root_1, stream_window_clause.nextTree());
						}
						stream_window_clause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2624:71: ( limitClause )?
						if ( stream_limitClause.hasNext() ) {
							adaptor.addChild(root_1, stream_limitClause.nextTree());
						}
						stream_limitClause.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2626:4: selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( window_clause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( limitClause )?
					{
					pushFollow(FOLLOW_selectClause_in_body17455);
					selectClause978=selectClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_selectClause.add(selectClause978.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2627:4: ( lateralView )?
					int alt304=2;
					int LA304_0 = input.LA(1);
					if ( (LA304_0==KW_LATERAL) ) {
						alt304=1;
					}
					switch (alt304) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2627:4: lateralView
							{
							pushFollow(FOLLOW_lateralView_in_body17460);
							lateralView979=lateralView();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_lateralView.add(lateralView979.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2628:4: ( whereClause )?
					int alt305=2;
					int LA305_0 = input.LA(1);
					if ( (LA305_0==KW_WHERE) ) {
						alt305=1;
					}
					switch (alt305) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2628:4: whereClause
							{
							pushFollow(FOLLOW_whereClause_in_body17466);
							whereClause980=whereClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_whereClause.add(whereClause980.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2629:4: ( groupByClause )?
					int alt306=2;
					int LA306_0 = input.LA(1);
					if ( (LA306_0==KW_GROUP) ) {
						alt306=1;
					}
					switch (alt306) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2629:4: groupByClause
							{
							pushFollow(FOLLOW_groupByClause_in_body17472);
							groupByClause981=groupByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_groupByClause.add(groupByClause981.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2630:4: ( havingClause )?
					int alt307=2;
					int LA307_0 = input.LA(1);
					if ( (LA307_0==KW_HAVING) ) {
						alt307=1;
					}
					switch (alt307) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2630:4: havingClause
							{
							pushFollow(FOLLOW_havingClause_in_body17478);
							havingClause982=havingClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_havingClause.add(havingClause982.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2631:4: ( window_clause )?
					int alt308=2;
					int LA308_0 = input.LA(1);
					if ( (LA308_0==KW_WINDOW) ) {
						alt308=1;
					}
					switch (alt308) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2631:4: window_clause
							{
							pushFollow(FOLLOW_window_clause_in_body17484);
							window_clause983=window_clause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_window_clause.add(window_clause983.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2632:4: ( orderByClause )?
					int alt309=2;
					int LA309_0 = input.LA(1);
					if ( (LA309_0==KW_ORDER) ) {
						alt309=1;
					}
					switch (alt309) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2632:4: orderByClause
							{
							pushFollow(FOLLOW_orderByClause_in_body17490);
							orderByClause984=orderByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_orderByClause.add(orderByClause984.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2633:4: ( clusterByClause )?
					int alt310=2;
					int LA310_0 = input.LA(1);
					if ( (LA310_0==KW_CLUSTER) ) {
						alt310=1;
					}
					switch (alt310) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2633:4: clusterByClause
							{
							pushFollow(FOLLOW_clusterByClause_in_body17496);
							clusterByClause985=clusterByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_clusterByClause.add(clusterByClause985.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2634:4: ( distributeByClause )?
					int alt311=2;
					int LA311_0 = input.LA(1);
					if ( (LA311_0==KW_DISTRIBUTE) ) {
						alt311=1;
					}
					switch (alt311) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2634:4: distributeByClause
							{
							pushFollow(FOLLOW_distributeByClause_in_body17502);
							distributeByClause986=distributeByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_distributeByClause.add(distributeByClause986.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2635:4: ( sortByClause )?
					int alt312=2;
					int LA312_0 = input.LA(1);
					if ( (LA312_0==KW_SORT) ) {
						alt312=1;
					}
					switch (alt312) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2635:4: sortByClause
							{
							pushFollow(FOLLOW_sortByClause_in_body17508);
							sortByClause987=sortByClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_sortByClause.add(sortByClause987.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2636:4: ( limitClause )?
					int alt313=2;
					int LA313_0 = input.LA(1);
					if ( (LA313_0==KW_LIMIT) ) {
						alt313=1;
					}
					switch (alt313) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2636:4: limitClause
							{
							pushFollow(FOLLOW_limitClause_in_body17514);
							limitClause988=limitClause();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_limitClause.add(limitClause988.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: clusterByClause, lateralView, limitClause, havingClause, sortByClause, groupByClause, distributeByClause, whereClause, window_clause, orderByClause, selectClause
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2636:17: -> ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2636:20: ^( TOK_INSERT ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) ) selectClause ( lateralView )? ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( clusterByClause )? ( distributeByClause )? ( sortByClause )? ( window_clause )? ( limitClause )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2636:33: ^( TOK_DESTINATION ^( TOK_DIR TOK_TMP_FILE ) )
						{
						ASTNode root_2 = (ASTNode)adaptor.nil();
						root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_2);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2636:51: ^( TOK_DIR TOK_TMP_FILE )
						{
						ASTNode root_3 = (ASTNode)adaptor.nil();
						root_3 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_3);
						adaptor.addChild(root_3, (ASTNode)adaptor.create(TOK_TMP_FILE, "TOK_TMP_FILE"));
						adaptor.addChild(root_2, root_3);
						}

						adaptor.addChild(root_1, root_2);
						}

						adaptor.addChild(root_1, stream_selectClause.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2637:35: ( lateralView )?
						if ( stream_lateralView.hasNext() ) {
							adaptor.addChild(root_1, stream_lateralView.nextTree());
						}
						stream_lateralView.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2637:48: ( whereClause )?
						if ( stream_whereClause.hasNext() ) {
							adaptor.addChild(root_1, stream_whereClause.nextTree());
						}
						stream_whereClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2637:61: ( groupByClause )?
						if ( stream_groupByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_groupByClause.nextTree());
						}
						stream_groupByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2637:76: ( havingClause )?
						if ( stream_havingClause.hasNext() ) {
							adaptor.addChild(root_1, stream_havingClause.nextTree());
						}
						stream_havingClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2637:90: ( orderByClause )?
						if ( stream_orderByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_orderByClause.nextTree());
						}
						stream_orderByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2637:105: ( clusterByClause )?
						if ( stream_clusterByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_clusterByClause.nextTree());
						}
						stream_clusterByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2638:22: ( distributeByClause )?
						if ( stream_distributeByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_distributeByClause.nextTree());
						}
						stream_distributeByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2638:42: ( sortByClause )?
						if ( stream_sortByClause.hasNext() ) {
							adaptor.addChild(root_1, stream_sortByClause.nextTree());
						}
						stream_sortByClause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2638:56: ( window_clause )?
						if ( stream_window_clause.hasNext() ) {
							adaptor.addChild(root_1, stream_window_clause.nextTree());
						}
						stream_window_clause.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2638:71: ( limitClause )?
						if ( stream_limitClause.hasNext() ) {
							adaptor.addChild(root_1, stream_limitClause.nextTree());
						}
						stream_limitClause.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "body"


	public static class insertClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "insertClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2641:1: insertClause : ( KW_INSERT KW_OVERWRITE destination ( ifNotExists )? -> ^( TOK_DESTINATION destination ( ifNotExists )? ) | KW_INSERT KW_INTO ( KW_TABLE )? tableOrPartition ( LPAREN targetCols= columnNameList RPAREN )? -> ^( TOK_INSERT_INTO tableOrPartition ( $targetCols)? ) );
	public final HiveParser.insertClause_return insertClause() throws RecognitionException {
		HiveParser.insertClause_return retval = new HiveParser.insertClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_INSERT989=null;
		Token KW_OVERWRITE990=null;
		Token KW_INSERT993=null;
		Token KW_INTO994=null;
		Token KW_TABLE995=null;
		Token LPAREN997=null;
		Token RPAREN998=null;
		ParserRuleReturnScope targetCols =null;
		ParserRuleReturnScope destination991 =null;
		ParserRuleReturnScope ifNotExists992 =null;
		ParserRuleReturnScope tableOrPartition996 =null;

		ASTNode KW_INSERT989_tree=null;
		ASTNode KW_OVERWRITE990_tree=null;
		ASTNode KW_INSERT993_tree=null;
		ASTNode KW_INTO994_tree=null;
		ASTNode KW_TABLE995_tree=null;
		ASTNode LPAREN997_tree=null;
		ASTNode RPAREN998_tree=null;
		RewriteRuleTokenStream stream_KW_INTO=new RewriteRuleTokenStream(adaptor,"token KW_INTO");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_INSERT=new RewriteRuleTokenStream(adaptor,"token KW_INSERT");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_OVERWRITE=new RewriteRuleTokenStream(adaptor,"token KW_OVERWRITE");
		RewriteRuleSubtreeStream stream_destination=new RewriteRuleSubtreeStream(adaptor,"rule destination");
		RewriteRuleSubtreeStream stream_ifNotExists=new RewriteRuleSubtreeStream(adaptor,"rule ifNotExists");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");
		RewriteRuleSubtreeStream stream_columnNameList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameList");

		 pushMsg("insert clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2644:4: ( KW_INSERT KW_OVERWRITE destination ( ifNotExists )? -> ^( TOK_DESTINATION destination ( ifNotExists )? ) | KW_INSERT KW_INTO ( KW_TABLE )? tableOrPartition ( LPAREN targetCols= columnNameList RPAREN )? -> ^( TOK_INSERT_INTO tableOrPartition ( $targetCols)? ) )
			int alt318=2;
			int LA318_0 = input.LA(1);
			if ( (LA318_0==KW_INSERT) ) {
				int LA318_1 = input.LA(2);
				if ( (LA318_1==KW_OVERWRITE) ) {
					alt318=1;
				}
				else if ( (LA318_1==KW_INTO) ) {
					alt318=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 318, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 318, 0, input);
				throw nvae;
			}

			switch (alt318) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2645:6: KW_INSERT KW_OVERWRITE destination ( ifNotExists )?
					{
					KW_INSERT989=(Token)match(input,KW_INSERT,FOLLOW_KW_INSERT_in_insertClause17635); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INSERT.add(KW_INSERT989);

					KW_OVERWRITE990=(Token)match(input,KW_OVERWRITE,FOLLOW_KW_OVERWRITE_in_insertClause17637); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OVERWRITE.add(KW_OVERWRITE990);

					pushFollow(FOLLOW_destination_in_insertClause17639);
					destination991=destination();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_destination.add(destination991.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2645:41: ( ifNotExists )?
					int alt315=2;
					int LA315_0 = input.LA(1);
					if ( (LA315_0==KW_IF) ) {
						alt315=1;
					}
					switch (alt315) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2645:41: ifNotExists
							{
							pushFollow(FOLLOW_ifNotExists_in_insertClause17641);
							ifNotExists992=ifNotExists();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_ifNotExists.add(ifNotExists992.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: destination, ifNotExists
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2645:54: -> ^( TOK_DESTINATION destination ( ifNotExists )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2645:57: ^( TOK_DESTINATION destination ( ifNotExists )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DESTINATION, "TOK_DESTINATION"), root_1);
						adaptor.addChild(root_1, stream_destination.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2645:87: ( ifNotExists )?
						if ( stream_ifNotExists.hasNext() ) {
							adaptor.addChild(root_1, stream_ifNotExists.nextTree());
						}
						stream_ifNotExists.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2646:6: KW_INSERT KW_INTO ( KW_TABLE )? tableOrPartition ( LPAREN targetCols= columnNameList RPAREN )?
					{
					KW_INSERT993=(Token)match(input,KW_INSERT,FOLLOW_KW_INSERT_in_insertClause17660); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INSERT.add(KW_INSERT993);

					KW_INTO994=(Token)match(input,KW_INTO,FOLLOW_KW_INTO_in_insertClause17662); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_INTO.add(KW_INTO994);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2646:24: ( KW_TABLE )?
					int alt316=2;
					int LA316_0 = input.LA(1);
					if ( (LA316_0==KW_TABLE) ) {
						alt316=1;
					}
					switch (alt316) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2646:24: KW_TABLE
							{
							KW_TABLE995=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_insertClause17664); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE995);

							}
							break;

					}

					pushFollow(FOLLOW_tableOrPartition_in_insertClause17667);
					tableOrPartition996=tableOrPartition();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableOrPartition.add(tableOrPartition996.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2646:51: ( LPAREN targetCols= columnNameList RPAREN )?
					int alt317=2;
					int LA317_0 = input.LA(1);
					if ( (LA317_0==LPAREN) ) {
						int LA317_1 = input.LA(2);
						if ( (LA317_1==Identifier||(LA317_1 >= KW_ABORT && LA317_1 <= KW_AFTER)||LA317_1==KW_ANALYZE||LA317_1==KW_ARCHIVE||LA317_1==KW_ASC||(LA317_1 >= KW_AUTOCOMMIT && LA317_1 <= KW_BEFORE)||(LA317_1 >= KW_BUCKET && LA317_1 <= KW_BUCKETS)||(LA317_1 >= KW_CACHE && LA317_1 <= KW_CASCADE)||LA317_1==KW_CHANGE||(LA317_1 >= KW_CLUSTER && LA317_1 <= KW_COLLECTION)||(LA317_1 >= KW_COLUMNS && LA317_1 <= KW_COMMENT)||(LA317_1 >= KW_COMPACT && LA317_1 <= KW_CONCATENATE)||LA317_1==KW_CONTINUE||LA317_1==KW_DATA||LA317_1==KW_DATABASES||(LA317_1 >= KW_DATETIME && LA317_1 <= KW_DBPROPERTIES)||(LA317_1 >= KW_DEFERRED && LA317_1 <= KW_DEFINED)||(LA317_1 >= KW_DELIMITED && LA317_1 <= KW_DESC)||(LA317_1 >= KW_DETAIL && LA317_1 <= KW_DISABLE)||LA317_1==KW_DISTRIBUTE||LA317_1==KW_DOW||(LA317_1 >= KW_DUMP && LA317_1 <= KW_ELEM_TYPE)||LA317_1==KW_ENABLE||LA317_1==KW_ESCAPED||LA317_1==KW_EXCLUSIVE||(LA317_1 >= KW_EXPLAIN && LA317_1 <= KW_EXPRESSION)||(LA317_1 >= KW_FIELDS && LA317_1 <= KW_FIRST)||(LA317_1 >= KW_FORMAT && LA317_1 <= KW_FORMATTED)||LA317_1==KW_FUNCTIONS||(LA317_1 >= KW_HOUR && LA317_1 <= KW_IDXPROPERTIES)||(LA317_1 >= KW_INDEX && LA317_1 <= KW_INDEXES)||(LA317_1 >= KW_INPATH && LA317_1 <= KW_INPUTFORMAT)||(LA317_1 >= KW_ISOLATION && LA317_1 <= KW_JAR)||(LA317_1 >= KW_KEY && LA317_1 <= KW_LAST)||LA317_1==KW_LEVEL||(LA317_1 >= KW_LIMIT && LA317_1 <= KW_LOAD)||(LA317_1 >= KW_LOCATION && LA317_1 <= KW_LONG)||(LA317_1 >= KW_MAPJOIN && LA317_1 <= KW_MATERIALIZED)||LA317_1==KW_METADATA||(LA317_1 >= KW_MINUTE && LA317_1 <= KW_MONTH)||LA317_1==KW_MSCK||(LA317_1 >= KW_NORELY && LA317_1 <= KW_NOSCAN)||LA317_1==KW_NOVALIDATE||LA317_1==KW_NULLS||LA317_1==KW_OFFSET||(LA317_1 >= KW_OPERATOR && LA317_1 <= KW_OPTION)||(LA317_1 >= KW_OUTPUTDRIVER && LA317_1 <= KW_OUTPUTFORMAT)||(LA317_1 >= KW_OVERWRITE && LA317_1 <= KW_OWNER)||(LA317_1 >= KW_PARTITIONED && LA317_1 <= KW_PARTITIONS)||LA317_1==KW_PLUS||LA317_1==KW_PRETTY||LA317_1==KW_PRINCIPALS||(LA317_1 >= KW_PURGE && LA317_1 <= KW_QUARTER)||LA317_1==KW_READ||(LA317_1 >= KW_REBUILD && LA317_1 <= KW_RECORDWRITER)||(LA317_1 >= KW_RELOAD && LA317_1 <= KW_RESTRICT)||LA317_1==KW_REWRITE||(LA317_1 >= KW_ROLE && LA317_1 <= KW_ROLES)||(LA317_1 >= KW_SCHEMA && LA317_1 <= KW_SECOND)||(LA317_1 >= KW_SEMI && LA317_1 <= KW_SERVER)||(LA317_1 >= KW_SETS && LA317_1 <= KW_SKEWED)||(LA317_1 >= KW_SNAPSHOT && LA317_1 <= KW_SSL)||(LA317_1 >= KW_STATISTICS && LA317_1 <= KW_SUMMARY)||LA317_1==KW_TABLES||(LA317_1 >= KW_TBLPROPERTIES && LA317_1 <= KW_TERMINATED)||LA317_1==KW_TINYINT||(LA317_1 >= KW_TOUCH && LA317_1 <= KW_TRANSACTIONS)||LA317_1==KW_UNARCHIVE||LA317_1==KW_UNDO||LA317_1==KW_UNIONTYPE||(LA317_1 >= KW_UNLOCK && LA317_1 <= KW_UNSIGNED)||(LA317_1 >= KW_URI && LA317_1 <= KW_USE)||(LA317_1 >= KW_UTC && LA317_1 <= KW_VALIDATE)||LA317_1==KW_VALUE_TYPE||(LA317_1 >= KW_VECTORIZATION && LA317_1 <= KW_WEEK)||LA317_1==KW_WHILE||(LA317_1 >= KW_WORK && LA317_1 <= KW_YEAR)||LA317_1==KW_BATCH||LA317_1==KW_DAYOFWEEK||LA317_1==KW_HOLD_DDLTIME||LA317_1==KW_IGNORE||LA317_1==KW_NO_DROP||LA317_1==KW_OFFLINE||LA317_1==KW_PROTECTION||LA317_1==KW_READONLY) ) {
							alt317=1;
						}
					}
					switch (alt317) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2646:52: LPAREN targetCols= columnNameList RPAREN
							{
							LPAREN997=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_insertClause17670); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN997);

							pushFollow(FOLLOW_columnNameList_in_insertClause17674);
							targetCols=columnNameList();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_columnNameList.add(targetCols.getTree());
							RPAREN998=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_insertClause17676); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN998);

							}
							break;

					}

					// AST REWRITE
					// elements: targetCols, tableOrPartition
					// token labels: 
					// rule labels: targetCols, retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_targetCols=new RewriteRuleSubtreeStream(adaptor,"rule targetCols",targetCols!=null?targetCols.getTree():null);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2647:8: -> ^( TOK_INSERT_INTO tableOrPartition ( $targetCols)? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2647:11: ^( TOK_INSERT_INTO tableOrPartition ( $targetCols)? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT_INTO, "TOK_INSERT_INTO"), root_1);
						adaptor.addChild(root_1, stream_tableOrPartition.nextTree());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2647:47: ( $targetCols)?
						if ( stream_targetCols.hasNext() ) {
							adaptor.addChild(root_1, stream_targetCols.nextTree());
						}
						stream_targetCols.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "insertClause"


	public static class destination_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "destination"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2650:1: destination : ( (local= KW_LOCAL )? KW_DIRECTORY StringLiteral ( tableRowFormat )? ( tableFileFormat )? -> ^( TOK_DIR StringLiteral ( $local)? ( tableRowFormat )? ( tableFileFormat )? ) | KW_TABLE tableOrPartition -> tableOrPartition );
	public final HiveParser.destination_return destination() throws RecognitionException {
		HiveParser.destination_return retval = new HiveParser.destination_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token local=null;
		Token KW_DIRECTORY999=null;
		Token StringLiteral1000=null;
		Token KW_TABLE1003=null;
		ParserRuleReturnScope tableRowFormat1001 =null;
		ParserRuleReturnScope tableFileFormat1002 =null;
		ParserRuleReturnScope tableOrPartition1004 =null;

		ASTNode local_tree=null;
		ASTNode KW_DIRECTORY999_tree=null;
		ASTNode StringLiteral1000_tree=null;
		ASTNode KW_TABLE1003_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_DIRECTORY=new RewriteRuleTokenStream(adaptor,"token KW_DIRECTORY");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_LOCAL=new RewriteRuleTokenStream(adaptor,"token KW_LOCAL");
		RewriteRuleSubtreeStream stream_tableRowFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormat");
		RewriteRuleSubtreeStream stream_tableFileFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableFileFormat");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");

		 pushMsg("destination specification", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2653:4: ( (local= KW_LOCAL )? KW_DIRECTORY StringLiteral ( tableRowFormat )? ( tableFileFormat )? -> ^( TOK_DIR StringLiteral ( $local)? ( tableRowFormat )? ( tableFileFormat )? ) | KW_TABLE tableOrPartition -> tableOrPartition )
			int alt322=2;
			int LA322_0 = input.LA(1);
			if ( (LA322_0==KW_DIRECTORY||LA322_0==KW_LOCAL) ) {
				alt322=1;
			}
			else if ( (LA322_0==KW_TABLE) ) {
				alt322=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 322, 0, input);
				throw nvae;
			}

			switch (alt322) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:6: (local= KW_LOCAL )? KW_DIRECTORY StringLiteral ( tableRowFormat )? ( tableFileFormat )?
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:6: (local= KW_LOCAL )?
					int alt319=2;
					int LA319_0 = input.LA(1);
					if ( (LA319_0==KW_LOCAL) ) {
						alt319=1;
					}
					switch (alt319) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:7: local= KW_LOCAL
							{
							local=(Token)match(input,KW_LOCAL,FOLLOW_KW_LOCAL_in_destination17732); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_LOCAL.add(local);

							}
							break;

					}

					KW_DIRECTORY999=(Token)match(input,KW_DIRECTORY,FOLLOW_KW_DIRECTORY_in_destination17736); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DIRECTORY.add(KW_DIRECTORY999);

					StringLiteral1000=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_destination17738); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_StringLiteral.add(StringLiteral1000);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:53: ( tableRowFormat )?
					int alt320=2;
					int LA320_0 = input.LA(1);
					if ( (LA320_0==KW_ROW) ) {
						alt320=1;
					}
					switch (alt320) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:53: tableRowFormat
							{
							pushFollow(FOLLOW_tableRowFormat_in_destination17740);
							tableRowFormat1001=tableRowFormat();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableRowFormat.add(tableRowFormat1001.getTree());
							}
							break;

					}

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:69: ( tableFileFormat )?
					int alt321=2;
					int LA321_0 = input.LA(1);
					if ( (LA321_0==KW_STORED) ) {
						alt321=1;
					}
					switch (alt321) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2654:69: tableFileFormat
							{
							pushFollow(FOLLOW_tableFileFormat_in_destination17743);
							tableFileFormat1002=tableFileFormat();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_tableFileFormat.add(tableFileFormat1002.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: StringLiteral, tableRowFormat, tableFileFormat, local
					// token labels: local
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_local=new RewriteRuleTokenStream(adaptor,"token local",local);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2655:8: -> ^( TOK_DIR StringLiteral ( $local)? ( tableRowFormat )? ( tableFileFormat )? )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2655:11: ^( TOK_DIR StringLiteral ( $local)? ( tableRowFormat )? ( tableFileFormat )? )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DIR, "TOK_DIR"), root_1);
						adaptor.addChild(root_1, stream_StringLiteral.nextNode());
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2655:36: ( $local)?
						if ( stream_local.hasNext() ) {
							adaptor.addChild(root_1, stream_local.nextNode());
						}
						stream_local.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2655:43: ( tableRowFormat )?
						if ( stream_tableRowFormat.hasNext() ) {
							adaptor.addChild(root_1, stream_tableRowFormat.nextTree());
						}
						stream_tableRowFormat.reset();

						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2655:59: ( tableFileFormat )?
						if ( stream_tableFileFormat.hasNext() ) {
							adaptor.addChild(root_1, stream_tableFileFormat.nextTree());
						}
						stream_tableFileFormat.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2656:6: KW_TABLE tableOrPartition
					{
					KW_TABLE1003=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_destination17776); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_TABLE.add(KW_TABLE1003);

					pushFollow(FOLLOW_tableOrPartition_in_destination17778);
					tableOrPartition1004=tableOrPartition();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_tableOrPartition.add(tableOrPartition1004.getTree());
					// AST REWRITE
					// elements: tableOrPartition
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2656:32: -> tableOrPartition
					{
						adaptor.addChild(root_0, stream_tableOrPartition.nextTree());
					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "destination"


	public static class limitClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "limitClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2659:1: limitClause : ( KW_LIMIT ( (offset= Number COMMA )? num= Number ) -> ^( TOK_LIMIT ( $offset)? $num) | KW_LIMIT num= Number KW_OFFSET offset= Number -> ^( TOK_LIMIT ( $offset)? $num) );
	public final HiveParser.limitClause_return limitClause() throws RecognitionException {
		HiveParser.limitClause_return retval = new HiveParser.limitClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token offset=null;
		Token num=null;
		Token KW_LIMIT1005=null;
		Token COMMA1006=null;
		Token KW_LIMIT1007=null;
		Token KW_OFFSET1008=null;

		ASTNode offset_tree=null;
		ASTNode num_tree=null;
		ASTNode KW_LIMIT1005_tree=null;
		ASTNode COMMA1006_tree=null;
		ASTNode KW_LIMIT1007_tree=null;
		ASTNode KW_OFFSET1008_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_LIMIT=new RewriteRuleTokenStream(adaptor,"token KW_LIMIT");
		RewriteRuleTokenStream stream_KW_OFFSET=new RewriteRuleTokenStream(adaptor,"token KW_OFFSET");

		 pushMsg("limit clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2662:4: ( KW_LIMIT ( (offset= Number COMMA )? num= Number ) -> ^( TOK_LIMIT ( $offset)? $num) | KW_LIMIT num= Number KW_OFFSET offset= Number -> ^( TOK_LIMIT ( $offset)? $num) )
			int alt324=2;
			int LA324_0 = input.LA(1);
			if ( (LA324_0==KW_LIMIT) ) {
				int LA324_1 = input.LA(2);
				if ( (LA324_1==Number) ) {
					int LA324_2 = input.LA(3);
					if ( (LA324_2==KW_OFFSET) ) {
						alt324=2;
					}
					else if ( (LA324_2==EOF||LA324_2==COMMA||LA324_2==KW_EXCEPT||LA324_2==KW_INSERT||LA324_2==KW_INTERSECT||LA324_2==KW_MAP||LA324_2==KW_MINUS||LA324_2==KW_REDUCE||LA324_2==KW_SELECT||LA324_2==KW_UNION||LA324_2==RPAREN) ) {
						alt324=1;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return retval;}
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 324, 2, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 324, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 324, 0, input);
				throw nvae;
			}

			switch (alt324) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:4: KW_LIMIT ( (offset= Number COMMA )? num= Number )
					{
					KW_LIMIT1005=(Token)match(input,KW_LIMIT,FOLLOW_KW_LIMIT_in_limitClause17810); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LIMIT.add(KW_LIMIT1005);

					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:13: ( (offset= Number COMMA )? num= Number )
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:14: (offset= Number COMMA )? num= Number
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:14: (offset= Number COMMA )?
					int alt323=2;
					int LA323_0 = input.LA(1);
					if ( (LA323_0==Number) ) {
						int LA323_1 = input.LA(2);
						if ( (LA323_1==COMMA) ) {
							alt323=1;
						}
					}
					switch (alt323) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:15: offset= Number COMMA
							{
							offset=(Token)match(input,Number,FOLLOW_Number_in_limitClause17816); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_Number.add(offset);

							COMMA1006=(Token)match(input,COMMA,FOLLOW_COMMA_in_limitClause17818); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_COMMA.add(COMMA1006);

							}
							break;

					}

					num=(Token)match(input,Number,FOLLOW_Number_in_limitClause17824); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(num);

					}

					// AST REWRITE
					// elements: num, offset
					// token labels: offset, num
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_offset=new RewriteRuleTokenStream(adaptor,"token offset",offset);
					RewriteRuleTokenStream stream_num=new RewriteRuleTokenStream(adaptor,"token num",num);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2663:49: -> ^( TOK_LIMIT ( $offset)? $num)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:52: ^( TOK_LIMIT ( $offset)? $num)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LIMIT, "TOK_LIMIT"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2663:64: ( $offset)?
						if ( stream_offset.hasNext() ) {
							adaptor.addChild(root_1, stream_offset.nextNode());
						}
						stream_offset.reset();

						adaptor.addChild(root_1, stream_num.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2664:6: KW_LIMIT num= Number KW_OFFSET offset= Number
					{
					KW_LIMIT1007=(Token)match(input,KW_LIMIT,FOLLOW_KW_LIMIT_in_limitClause17847); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_LIMIT.add(KW_LIMIT1007);

					num=(Token)match(input,Number,FOLLOW_Number_in_limitClause17851); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(num);

					KW_OFFSET1008=(Token)match(input,KW_OFFSET,FOLLOW_KW_OFFSET_in_limitClause17853); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_OFFSET.add(KW_OFFSET1008);

					offset=(Token)match(input,Number,FOLLOW_Number_in_limitClause17857); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(offset);

					// AST REWRITE
					// elements: offset, num
					// token labels: offset, num
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleTokenStream stream_offset=new RewriteRuleTokenStream(adaptor,"token offset",offset);
					RewriteRuleTokenStream stream_num=new RewriteRuleTokenStream(adaptor,"token num",num);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2664:50: -> ^( TOK_LIMIT ( $offset)? $num)
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2664:53: ^( TOK_LIMIT ( $offset)? $num)
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_LIMIT, "TOK_LIMIT"), root_1);
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2664:65: ( $offset)?
						if ( stream_offset.hasNext() ) {
							adaptor.addChild(root_1, stream_offset.nextNode());
						}
						stream_offset.reset();

						adaptor.addChild(root_1, stream_num.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "limitClause"


	public static class deleteStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "deleteStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2668:1: deleteStatement : KW_DELETE KW_FROM tableName ( whereClause )? -> ^( TOK_DELETE_FROM tableName ( whereClause )? ) ;
	public final HiveParser.deleteStatement_return deleteStatement() throws RecognitionException {
		HiveParser.deleteStatement_return retval = new HiveParser.deleteStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_DELETE1009=null;
		Token KW_FROM1010=null;
		ParserRuleReturnScope tableName1011 =null;
		ParserRuleReturnScope whereClause1012 =null;

		ASTNode KW_DELETE1009_tree=null;
		ASTNode KW_FROM1010_tree=null;
		RewriteRuleTokenStream stream_KW_DELETE=new RewriteRuleTokenStream(adaptor,"token KW_DELETE");
		RewriteRuleTokenStream stream_KW_FROM=new RewriteRuleTokenStream(adaptor,"token KW_FROM");
		RewriteRuleSubtreeStream stream_whereClause=new RewriteRuleSubtreeStream(adaptor,"rule whereClause");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("delete statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2671:4: ( KW_DELETE KW_FROM tableName ( whereClause )? -> ^( TOK_DELETE_FROM tableName ( whereClause )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2672:4: KW_DELETE KW_FROM tableName ( whereClause )?
			{
			KW_DELETE1009=(Token)match(input,KW_DELETE,FOLLOW_KW_DELETE_in_deleteStatement17901); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_DELETE.add(KW_DELETE1009);

			KW_FROM1010=(Token)match(input,KW_FROM,FOLLOW_KW_FROM_in_deleteStatement17903); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_FROM.add(KW_FROM1010);

			pushFollow(FOLLOW_tableName_in_deleteStatement17905);
			tableName1011=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName1011.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2672:32: ( whereClause )?
			int alt325=2;
			int LA325_0 = input.LA(1);
			if ( (LA325_0==KW_WHERE) ) {
				alt325=1;
			}
			switch (alt325) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2672:33: whereClause
					{
					pushFollow(FOLLOW_whereClause_in_deleteStatement17908);
					whereClause1012=whereClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_whereClause.add(whereClause1012.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: whereClause, tableName
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2672:47: -> ^( TOK_DELETE_FROM tableName ( whereClause )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2672:50: ^( TOK_DELETE_FROM tableName ( whereClause )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_DELETE_FROM, "TOK_DELETE_FROM"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2672:78: ( whereClause )?
				if ( stream_whereClause.hasNext() ) {
					adaptor.addChild(root_1, stream_whereClause.nextTree());
				}
				stream_whereClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "deleteStatement"


	public static class columnAssignmentClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "columnAssignmentClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2676:1: columnAssignmentClause : tableOrColumn EQUAL ^ precedencePlusExpression ;
	public final HiveParser.columnAssignmentClause_return columnAssignmentClause() throws RecognitionException {
		HiveParser.columnAssignmentClause_return retval = new HiveParser.columnAssignmentClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token EQUAL1014=null;
		ParserRuleReturnScope tableOrColumn1013 =null;
		ParserRuleReturnScope precedencePlusExpression1015 =null;

		ASTNode EQUAL1014_tree=null;

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2677:4: ( tableOrColumn EQUAL ^ precedencePlusExpression )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2678:4: tableOrColumn EQUAL ^ precedencePlusExpression
			{
			root_0 = (ASTNode)adaptor.nil();


			pushFollow(FOLLOW_tableOrColumn_in_columnAssignmentClause17941);
			tableOrColumn1013=tableOrColumn();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, tableOrColumn1013.getTree());

			EQUAL1014=(Token)match(input,EQUAL,FOLLOW_EQUAL_in_columnAssignmentClause17943); if (state.failed) return retval;
			if ( state.backtracking==0 ) {
			EQUAL1014_tree = (ASTNode)adaptor.create(EQUAL1014);
			root_0 = (ASTNode)adaptor.becomeRoot(EQUAL1014_tree, root_0);
			}

			pushFollow(FOLLOW_precedencePlusExpression_in_columnAssignmentClause17946);
			precedencePlusExpression1015=precedencePlusExpression();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) adaptor.addChild(root_0, precedencePlusExpression1015.getTree());

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "columnAssignmentClause"


	public static class setColumnsClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "setColumnsClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2682:1: setColumnsClause : KW_SET columnAssignmentClause ( COMMA columnAssignmentClause )* -> ^( TOK_SET_COLUMNS_CLAUSE ( columnAssignmentClause )* ) ;
	public final HiveParser.setColumnsClause_return setColumnsClause() throws RecognitionException {
		HiveParser.setColumnsClause_return retval = new HiveParser.setColumnsClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET1016=null;
		Token COMMA1018=null;
		ParserRuleReturnScope columnAssignmentClause1017 =null;
		ParserRuleReturnScope columnAssignmentClause1019 =null;

		ASTNode KW_SET1016_tree=null;
		ASTNode COMMA1018_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_columnAssignmentClause=new RewriteRuleSubtreeStream(adaptor,"rule columnAssignmentClause");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2683:4: ( KW_SET columnAssignmentClause ( COMMA columnAssignmentClause )* -> ^( TOK_SET_COLUMNS_CLAUSE ( columnAssignmentClause )* ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2684:4: KW_SET columnAssignmentClause ( COMMA columnAssignmentClause )*
			{
			KW_SET1016=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_setColumnsClause17966); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET1016);

			pushFollow(FOLLOW_columnAssignmentClause_in_setColumnsClause17968);
			columnAssignmentClause1017=columnAssignmentClause();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_columnAssignmentClause.add(columnAssignmentClause1017.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2684:34: ( COMMA columnAssignmentClause )*
			loop326:
			while (true) {
				int alt326=2;
				int LA326_0 = input.LA(1);
				if ( (LA326_0==COMMA) ) {
					alt326=1;
				}

				switch (alt326) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2684:35: COMMA columnAssignmentClause
					{
					COMMA1018=(Token)match(input,COMMA,FOLLOW_COMMA_in_setColumnsClause17971); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_COMMA.add(COMMA1018);

					pushFollow(FOLLOW_columnAssignmentClause_in_setColumnsClause17973);
					columnAssignmentClause1019=columnAssignmentClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_columnAssignmentClause.add(columnAssignmentClause1019.getTree());
					}
					break;

				default :
					break loop326;
				}
			}

			// AST REWRITE
			// elements: columnAssignmentClause
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2684:66: -> ^( TOK_SET_COLUMNS_CLAUSE ( columnAssignmentClause )* )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2684:69: ^( TOK_SET_COLUMNS_CLAUSE ( columnAssignmentClause )* )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SET_COLUMNS_CLAUSE, "TOK_SET_COLUMNS_CLAUSE"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2684:94: ( columnAssignmentClause )*
				while ( stream_columnAssignmentClause.hasNext() ) {
					adaptor.addChild(root_1, stream_columnAssignmentClause.nextTree());
				}
				stream_columnAssignmentClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "setColumnsClause"


	public static class updateStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "updateStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2691:1: updateStatement : KW_UPDATE tableName setColumnsClause ( whereClause )? -> ^( TOK_UPDATE_TABLE tableName setColumnsClause ( whereClause )? ) ;
	public final HiveParser.updateStatement_return updateStatement() throws RecognitionException {
		HiveParser.updateStatement_return retval = new HiveParser.updateStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UPDATE1020=null;
		ParserRuleReturnScope tableName1021 =null;
		ParserRuleReturnScope setColumnsClause1022 =null;
		ParserRuleReturnScope whereClause1023 =null;

		ASTNode KW_UPDATE1020_tree=null;
		RewriteRuleTokenStream stream_KW_UPDATE=new RewriteRuleTokenStream(adaptor,"token KW_UPDATE");
		RewriteRuleSubtreeStream stream_setColumnsClause=new RewriteRuleSubtreeStream(adaptor,"rule setColumnsClause");
		RewriteRuleSubtreeStream stream_whereClause=new RewriteRuleSubtreeStream(adaptor,"rule whereClause");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");

		 pushMsg("update statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2694:4: ( KW_UPDATE tableName setColumnsClause ( whereClause )? -> ^( TOK_UPDATE_TABLE tableName setColumnsClause ( whereClause )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2695:4: KW_UPDATE tableName setColumnsClause ( whereClause )?
			{
			KW_UPDATE1020=(Token)match(input,KW_UPDATE,FOLLOW_KW_UPDATE_in_updateStatement18015); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_UPDATE.add(KW_UPDATE1020);

			pushFollow(FOLLOW_tableName_in_updateStatement18017);
			tableName1021=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName1021.getTree());
			pushFollow(FOLLOW_setColumnsClause_in_updateStatement18019);
			setColumnsClause1022=setColumnsClause();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_setColumnsClause.add(setColumnsClause1022.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2695:41: ( whereClause )?
			int alt327=2;
			int LA327_0 = input.LA(1);
			if ( (LA327_0==KW_WHERE) ) {
				alt327=1;
			}
			switch (alt327) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2695:41: whereClause
					{
					pushFollow(FOLLOW_whereClause_in_updateStatement18021);
					whereClause1023=whereClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_whereClause.add(whereClause1023.getTree());
					}
					break;

			}

			// AST REWRITE
			// elements: tableName, whereClause, setColumnsClause
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2695:54: -> ^( TOK_UPDATE_TABLE tableName setColumnsClause ( whereClause )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2695:57: ^( TOK_UPDATE_TABLE tableName setColumnsClause ( whereClause )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UPDATE_TABLE, "TOK_UPDATE_TABLE"), root_1);
				adaptor.addChild(root_1, stream_tableName.nextTree());
				adaptor.addChild(root_1, stream_setColumnsClause.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2695:103: ( whereClause )?
				if ( stream_whereClause.hasNext() ) {
					adaptor.addChild(root_1, stream_whereClause.nextTree());
				}
				stream_whereClause.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "updateStatement"


	public static class sqlTransactionStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "sqlTransactionStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2702:1: sqlTransactionStatement : ( startTransactionStatement | commitStatement | rollbackStatement | setAutoCommitStatement );
	public final HiveParser.sqlTransactionStatement_return sqlTransactionStatement() throws RecognitionException {
		HiveParser.sqlTransactionStatement_return retval = new HiveParser.sqlTransactionStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope startTransactionStatement1024 =null;
		ParserRuleReturnScope commitStatement1025 =null;
		ParserRuleReturnScope rollbackStatement1026 =null;
		ParserRuleReturnScope setAutoCommitStatement1027 =null;


		 pushMsg("transaction statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2705:3: ( startTransactionStatement | commitStatement | rollbackStatement | setAutoCommitStatement )
			int alt328=4;
			switch ( input.LA(1) ) {
			case KW_START:
				{
				alt328=1;
				}
				break;
			case KW_COMMIT:
				{
				alt328=2;
				}
				break;
			case KW_ROLLBACK:
				{
				alt328=3;
				}
				break;
			case KW_SET:
				{
				alt328=4;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 328, 0, input);
				throw nvae;
			}
			switch (alt328) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2706:3: startTransactionStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_startTransactionStatement_in_sqlTransactionStatement18063);
					startTransactionStatement1024=startTransactionStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, startTransactionStatement1024.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2707:4: commitStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_commitStatement_in_sqlTransactionStatement18068);
					commitStatement1025=commitStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, commitStatement1025.getTree());

					}
					break;
				case 3 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2708:4: rollbackStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_rollbackStatement_in_sqlTransactionStatement18073);
					rollbackStatement1026=rollbackStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, rollbackStatement1026.getTree());

					}
					break;
				case 4 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2709:4: setAutoCommitStatement
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_setAutoCommitStatement_in_sqlTransactionStatement18078);
					setAutoCommitStatement1027=setAutoCommitStatement();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, setAutoCommitStatement1027.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "sqlTransactionStatement"


	public static class startTransactionStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "startTransactionStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2712:1: startTransactionStatement : KW_START KW_TRANSACTION ( transactionMode ( COMMA transactionMode )* )? -> ^( TOK_START_TRANSACTION ( transactionMode )* ) ;
	public final HiveParser.startTransactionStatement_return startTransactionStatement() throws RecognitionException {
		HiveParser.startTransactionStatement_return retval = new HiveParser.startTransactionStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_START1028=null;
		Token KW_TRANSACTION1029=null;
		Token COMMA1031=null;
		ParserRuleReturnScope transactionMode1030 =null;
		ParserRuleReturnScope transactionMode1032 =null;

		ASTNode KW_START1028_tree=null;
		ASTNode KW_TRANSACTION1029_tree=null;
		ASTNode COMMA1031_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_START=new RewriteRuleTokenStream(adaptor,"token KW_START");
		RewriteRuleTokenStream stream_KW_TRANSACTION=new RewriteRuleTokenStream(adaptor,"token KW_TRANSACTION");
		RewriteRuleSubtreeStream stream_transactionMode=new RewriteRuleSubtreeStream(adaptor,"rule transactionMode");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2713:3: ( KW_START KW_TRANSACTION ( transactionMode ( COMMA transactionMode )* )? -> ^( TOK_START_TRANSACTION ( transactionMode )* ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:3: KW_START KW_TRANSACTION ( transactionMode ( COMMA transactionMode )* )?
			{
			KW_START1028=(Token)match(input,KW_START,FOLLOW_KW_START_in_startTransactionStatement18092); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_START.add(KW_START1028);

			KW_TRANSACTION1029=(Token)match(input,KW_TRANSACTION,FOLLOW_KW_TRANSACTION_in_startTransactionStatement18094); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TRANSACTION.add(KW_TRANSACTION1029);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:27: ( transactionMode ( COMMA transactionMode )* )?
			int alt330=2;
			int LA330_0 = input.LA(1);
			if ( (LA330_0==KW_ISOLATION||LA330_0==KW_READ) ) {
				alt330=1;
			}
			switch (alt330) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:29: transactionMode ( COMMA transactionMode )*
					{
					pushFollow(FOLLOW_transactionMode_in_startTransactionStatement18098);
					transactionMode1030=transactionMode();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_transactionMode.add(transactionMode1030.getTree());
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:46: ( COMMA transactionMode )*
					loop329:
					while (true) {
						int alt329=2;
						int LA329_0 = input.LA(1);
						if ( (LA329_0==COMMA) ) {
							alt329=1;
						}

						switch (alt329) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:48: COMMA transactionMode
							{
							COMMA1031=(Token)match(input,COMMA,FOLLOW_COMMA_in_startTransactionStatement18103); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_COMMA.add(COMMA1031);

							pushFollow(FOLLOW_transactionMode_in_startTransactionStatement18105);
							transactionMode1032=transactionMode();
							state._fsp--;
							if (state.failed) return retval;
							if ( state.backtracking==0 ) stream_transactionMode.add(transactionMode1032.getTree());
							}
							break;

						default :
							break loop329;
						}
					}

					}
					break;

			}

			// AST REWRITE
			// elements: transactionMode
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2714:77: -> ^( TOK_START_TRANSACTION ( transactionMode )* )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:80: ^( TOK_START_TRANSACTION ( transactionMode )* )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_START_TRANSACTION, "TOK_START_TRANSACTION"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2714:104: ( transactionMode )*
				while ( stream_transactionMode.hasNext() ) {
					adaptor.addChild(root_1, stream_transactionMode.nextTree());
				}
				stream_transactionMode.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "startTransactionStatement"


	public static class transactionMode_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "transactionMode"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2717:1: transactionMode : ( isolationLevel | transactionAccessMode -> ^( TOK_TXN_ACCESS_MODE transactionAccessMode ) );
	public final HiveParser.transactionMode_return transactionMode() throws RecognitionException {
		HiveParser.transactionMode_return retval = new HiveParser.transactionMode_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope isolationLevel1033 =null;
		ParserRuleReturnScope transactionAccessMode1034 =null;

		RewriteRuleSubtreeStream stream_transactionAccessMode=new RewriteRuleSubtreeStream(adaptor,"rule transactionAccessMode");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2718:3: ( isolationLevel | transactionAccessMode -> ^( TOK_TXN_ACCESS_MODE transactionAccessMode ) )
			int alt331=2;
			int LA331_0 = input.LA(1);
			if ( (LA331_0==KW_ISOLATION) ) {
				alt331=1;
			}
			else if ( (LA331_0==KW_READ) ) {
				alt331=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 331, 0, input);
				throw nvae;
			}

			switch (alt331) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2719:3: isolationLevel
					{
					root_0 = (ASTNode)adaptor.nil();


					pushFollow(FOLLOW_isolationLevel_in_transactionMode18136);
					isolationLevel1033=isolationLevel();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, isolationLevel1033.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2720:5: transactionAccessMode
					{
					pushFollow(FOLLOW_transactionAccessMode_in_transactionMode18142);
					transactionAccessMode1034=transactionAccessMode();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_transactionAccessMode.add(transactionAccessMode1034.getTree());
					// AST REWRITE
					// elements: transactionAccessMode
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2720:27: -> ^( TOK_TXN_ACCESS_MODE transactionAccessMode )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2720:30: ^( TOK_TXN_ACCESS_MODE transactionAccessMode )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TXN_ACCESS_MODE, "TOK_TXN_ACCESS_MODE"), root_1);
						adaptor.addChild(root_1, stream_transactionAccessMode.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "transactionMode"


	public static class transactionAccessMode_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "transactionAccessMode"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2723:1: transactionAccessMode : ( KW_READ KW_ONLY -> TOK_TXN_READ_ONLY | KW_READ KW_WRITE -> TOK_TXN_READ_WRITE );
	public final HiveParser.transactionAccessMode_return transactionAccessMode() throws RecognitionException {
		HiveParser.transactionAccessMode_return retval = new HiveParser.transactionAccessMode_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_READ1035=null;
		Token KW_ONLY1036=null;
		Token KW_READ1037=null;
		Token KW_WRITE1038=null;

		ASTNode KW_READ1035_tree=null;
		ASTNode KW_ONLY1036_tree=null;
		ASTNode KW_READ1037_tree=null;
		ASTNode KW_WRITE1038_tree=null;
		RewriteRuleTokenStream stream_KW_READ=new RewriteRuleTokenStream(adaptor,"token KW_READ");
		RewriteRuleTokenStream stream_KW_ONLY=new RewriteRuleTokenStream(adaptor,"token KW_ONLY");
		RewriteRuleTokenStream stream_KW_WRITE=new RewriteRuleTokenStream(adaptor,"token KW_WRITE");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2724:3: ( KW_READ KW_ONLY -> TOK_TXN_READ_ONLY | KW_READ KW_WRITE -> TOK_TXN_READ_WRITE )
			int alt332=2;
			int LA332_0 = input.LA(1);
			if ( (LA332_0==KW_READ) ) {
				int LA332_1 = input.LA(2);
				if ( (LA332_1==KW_ONLY) ) {
					alt332=1;
				}
				else if ( (LA332_1==KW_WRITE) ) {
					alt332=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return retval;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 332, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 332, 0, input);
				throw nvae;
			}

			switch (alt332) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2725:3: KW_READ KW_ONLY
					{
					KW_READ1035=(Token)match(input,KW_READ,FOLLOW_KW_READ_in_transactionAccessMode18165); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_READ.add(KW_READ1035);

					KW_ONLY1036=(Token)match(input,KW_ONLY,FOLLOW_KW_ONLY_in_transactionAccessMode18167); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_ONLY.add(KW_ONLY1036);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2725:19: -> TOK_TXN_READ_ONLY
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_TXN_READ_ONLY, "TOK_TXN_READ_ONLY"));
					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2726:5: KW_READ KW_WRITE
					{
					KW_READ1037=(Token)match(input,KW_READ,FOLLOW_KW_READ_in_transactionAccessMode18177); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_READ.add(KW_READ1037);

					KW_WRITE1038=(Token)match(input,KW_WRITE,FOLLOW_KW_WRITE_in_transactionAccessMode18179); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_WRITE.add(KW_WRITE1038);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2726:22: -> TOK_TXN_READ_WRITE
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_TXN_READ_WRITE, "TOK_TXN_READ_WRITE"));
					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "transactionAccessMode"


	public static class isolationLevel_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "isolationLevel"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2729:1: isolationLevel : KW_ISOLATION KW_LEVEL levelOfIsolation -> ^( TOK_ISOLATION_LEVEL levelOfIsolation ) ;
	public final HiveParser.isolationLevel_return isolationLevel() throws RecognitionException {
		HiveParser.isolationLevel_return retval = new HiveParser.isolationLevel_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ISOLATION1039=null;
		Token KW_LEVEL1040=null;
		ParserRuleReturnScope levelOfIsolation1041 =null;

		ASTNode KW_ISOLATION1039_tree=null;
		ASTNode KW_LEVEL1040_tree=null;
		RewriteRuleTokenStream stream_KW_LEVEL=new RewriteRuleTokenStream(adaptor,"token KW_LEVEL");
		RewriteRuleTokenStream stream_KW_ISOLATION=new RewriteRuleTokenStream(adaptor,"token KW_ISOLATION");
		RewriteRuleSubtreeStream stream_levelOfIsolation=new RewriteRuleSubtreeStream(adaptor,"rule levelOfIsolation");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2730:3: ( KW_ISOLATION KW_LEVEL levelOfIsolation -> ^( TOK_ISOLATION_LEVEL levelOfIsolation ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2731:3: KW_ISOLATION KW_LEVEL levelOfIsolation
			{
			KW_ISOLATION1039=(Token)match(input,KW_ISOLATION,FOLLOW_KW_ISOLATION_in_isolationLevel18198); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ISOLATION.add(KW_ISOLATION1039);

			KW_LEVEL1040=(Token)match(input,KW_LEVEL,FOLLOW_KW_LEVEL_in_isolationLevel18200); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_LEVEL.add(KW_LEVEL1040);

			pushFollow(FOLLOW_levelOfIsolation_in_isolationLevel18202);
			levelOfIsolation1041=levelOfIsolation();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_levelOfIsolation.add(levelOfIsolation1041.getTree());
			// AST REWRITE
			// elements: levelOfIsolation
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2731:42: -> ^( TOK_ISOLATION_LEVEL levelOfIsolation )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2731:45: ^( TOK_ISOLATION_LEVEL levelOfIsolation )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ISOLATION_LEVEL, "TOK_ISOLATION_LEVEL"), root_1);
				adaptor.addChild(root_1, stream_levelOfIsolation.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "isolationLevel"


	public static class levelOfIsolation_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "levelOfIsolation"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2735:1: levelOfIsolation : KW_SNAPSHOT -> TOK_ISOLATION_SNAPSHOT ;
	public final HiveParser.levelOfIsolation_return levelOfIsolation() throws RecognitionException {
		HiveParser.levelOfIsolation_return retval = new HiveParser.levelOfIsolation_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SNAPSHOT1042=null;

		ASTNode KW_SNAPSHOT1042_tree=null;
		RewriteRuleTokenStream stream_KW_SNAPSHOT=new RewriteRuleTokenStream(adaptor,"token KW_SNAPSHOT");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2736:3: ( KW_SNAPSHOT -> TOK_ISOLATION_SNAPSHOT )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2737:3: KW_SNAPSHOT
			{
			KW_SNAPSHOT1042=(Token)match(input,KW_SNAPSHOT,FOLLOW_KW_SNAPSHOT_in_levelOfIsolation18227); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SNAPSHOT.add(KW_SNAPSHOT1042);

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2737:15: -> TOK_ISOLATION_SNAPSHOT
			{
				adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_ISOLATION_SNAPSHOT, "TOK_ISOLATION_SNAPSHOT"));
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "levelOfIsolation"


	public static class commitStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "commitStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2740:1: commitStatement : KW_COMMIT ( KW_WORK )? -> TOK_COMMIT ;
	public final HiveParser.commitStatement_return commitStatement() throws RecognitionException {
		HiveParser.commitStatement_return retval = new HiveParser.commitStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_COMMIT1043=null;
		Token KW_WORK1044=null;

		ASTNode KW_COMMIT1043_tree=null;
		ASTNode KW_WORK1044_tree=null;
		RewriteRuleTokenStream stream_KW_WORK=new RewriteRuleTokenStream(adaptor,"token KW_WORK");
		RewriteRuleTokenStream stream_KW_COMMIT=new RewriteRuleTokenStream(adaptor,"token KW_COMMIT");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2741:3: ( KW_COMMIT ( KW_WORK )? -> TOK_COMMIT )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2742:3: KW_COMMIT ( KW_WORK )?
			{
			KW_COMMIT1043=(Token)match(input,KW_COMMIT,FOLLOW_KW_COMMIT_in_commitStatement18246); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_COMMIT.add(KW_COMMIT1043);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2742:13: ( KW_WORK )?
			int alt333=2;
			int LA333_0 = input.LA(1);
			if ( (LA333_0==KW_WORK) ) {
				alt333=1;
			}
			switch (alt333) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2742:15: KW_WORK
					{
					KW_WORK1044=(Token)match(input,KW_WORK,FOLLOW_KW_WORK_in_commitStatement18250); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_WORK.add(KW_WORK1044);

					}
					break;

			}

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2742:26: -> TOK_COMMIT
			{
				adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_COMMIT, "TOK_COMMIT"));
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "commitStatement"


	public static class rollbackStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "rollbackStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2745:1: rollbackStatement : KW_ROLLBACK ( KW_WORK )? -> TOK_ROLLBACK ;
	public final HiveParser.rollbackStatement_return rollbackStatement() throws RecognitionException {
		HiveParser.rollbackStatement_return retval = new HiveParser.rollbackStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ROLLBACK1045=null;
		Token KW_WORK1046=null;

		ASTNode KW_ROLLBACK1045_tree=null;
		ASTNode KW_WORK1046_tree=null;
		RewriteRuleTokenStream stream_KW_ROLLBACK=new RewriteRuleTokenStream(adaptor,"token KW_ROLLBACK");
		RewriteRuleTokenStream stream_KW_WORK=new RewriteRuleTokenStream(adaptor,"token KW_WORK");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2746:3: ( KW_ROLLBACK ( KW_WORK )? -> TOK_ROLLBACK )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2747:3: KW_ROLLBACK ( KW_WORK )?
			{
			KW_ROLLBACK1045=(Token)match(input,KW_ROLLBACK,FOLLOW_KW_ROLLBACK_in_rollbackStatement18272); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ROLLBACK.add(KW_ROLLBACK1045);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2747:15: ( KW_WORK )?
			int alt334=2;
			int LA334_0 = input.LA(1);
			if ( (LA334_0==KW_WORK) ) {
				alt334=1;
			}
			switch (alt334) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2747:17: KW_WORK
					{
					KW_WORK1046=(Token)match(input,KW_WORK,FOLLOW_KW_WORK_in_rollbackStatement18276); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_WORK.add(KW_WORK1046);

					}
					break;

			}

			// AST REWRITE
			// elements: 
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2747:28: -> TOK_ROLLBACK
			{
				adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_ROLLBACK, "TOK_ROLLBACK"));
			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "rollbackStatement"


	public static class setAutoCommitStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "setAutoCommitStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2749:1: setAutoCommitStatement : KW_SET KW_AUTOCOMMIT booleanValueTok -> ^( TOK_SET_AUTOCOMMIT booleanValueTok ) ;
	public final HiveParser.setAutoCommitStatement_return setAutoCommitStatement() throws RecognitionException {
		HiveParser.setAutoCommitStatement_return retval = new HiveParser.setAutoCommitStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_SET1047=null;
		Token KW_AUTOCOMMIT1048=null;
		ParserRuleReturnScope booleanValueTok1049 =null;

		ASTNode KW_SET1047_tree=null;
		ASTNode KW_AUTOCOMMIT1048_tree=null;
		RewriteRuleTokenStream stream_KW_AUTOCOMMIT=new RewriteRuleTokenStream(adaptor,"token KW_AUTOCOMMIT");
		RewriteRuleTokenStream stream_KW_SET=new RewriteRuleTokenStream(adaptor,"token KW_SET");
		RewriteRuleSubtreeStream stream_booleanValueTok=new RewriteRuleSubtreeStream(adaptor,"rule booleanValueTok");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2750:3: ( KW_SET KW_AUTOCOMMIT booleanValueTok -> ^( TOK_SET_AUTOCOMMIT booleanValueTok ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2751:3: KW_SET KW_AUTOCOMMIT booleanValueTok
			{
			KW_SET1047=(Token)match(input,KW_SET,FOLLOW_KW_SET_in_setAutoCommitStatement18297); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_SET.add(KW_SET1047);

			KW_AUTOCOMMIT1048=(Token)match(input,KW_AUTOCOMMIT,FOLLOW_KW_AUTOCOMMIT_in_setAutoCommitStatement18299); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AUTOCOMMIT.add(KW_AUTOCOMMIT1048);

			pushFollow(FOLLOW_booleanValueTok_in_setAutoCommitStatement18301);
			booleanValueTok1049=booleanValueTok();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_booleanValueTok.add(booleanValueTok1049.getTree());
			// AST REWRITE
			// elements: booleanValueTok
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2751:40: -> ^( TOK_SET_AUTOCOMMIT booleanValueTok )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2751:43: ^( TOK_SET_AUTOCOMMIT booleanValueTok )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_SET_AUTOCOMMIT, "TOK_SET_AUTOCOMMIT"), root_1);
				adaptor.addChild(root_1, stream_booleanValueTok.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "setAutoCommitStatement"


	public static class abortTransactionStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "abortTransactionStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2757:1: abortTransactionStatement : KW_ABORT KW_TRANSACTIONS ( Number )+ -> ^( TOK_ABORT_TRANSACTIONS ( Number )+ ) ;
	public final HiveParser.abortTransactionStatement_return abortTransactionStatement() throws RecognitionException {
		HiveParser.abortTransactionStatement_return retval = new HiveParser.abortTransactionStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_ABORT1050=null;
		Token KW_TRANSACTIONS1051=null;
		Token Number1052=null;

		ASTNode KW_ABORT1050_tree=null;
		ASTNode KW_TRANSACTIONS1051_tree=null;
		ASTNode Number1052_tree=null;
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_TRANSACTIONS=new RewriteRuleTokenStream(adaptor,"token KW_TRANSACTIONS");
		RewriteRuleTokenStream stream_KW_ABORT=new RewriteRuleTokenStream(adaptor,"token KW_ABORT");

		 pushMsg("abort transactions statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2760:3: ( KW_ABORT KW_TRANSACTIONS ( Number )+ -> ^( TOK_ABORT_TRANSACTIONS ( Number )+ ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2761:3: KW_ABORT KW_TRANSACTIONS ( Number )+
			{
			KW_ABORT1050=(Token)match(input,KW_ABORT,FOLLOW_KW_ABORT_in_abortTransactionStatement18336); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ABORT.add(KW_ABORT1050);

			KW_TRANSACTIONS1051=(Token)match(input,KW_TRANSACTIONS,FOLLOW_KW_TRANSACTIONS_in_abortTransactionStatement18338); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_TRANSACTIONS.add(KW_TRANSACTIONS1051);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2761:28: ( Number )+
			int cnt335=0;
			loop335:
			while (true) {
				int alt335=2;
				int LA335_0 = input.LA(1);
				if ( (LA335_0==Number) ) {
					alt335=1;
				}

				switch (alt335) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2761:30: Number
					{
					Number1052=(Token)match(input,Number,FOLLOW_Number_in_abortTransactionStatement18342); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_Number.add(Number1052);

					}
					break;

				default :
					if ( cnt335 >= 1 ) break loop335;
					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee = new EarlyExitException(335, input);
					throw eee;
				}
				cnt335++;
			}

			// AST REWRITE
			// elements: Number
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2761:40: -> ^( TOK_ABORT_TRANSACTIONS ( Number )+ )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2761:43: ^( TOK_ABORT_TRANSACTIONS ( Number )+ )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_ABORT_TRANSACTIONS, "TOK_ABORT_TRANSACTIONS"), root_1);
				if ( !(stream_Number.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_Number.hasNext() ) {
					adaptor.addChild(root_1, stream_Number.nextNode());
				}
				stream_Number.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "abortTransactionStatement"


	public static class mergeStatement_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "mergeStatement"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2768:1: mergeStatement : KW_MERGE KW_INTO tableName ( ( KW_AS )? identifier )? KW_USING joinSourcePart KW_ON expression whenClauses -> ^( TOK_MERGE ^( TOK_TABREF tableName ( identifier )? ) joinSourcePart expression whenClauses ) ;
	public final HiveParser.mergeStatement_return mergeStatement() throws RecognitionException {
		HiveParser.mergeStatement_return retval = new HiveParser.mergeStatement_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_MERGE1053=null;
		Token KW_INTO1054=null;
		Token KW_AS1056=null;
		Token KW_USING1058=null;
		Token KW_ON1060=null;
		ParserRuleReturnScope tableName1055 =null;
		ParserRuleReturnScope identifier1057 =null;
		ParserRuleReturnScope joinSourcePart1059 =null;
		ParserRuleReturnScope expression1061 =null;
		ParserRuleReturnScope whenClauses1062 =null;

		ASTNode KW_MERGE1053_tree=null;
		ASTNode KW_INTO1054_tree=null;
		ASTNode KW_AS1056_tree=null;
		ASTNode KW_USING1058_tree=null;
		ASTNode KW_ON1060_tree=null;
		RewriteRuleTokenStream stream_KW_MERGE=new RewriteRuleTokenStream(adaptor,"token KW_MERGE");
		RewriteRuleTokenStream stream_KW_INTO=new RewriteRuleTokenStream(adaptor,"token KW_INTO");
		RewriteRuleTokenStream stream_KW_USING=new RewriteRuleTokenStream(adaptor,"token KW_USING");
		RewriteRuleTokenStream stream_KW_ON=new RewriteRuleTokenStream(adaptor,"token KW_ON");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
		RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
		RewriteRuleSubtreeStream stream_whenClauses=new RewriteRuleSubtreeStream(adaptor,"rule whenClauses");
		RewriteRuleSubtreeStream stream_tableName=new RewriteRuleSubtreeStream(adaptor,"rule tableName");
		RewriteRuleSubtreeStream stream_joinSourcePart=new RewriteRuleSubtreeStream(adaptor,"rule joinSourcePart");

		 pushMsg("MERGE statement", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2771:4: ( KW_MERGE KW_INTO tableName ( ( KW_AS )? identifier )? KW_USING joinSourcePart KW_ON expression whenClauses -> ^( TOK_MERGE ^( TOK_TABREF tableName ( identifier )? ) joinSourcePart expression whenClauses ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2772:4: KW_MERGE KW_INTO tableName ( ( KW_AS )? identifier )? KW_USING joinSourcePart KW_ON expression whenClauses
			{
			KW_MERGE1053=(Token)match(input,KW_MERGE,FOLLOW_KW_MERGE_in_mergeStatement18388); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MERGE.add(KW_MERGE1053);

			KW_INTO1054=(Token)match(input,KW_INTO,FOLLOW_KW_INTO_in_mergeStatement18390); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INTO.add(KW_INTO1054);

			pushFollow(FOLLOW_tableName_in_mergeStatement18392);
			tableName1055=tableName();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_tableName.add(tableName1055.getTree());
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2772:31: ( ( KW_AS )? identifier )?
			int alt337=2;
			int LA337_0 = input.LA(1);
			if ( (LA337_0==Identifier||(LA337_0 >= KW_ABORT && LA337_0 <= KW_AFTER)||LA337_0==KW_ANALYZE||LA337_0==KW_ARCHIVE||(LA337_0 >= KW_AS && LA337_0 <= KW_ASC)||(LA337_0 >= KW_AUTOCOMMIT && LA337_0 <= KW_BEFORE)||(LA337_0 >= KW_BUCKET && LA337_0 <= KW_BUCKETS)||(LA337_0 >= KW_CACHE && LA337_0 <= KW_CASCADE)||LA337_0==KW_CHANGE||(LA337_0 >= KW_CLUSTER && LA337_0 <= KW_COLLECTION)||(LA337_0 >= KW_COLUMNS && LA337_0 <= KW_COMMENT)||(LA337_0 >= KW_COMPACT && LA337_0 <= KW_CONCATENATE)||LA337_0==KW_CONTINUE||LA337_0==KW_DATA||LA337_0==KW_DATABASES||(LA337_0 >= KW_DATETIME && LA337_0 <= KW_DBPROPERTIES)||(LA337_0 >= KW_DEFERRED && LA337_0 <= KW_DEFINED)||(LA337_0 >= KW_DELIMITED && LA337_0 <= KW_DESC)||(LA337_0 >= KW_DETAIL && LA337_0 <= KW_DISABLE)||LA337_0==KW_DISTRIBUTE||LA337_0==KW_DOW||(LA337_0 >= KW_DUMP && LA337_0 <= KW_ELEM_TYPE)||LA337_0==KW_ENABLE||LA337_0==KW_ESCAPED||LA337_0==KW_EXCLUSIVE||(LA337_0 >= KW_EXPLAIN && LA337_0 <= KW_EXPRESSION)||(LA337_0 >= KW_FIELDS && LA337_0 <= KW_FIRST)||(LA337_0 >= KW_FORMAT && LA337_0 <= KW_FORMATTED)||LA337_0==KW_FUNCTIONS||(LA337_0 >= KW_HOUR && LA337_0 <= KW_IDXPROPERTIES)||(LA337_0 >= KW_INDEX && LA337_0 <= KW_INDEXES)||(LA337_0 >= KW_INPATH && LA337_0 <= KW_INPUTFORMAT)||(LA337_0 >= KW_ISOLATION && LA337_0 <= KW_JAR)||(LA337_0 >= KW_KEY && LA337_0 <= KW_LAST)||LA337_0==KW_LEVEL||(LA337_0 >= KW_LIMIT && LA337_0 <= KW_LOAD)||(LA337_0 >= KW_LOCATION && LA337_0 <= KW_LONG)||(LA337_0 >= KW_MAPJOIN && LA337_0 <= KW_MATERIALIZED)||LA337_0==KW_METADATA||(LA337_0 >= KW_MINUTE && LA337_0 <= KW_MONTH)||LA337_0==KW_MSCK||(LA337_0 >= KW_NORELY && LA337_0 <= KW_NOSCAN)||LA337_0==KW_NOVALIDATE||LA337_0==KW_NULLS||LA337_0==KW_OFFSET||(LA337_0 >= KW_OPERATOR && LA337_0 <= KW_OPTION)||(LA337_0 >= KW_OUTPUTDRIVER && LA337_0 <= KW_OUTPUTFORMAT)||(LA337_0 >= KW_OVERWRITE && LA337_0 <= KW_OWNER)||(LA337_0 >= KW_PARTITIONED && LA337_0 <= KW_PARTITIONS)||LA337_0==KW_PLUS||LA337_0==KW_PRETTY||LA337_0==KW_PRINCIPALS||(LA337_0 >= KW_PURGE && LA337_0 <= KW_QUARTER)||LA337_0==KW_READ||(LA337_0 >= KW_REBUILD && LA337_0 <= KW_RECORDWRITER)||(LA337_0 >= KW_RELOAD && LA337_0 <= KW_RESTRICT)||LA337_0==KW_REWRITE||(LA337_0 >= KW_ROLE && LA337_0 <= KW_ROLES)||(LA337_0 >= KW_SCHEMA && LA337_0 <= KW_SECOND)||(LA337_0 >= KW_SEMI && LA337_0 <= KW_SERVER)||(LA337_0 >= KW_SETS && LA337_0 <= KW_SKEWED)||(LA337_0 >= KW_SNAPSHOT && LA337_0 <= KW_SSL)||(LA337_0 >= KW_STATISTICS && LA337_0 <= KW_SUMMARY)||LA337_0==KW_TABLES||(LA337_0 >= KW_TBLPROPERTIES && LA337_0 <= KW_TERMINATED)||LA337_0==KW_TINYINT||(LA337_0 >= KW_TOUCH && LA337_0 <= KW_TRANSACTIONS)||LA337_0==KW_UNARCHIVE||LA337_0==KW_UNDO||LA337_0==KW_UNIONTYPE||(LA337_0 >= KW_UNLOCK && LA337_0 <= KW_UNSIGNED)||(LA337_0 >= KW_URI && LA337_0 <= KW_USE)||(LA337_0 >= KW_UTC && LA337_0 <= KW_VALIDATE)||LA337_0==KW_VALUE_TYPE||(LA337_0 >= KW_VECTORIZATION && LA337_0 <= KW_WEEK)||LA337_0==KW_WHILE||(LA337_0 >= KW_WORK && LA337_0 <= KW_YEAR)||LA337_0==KW_BATCH||LA337_0==KW_DAYOFWEEK||LA337_0==KW_HOLD_DDLTIME||LA337_0==KW_IGNORE||LA337_0==KW_NO_DROP||LA337_0==KW_OFFLINE||LA337_0==KW_PROTECTION||LA337_0==KW_READONLY) ) {
				alt337=1;
			}
			switch (alt337) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2772:32: ( KW_AS )? identifier
					{
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2772:32: ( KW_AS )?
					int alt336=2;
					int LA336_0 = input.LA(1);
					if ( (LA336_0==KW_AS) ) {
						alt336=1;
					}
					switch (alt336) {
						case 1 :
							// org/apache/hadoop/hive/ql/parse/HiveParser.g:2772:32: KW_AS
							{
							KW_AS1056=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_mergeStatement18395); if (state.failed) return retval; 
							if ( state.backtracking==0 ) stream_KW_AS.add(KW_AS1056);

							}
							break;

					}

					pushFollow(FOLLOW_identifier_in_mergeStatement18398);
					identifier1057=identifier();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_identifier.add(identifier1057.getTree());
					}
					break;

			}

			KW_USING1058=(Token)match(input,KW_USING,FOLLOW_KW_USING_in_mergeStatement18402); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_USING.add(KW_USING1058);

			pushFollow(FOLLOW_joinSourcePart_in_mergeStatement18404);
			joinSourcePart1059=joinSourcePart();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_joinSourcePart.add(joinSourcePart1059.getTree());
			KW_ON1060=(Token)match(input,KW_ON,FOLLOW_KW_ON_in_mergeStatement18406); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_ON.add(KW_ON1060);

			pushFollow(FOLLOW_expression_in_mergeStatement18408);
			expression1061=expression();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_expression.add(expression1061.getTree());
			pushFollow(FOLLOW_whenClauses_in_mergeStatement18410);
			whenClauses1062=whenClauses();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_whenClauses.add(whenClauses1062.getTree());
			// AST REWRITE
			// elements: expression, joinSourcePart, tableName, whenClauses, identifier
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2772:105: -> ^( TOK_MERGE ^( TOK_TABREF tableName ( identifier )? ) joinSourcePart expression whenClauses )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2773:5: ^( TOK_MERGE ^( TOK_TABREF tableName ( identifier )? ) joinSourcePart expression whenClauses )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_MERGE, "TOK_MERGE"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2773:17: ^( TOK_TABREF tableName ( identifier )? )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_TABREF, "TOK_TABREF"), root_2);
				adaptor.addChild(root_2, stream_tableName.nextTree());
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2773:40: ( identifier )?
				if ( stream_identifier.hasNext() ) {
					adaptor.addChild(root_2, stream_identifier.nextTree());
				}
				stream_identifier.reset();

				adaptor.addChild(root_1, root_2);
				}

				adaptor.addChild(root_1, stream_joinSourcePart.nextTree());
				adaptor.addChild(root_1, stream_expression.nextTree());
				adaptor.addChild(root_1, stream_whenClauses.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "mergeStatement"


	public static class whenClauses_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "whenClauses"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2781:1: whenClauses : ( whenMatchedAndClause | whenMatchedThenClause )* ( whenNotMatchedClause )? ;
	public final HiveParser.whenClauses_return whenClauses() throws RecognitionException {
		HiveParser.whenClauses_return retval = new HiveParser.whenClauses_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		ParserRuleReturnScope whenMatchedAndClause1063 =null;
		ParserRuleReturnScope whenMatchedThenClause1064 =null;
		ParserRuleReturnScope whenNotMatchedClause1065 =null;


		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2782:4: ( ( whenMatchedAndClause | whenMatchedThenClause )* ( whenNotMatchedClause )? )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2783:4: ( whenMatchedAndClause | whenMatchedThenClause )* ( whenNotMatchedClause )?
			{
			root_0 = (ASTNode)adaptor.nil();


			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2783:4: ( whenMatchedAndClause | whenMatchedThenClause )*
			loop338:
			while (true) {
				int alt338=3;
				int LA338_0 = input.LA(1);
				if ( (LA338_0==KW_WHEN) ) {
					int LA338_1 = input.LA(2);
					if ( (LA338_1==KW_MATCHED) ) {
						int LA338_4 = input.LA(3);
						if ( (LA338_4==KW_AND) ) {
							alt338=1;
						}
						else if ( (LA338_4==KW_THEN) ) {
							alt338=2;
						}

					}

				}

				switch (alt338) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2783:5: whenMatchedAndClause
					{
					pushFollow(FOLLOW_whenMatchedAndClause_in_whenClauses18455);
					whenMatchedAndClause1063=whenMatchedAndClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, whenMatchedAndClause1063.getTree());

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2783:26: whenMatchedThenClause
					{
					pushFollow(FOLLOW_whenMatchedThenClause_in_whenClauses18457);
					whenMatchedThenClause1064=whenMatchedThenClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, whenMatchedThenClause1064.getTree());

					}
					break;

				default :
					break loop338;
				}
			}

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2783:50: ( whenNotMatchedClause )?
			int alt339=2;
			int LA339_0 = input.LA(1);
			if ( (LA339_0==KW_WHEN) ) {
				alt339=1;
			}
			switch (alt339) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2783:50: whenNotMatchedClause
					{
					pushFollow(FOLLOW_whenNotMatchedClause_in_whenClauses18461);
					whenNotMatchedClause1065=whenNotMatchedClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, whenNotMatchedClause1065.getTree());

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "whenClauses"


	public static class whenNotMatchedClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "whenNotMatchedClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2785:1: whenNotMatchedClause : KW_WHEN KW_NOT KW_MATCHED ( KW_AND expression )? KW_THEN KW_INSERT KW_VALUES valueRowConstructor -> ^( TOK_NOT_MATCHED ^( TOK_INSERT valueRowConstructor ) ( expression )? ) ;
	public final HiveParser.whenNotMatchedClause_return whenNotMatchedClause() throws RecognitionException {
		HiveParser.whenNotMatchedClause_return retval = new HiveParser.whenNotMatchedClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WHEN1066=null;
		Token KW_NOT1067=null;
		Token KW_MATCHED1068=null;
		Token KW_AND1069=null;
		Token KW_THEN1071=null;
		Token KW_INSERT1072=null;
		Token KW_VALUES1073=null;
		ParserRuleReturnScope expression1070 =null;
		ParserRuleReturnScope valueRowConstructor1074 =null;

		ASTNode KW_WHEN1066_tree=null;
		ASTNode KW_NOT1067_tree=null;
		ASTNode KW_MATCHED1068_tree=null;
		ASTNode KW_AND1069_tree=null;
		ASTNode KW_THEN1071_tree=null;
		ASTNode KW_INSERT1072_tree=null;
		ASTNode KW_VALUES1073_tree=null;
		RewriteRuleTokenStream stream_KW_WHEN=new RewriteRuleTokenStream(adaptor,"token KW_WHEN");
		RewriteRuleTokenStream stream_KW_NOT=new RewriteRuleTokenStream(adaptor,"token KW_NOT");
		RewriteRuleTokenStream stream_KW_AND=new RewriteRuleTokenStream(adaptor,"token KW_AND");
		RewriteRuleTokenStream stream_KW_THEN=new RewriteRuleTokenStream(adaptor,"token KW_THEN");
		RewriteRuleTokenStream stream_KW_INSERT=new RewriteRuleTokenStream(adaptor,"token KW_INSERT");
		RewriteRuleTokenStream stream_KW_MATCHED=new RewriteRuleTokenStream(adaptor,"token KW_MATCHED");
		RewriteRuleTokenStream stream_KW_VALUES=new RewriteRuleTokenStream(adaptor,"token KW_VALUES");
		RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
		RewriteRuleSubtreeStream stream_valueRowConstructor=new RewriteRuleSubtreeStream(adaptor,"rule valueRowConstructor");

		 pushMsg("WHEN NOT MATCHED clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2788:4: ( KW_WHEN KW_NOT KW_MATCHED ( KW_AND expression )? KW_THEN KW_INSERT KW_VALUES valueRowConstructor -> ^( TOK_NOT_MATCHED ^( TOK_INSERT valueRowConstructor ) ( expression )? ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2789:3: KW_WHEN KW_NOT KW_MATCHED ( KW_AND expression )? KW_THEN KW_INSERT KW_VALUES valueRowConstructor
			{
			KW_WHEN1066=(Token)match(input,KW_WHEN,FOLLOW_KW_WHEN_in_whenNotMatchedClause18488); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WHEN.add(KW_WHEN1066);

			KW_NOT1067=(Token)match(input,KW_NOT,FOLLOW_KW_NOT_in_whenNotMatchedClause18490); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_NOT.add(KW_NOT1067);

			KW_MATCHED1068=(Token)match(input,KW_MATCHED,FOLLOW_KW_MATCHED_in_whenNotMatchedClause18492); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MATCHED.add(KW_MATCHED1068);

			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2789:29: ( KW_AND expression )?
			int alt340=2;
			int LA340_0 = input.LA(1);
			if ( (LA340_0==KW_AND) ) {
				alt340=1;
			}
			switch (alt340) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2789:30: KW_AND expression
					{
					KW_AND1069=(Token)match(input,KW_AND,FOLLOW_KW_AND_in_whenNotMatchedClause18495); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_AND.add(KW_AND1069);

					pushFollow(FOLLOW_expression_in_whenNotMatchedClause18497);
					expression1070=expression();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_expression.add(expression1070.getTree());
					}
					break;

			}

			KW_THEN1071=(Token)match(input,KW_THEN,FOLLOW_KW_THEN_in_whenNotMatchedClause18501); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_THEN.add(KW_THEN1071);

			KW_INSERT1072=(Token)match(input,KW_INSERT,FOLLOW_KW_INSERT_in_whenNotMatchedClause18503); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_INSERT.add(KW_INSERT1072);

			KW_VALUES1073=(Token)match(input,KW_VALUES,FOLLOW_KW_VALUES_in_whenNotMatchedClause18505); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_VALUES.add(KW_VALUES1073);

			pushFollow(FOLLOW_valueRowConstructor_in_whenNotMatchedClause18507);
			valueRowConstructor1074=valueRowConstructor();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_valueRowConstructor.add(valueRowConstructor1074.getTree());
			// AST REWRITE
			// elements: valueRowConstructor, expression
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2789:98: -> ^( TOK_NOT_MATCHED ^( TOK_INSERT valueRowConstructor ) ( expression )? )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2790:5: ^( TOK_NOT_MATCHED ^( TOK_INSERT valueRowConstructor ) ( expression )? )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_NOT_MATCHED, "TOK_NOT_MATCHED"), root_1);
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2790:23: ^( TOK_INSERT valueRowConstructor )
				{
				ASTNode root_2 = (ASTNode)adaptor.nil();
				root_2 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_INSERT, "TOK_INSERT"), root_2);
				adaptor.addChild(root_2, stream_valueRowConstructor.nextTree());
				adaptor.addChild(root_1, root_2);
				}

				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2790:57: ( expression )?
				if ( stream_expression.hasNext() ) {
					adaptor.addChild(root_1, stream_expression.nextTree());
				}
				stream_expression.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "whenNotMatchedClause"


	public static class whenMatchedAndClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "whenMatchedAndClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2792:1: whenMatchedAndClause : KW_WHEN KW_MATCHED KW_AND expression KW_THEN updateOrDelete -> ^( TOK_MATCHED updateOrDelete expression ) ;
	public final HiveParser.whenMatchedAndClause_return whenMatchedAndClause() throws RecognitionException {
		HiveParser.whenMatchedAndClause_return retval = new HiveParser.whenMatchedAndClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WHEN1075=null;
		Token KW_MATCHED1076=null;
		Token KW_AND1077=null;
		Token KW_THEN1079=null;
		ParserRuleReturnScope expression1078 =null;
		ParserRuleReturnScope updateOrDelete1080 =null;

		ASTNode KW_WHEN1075_tree=null;
		ASTNode KW_MATCHED1076_tree=null;
		ASTNode KW_AND1077_tree=null;
		ASTNode KW_THEN1079_tree=null;
		RewriteRuleTokenStream stream_KW_WHEN=new RewriteRuleTokenStream(adaptor,"token KW_WHEN");
		RewriteRuleTokenStream stream_KW_AND=new RewriteRuleTokenStream(adaptor,"token KW_AND");
		RewriteRuleTokenStream stream_KW_THEN=new RewriteRuleTokenStream(adaptor,"token KW_THEN");
		RewriteRuleTokenStream stream_KW_MATCHED=new RewriteRuleTokenStream(adaptor,"token KW_MATCHED");
		RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
		RewriteRuleSubtreeStream stream_updateOrDelete=new RewriteRuleSubtreeStream(adaptor,"rule updateOrDelete");

		 pushMsg("WHEN MATCHED AND clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2795:3: ( KW_WHEN KW_MATCHED KW_AND expression KW_THEN updateOrDelete -> ^( TOK_MATCHED updateOrDelete expression ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2796:3: KW_WHEN KW_MATCHED KW_AND expression KW_THEN updateOrDelete
			{
			KW_WHEN1075=(Token)match(input,KW_WHEN,FOLLOW_KW_WHEN_in_whenMatchedAndClause18550); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WHEN.add(KW_WHEN1075);

			KW_MATCHED1076=(Token)match(input,KW_MATCHED,FOLLOW_KW_MATCHED_in_whenMatchedAndClause18552); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MATCHED.add(KW_MATCHED1076);

			KW_AND1077=(Token)match(input,KW_AND,FOLLOW_KW_AND_in_whenMatchedAndClause18554); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_AND.add(KW_AND1077);

			pushFollow(FOLLOW_expression_in_whenMatchedAndClause18556);
			expression1078=expression();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_expression.add(expression1078.getTree());
			KW_THEN1079=(Token)match(input,KW_THEN,FOLLOW_KW_THEN_in_whenMatchedAndClause18558); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_THEN.add(KW_THEN1079);

			pushFollow(FOLLOW_updateOrDelete_in_whenMatchedAndClause18560);
			updateOrDelete1080=updateOrDelete();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_updateOrDelete.add(updateOrDelete1080.getTree());
			// AST REWRITE
			// elements: expression, updateOrDelete
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2796:63: -> ^( TOK_MATCHED updateOrDelete expression )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2797:5: ^( TOK_MATCHED updateOrDelete expression )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_MATCHED, "TOK_MATCHED"), root_1);
				adaptor.addChild(root_1, stream_updateOrDelete.nextTree());
				adaptor.addChild(root_1, stream_expression.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "whenMatchedAndClause"


	public static class whenMatchedThenClause_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "whenMatchedThenClause"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2799:1: whenMatchedThenClause : KW_WHEN KW_MATCHED KW_THEN updateOrDelete -> ^( TOK_MATCHED updateOrDelete ) ;
	public final HiveParser.whenMatchedThenClause_return whenMatchedThenClause() throws RecognitionException {
		HiveParser.whenMatchedThenClause_return retval = new HiveParser.whenMatchedThenClause_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_WHEN1081=null;
		Token KW_MATCHED1082=null;
		Token KW_THEN1083=null;
		ParserRuleReturnScope updateOrDelete1084 =null;

		ASTNode KW_WHEN1081_tree=null;
		ASTNode KW_MATCHED1082_tree=null;
		ASTNode KW_THEN1083_tree=null;
		RewriteRuleTokenStream stream_KW_WHEN=new RewriteRuleTokenStream(adaptor,"token KW_WHEN");
		RewriteRuleTokenStream stream_KW_THEN=new RewriteRuleTokenStream(adaptor,"token KW_THEN");
		RewriteRuleTokenStream stream_KW_MATCHED=new RewriteRuleTokenStream(adaptor,"token KW_MATCHED");
		RewriteRuleSubtreeStream stream_updateOrDelete=new RewriteRuleSubtreeStream(adaptor,"rule updateOrDelete");

		 pushMsg("WHEN MATCHED THEN clause", state); 
		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2802:3: ( KW_WHEN KW_MATCHED KW_THEN updateOrDelete -> ^( TOK_MATCHED updateOrDelete ) )
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2803:3: KW_WHEN KW_MATCHED KW_THEN updateOrDelete
			{
			KW_WHEN1081=(Token)match(input,KW_WHEN,FOLLOW_KW_WHEN_in_whenMatchedThenClause18598); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_WHEN.add(KW_WHEN1081);

			KW_MATCHED1082=(Token)match(input,KW_MATCHED,FOLLOW_KW_MATCHED_in_whenMatchedThenClause18600); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_MATCHED.add(KW_MATCHED1082);

			KW_THEN1083=(Token)match(input,KW_THEN,FOLLOW_KW_THEN_in_whenMatchedThenClause18602); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_KW_THEN.add(KW_THEN1083);

			pushFollow(FOLLOW_updateOrDelete_in_whenMatchedThenClause18604);
			updateOrDelete1084=updateOrDelete();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_updateOrDelete.add(updateOrDelete1084.getTree());
			// AST REWRITE
			// elements: updateOrDelete
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (ASTNode)adaptor.nil();
			// 2803:45: -> ^( TOK_MATCHED updateOrDelete )
			{
				// org/apache/hadoop/hive/ql/parse/HiveParser.g:2804:6: ^( TOK_MATCHED updateOrDelete )
				{
				ASTNode root_1 = (ASTNode)adaptor.nil();
				root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_MATCHED, "TOK_MATCHED"), root_1);
				adaptor.addChild(root_1, stream_updateOrDelete.nextTree());
				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
			if ( state.backtracking==0 ) { popMsg(state); }
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "whenMatchedThenClause"


	public static class updateOrDelete_return extends ParserRuleReturnScope {
		ASTNode tree;
		@Override
		public ASTNode getTree() { return tree; }
	};


	// $ANTLR start "updateOrDelete"
	// org/apache/hadoop/hive/ql/parse/HiveParser.g:2806:1: updateOrDelete : ( KW_UPDATE setColumnsClause -> ^( TOK_UPDATE setColumnsClause ) | KW_DELETE -> TOK_DELETE );
	public final HiveParser.updateOrDelete_return updateOrDelete() throws RecognitionException {
		HiveParser.updateOrDelete_return retval = new HiveParser.updateOrDelete_return();
		retval.start = input.LT(1);

		ASTNode root_0 = null;

		Token KW_UPDATE1085=null;
		Token KW_DELETE1087=null;
		ParserRuleReturnScope setColumnsClause1086 =null;

		ASTNode KW_UPDATE1085_tree=null;
		ASTNode KW_DELETE1087_tree=null;
		RewriteRuleTokenStream stream_KW_DELETE=new RewriteRuleTokenStream(adaptor,"token KW_DELETE");
		RewriteRuleTokenStream stream_KW_UPDATE=new RewriteRuleTokenStream(adaptor,"token KW_UPDATE");
		RewriteRuleSubtreeStream stream_setColumnsClause=new RewriteRuleSubtreeStream(adaptor,"rule setColumnsClause");

		try {
			// org/apache/hadoop/hive/ql/parse/HiveParser.g:2807:4: ( KW_UPDATE setColumnsClause -> ^( TOK_UPDATE setColumnsClause ) | KW_DELETE -> TOK_DELETE )
			int alt341=2;
			int LA341_0 = input.LA(1);
			if ( (LA341_0==KW_UPDATE) ) {
				alt341=1;
			}
			else if ( (LA341_0==KW_DELETE) ) {
				alt341=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 341, 0, input);
				throw nvae;
			}

			switch (alt341) {
				case 1 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2808:4: KW_UPDATE setColumnsClause
					{
					KW_UPDATE1085=(Token)match(input,KW_UPDATE,FOLLOW_KW_UPDATE_in_updateOrDelete18633); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_UPDATE.add(KW_UPDATE1085);

					pushFollow(FOLLOW_setColumnsClause_in_updateOrDelete18635);
					setColumnsClause1086=setColumnsClause();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_setColumnsClause.add(setColumnsClause1086.getTree());
					// AST REWRITE
					// elements: setColumnsClause
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2808:31: -> ^( TOK_UPDATE setColumnsClause )
					{
						// org/apache/hadoop/hive/ql/parse/HiveParser.g:2808:34: ^( TOK_UPDATE setColumnsClause )
						{
						ASTNode root_1 = (ASTNode)adaptor.nil();
						root_1 = (ASTNode)adaptor.becomeRoot((ASTNode)adaptor.create(TOK_UPDATE, "TOK_UPDATE"), root_1);
						adaptor.addChild(root_1, stream_setColumnsClause.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;
					}

					}
					break;
				case 2 :
					// org/apache/hadoop/hive/ql/parse/HiveParser.g:2810:4: KW_DELETE
					{
					KW_DELETE1087=(Token)match(input,KW_DELETE,FOLLOW_KW_DELETE_in_updateOrDelete18653); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_KW_DELETE.add(KW_DELETE1087);

					// AST REWRITE
					// elements: 
					// token labels: 
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					if ( state.backtracking==0 ) {
					retval.tree = root_0;
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (ASTNode)adaptor.nil();
					// 2810:14: -> TOK_DELETE
					{
						adaptor.addChild(root_0, (ASTNode)adaptor.create(TOK_DELETE, "TOK_DELETE"));
					}


					retval.tree = root_0;
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (ASTNode)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "updateOrDelete"

	// $ANTLR start synpred1_HiveParser
	public final void synpred1_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:877:7: ( grantPrivileges )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:877:8: grantPrivileges
		{
		pushFollow(FOLLOW_grantPrivileges_in_synpred1_HiveParser2503);
		grantPrivileges();
		state._fsp--;
		if (state.failed) return;

		}

	}
	// $ANTLR end synpred1_HiveParser

	// $ANTLR start synpred2_HiveParser
	public final void synpred2_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:878:7: ( revokePrivileges )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:878:8: revokePrivileges
		{
		pushFollow(FOLLOW_revokePrivileges_in_synpred2_HiveParser2517);
		revokePrivileges();
		state._fsp--;
		if (state.failed) return;

		}

	}
	// $ANTLR end synpred2_HiveParser

	// $ANTLR start synpred3_HiveParser
	public final void synpred3_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1129:7: ( alterStatementSuffixRename[true] )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1129:8: alterStatementSuffixRename[true]
		{
		pushFollow(FOLLOW_alterStatementSuffixRename_in_synpred3_HiveParser4551);
		alterStatementSuffixRename(true);
		state._fsp--;
		if (state.failed) return;

		}

	}
	// $ANTLR end synpred3_HiveParser

	// $ANTLR start synpred4_HiveParser
	public final void synpred4_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1480:4: ( KW_ELEM_TYPE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1480:5: KW_ELEM_TYPE
		{
		match(input,KW_ELEM_TYPE,FOLLOW_KW_ELEM_TYPE_in_synpred4_HiveParser7170); if (state.failed) return;

		}

	}
	// $ANTLR end synpred4_HiveParser

	// $ANTLR start synpred5_HiveParser
	public final void synpred5_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1482:4: ( KW_KEY_TYPE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1482:5: KW_KEY_TYPE
		{
		match(input,KW_KEY_TYPE,FOLLOW_KW_KEY_TYPE_in_synpred5_HiveParser7187); if (state.failed) return;

		}

	}
	// $ANTLR end synpred5_HiveParser

	// $ANTLR start synpred6_HiveParser
	public final void synpred6_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1484:4: ( KW_VALUE_TYPE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1484:5: KW_VALUE_TYPE
		{
		match(input,KW_VALUE_TYPE,FOLLOW_KW_VALUE_TYPE_in_synpred6_HiveParser7204); if (state.failed) return;

		}

	}
	// $ANTLR end synpred6_HiveParser

	// $ANTLR start synpred7_HiveParser
	public final void synpred7_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1508:5: ( KW_DATABASE | KW_SCHEMA )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:
		{
		if ( input.LA(1)==KW_DATABASE||input.LA(1)==KW_SCHEMA ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
	// $ANTLR end synpred7_HiveParser

	// $ANTLR start synpred8_HiveParser
	public final void synpred8_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:5: ( KW_FUNCTION )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1510:6: KW_FUNCTION
		{
		match(input,KW_FUNCTION,FOLLOW_KW_FUNCTION_in_synpred8_HiveParser7412); if (state.failed) return;

		}

	}
	// $ANTLR end synpred8_HiveParser

	// $ANTLR start synpred9_HiveParser
	public final void synpred9_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1512:5: ( KW_FORMATTED | KW_EXTENDED | KW_PRETTY )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:
		{
		if ( input.LA(1)==KW_EXTENDED||input.LA(1)==KW_FORMATTED||input.LA(1)==KW_PRETTY ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
	// $ANTLR end synpred9_HiveParser

	// $ANTLR start synpred10_HiveParser
	public final void synpred10_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:7: ( KW_COMPUTE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1523:8: KW_COMPUTE
		{
		match(input,KW_COMPUTE,FOLLOW_KW_COMPUTE_in_synpred10_HiveParser7571); if (state.failed) return;

		}

	}
	// $ANTLR end synpred10_HiveParser

	// $ANTLR start synpred11_HiveParser
	public final void synpred11_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1527:7: ( KW_CACHE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1527:8: KW_CACHE
		{
		match(input,KW_CACHE,FOLLOW_KW_CACHE_in_synpred11_HiveParser7711); if (state.failed) return;

		}

	}
	// $ANTLR end synpred11_HiveParser

	// $ANTLR start synpred12_HiveParser
	public final void synpred12_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1542:9: ( KW_DATABASE | KW_SCHEMA )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:
		{
		if ( input.LA(1)==KW_DATABASE||input.LA(1)==KW_SCHEMA ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
	// $ANTLR end synpred12_HiveParser

	// $ANTLR start synpred13_HiveParser
	public final void synpred13_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1551:7: ( KW_DATABASE | KW_SCHEMA )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:
		{
		if ( input.LA(1)==KW_DATABASE||input.LA(1)==KW_SCHEMA ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
	// $ANTLR end synpred13_HiveParser

	// $ANTLR start synpred14_HiveParser
	public final void synpred14_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1664:5: ( KW_ALL )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1664:6: KW_ALL
		{
		match(input,KW_ALL,FOLLOW_KW_ALL_in_synpred14_HiveParser9146); if (state.failed) return;

		}

	}
	// $ANTLR end synpred14_HiveParser

	// $ANTLR start synpred15_HiveParser
	public final void synpred15_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1666:5: ( KW_NONE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1666:6: KW_NONE
		{
		match(input,KW_NONE,FOLLOW_KW_NONE_in_synpred15_HiveParser9177); if (state.failed) return;

		}

	}
	// $ANTLR end synpred15_HiveParser

	// $ANTLR start synpred16_HiveParser
	public final void synpred16_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1690:7: ( KW_ALL )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1690:8: KW_ALL
		{
		match(input,KW_ALL,FOLLOW_KW_ALL_in_synpred16_HiveParser9351); if (state.failed) return;

		}

	}
	// $ANTLR end synpred16_HiveParser

	// $ANTLR start synpred17_HiveParser
	public final void synpred17_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:117: ( storedAsDirs )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:1955:118: storedAsDirs
		{
		pushFollow(FOLLOW_storedAsDirs_in_synpred17_HiveParser11577);
		storedAsDirs();
		state._fsp--;
		if (state.failed) return;

		}

	}
	// $ANTLR end synpred17_HiveParser

	// $ANTLR start synpred18_HiveParser
	public final void synpred18_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2086:7: ( KW_STORED KW_AS KW_INPUTFORMAT )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2086:8: KW_STORED KW_AS KW_INPUTFORMAT
		{
		match(input,KW_STORED,FOLLOW_KW_STORED_in_synpred18_HiveParser12558); if (state.failed) return;

		match(input,KW_AS,FOLLOW_KW_AS_in_synpred18_HiveParser12560); if (state.failed) return;

		match(input,KW_INPUTFORMAT,FOLLOW_KW_INPUTFORMAT_in_synpred18_HiveParser12562); if (state.failed) return;

		}

	}
	// $ANTLR end synpred18_HiveParser

	// $ANTLR start synpred19_HiveParser
	public final void synpred19_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:25: ( KW_ELEM_TYPE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:26: KW_ELEM_TYPE
		{
		match(input,KW_ELEM_TYPE,FOLLOW_KW_ELEM_TYPE_in_synpred19_HiveParser12999); if (state.failed) return;

		}

	}
	// $ANTLR end synpred19_HiveParser

	// $ANTLR start synpred20_HiveParser
	public final void synpred20_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:58: ( KW_KEY_TYPE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:59: KW_KEY_TYPE
		{
		match(input,KW_KEY_TYPE,FOLLOW_KW_KEY_TYPE_in_synpred20_HiveParser13009); if (state.failed) return;

		}

	}
	// $ANTLR end synpred20_HiveParser

	// $ANTLR start synpred21_HiveParser
	public final void synpred21_HiveParser_fragment() throws RecognitionException {
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:89: ( KW_VALUE_TYPE )
		// org/apache/hadoop/hive/ql/parse/HiveParser.g:2136:90: KW_VALUE_TYPE
		{
		match(input,KW_VALUE_TYPE,FOLLOW_KW_VALUE_TYPE_in_synpred21_HiveParser13019); if (state.failed) return;

		}

	}
	// $ANTLR end synpred21_HiveParser

	// Delegated rules
	public HiveParser_IdentifiersParser.intervalQualifiers_return intervalQualifiers() throws RecognitionException { return gIdentifiersParser.intervalQualifiers(); }

	public HiveParser_IdentifiersParser.nonReserved_return nonReserved() throws RecognitionException { return gIdentifiersParser.nonReserved(); }

	public HiveParser_IdentifiersParser.precedenceEqualOperator_return precedenceEqualOperator() throws RecognitionException { return gIdentifiersParser.precedenceEqualOperator(); }

	public HiveParser_FromClauseParser.atomjoinSource_return atomjoinSource() throws RecognitionException { return gFromClauseParser.atomjoinSource(); }

	public HiveParser_IdentifiersParser.expressions_return expressions() throws RecognitionException { return gIdentifiersParser.expressions(); }

	public HiveParser_FromClauseParser.partitioningSpec_return partitioningSpec() throws RecognitionException { return gFromClauseParser.partitioningSpec(); }

	public HiveParser_FromClauseParser.valuesTableConstructor_return valuesTableConstructor() throws RecognitionException { return gFromClauseParser.valuesTableConstructor(); }

	public HiveParser_IdentifiersParser.expression_return expression() throws RecognitionException { return gIdentifiersParser.expression(); }

	public HiveParser_SelectClauseParser.trfmClause_return trfmClause() throws RecognitionException { return gSelectClauseParser.trfmClause(); }

	public HiveParser_FromClauseParser.tableAlias_return tableAlias() throws RecognitionException { return gFromClauseParser.tableAlias(); }

	public HiveParser_FromClauseParser.joinSource_return joinSource() throws RecognitionException { return gFromClauseParser.joinSource(); }

	public HiveParser_IdentifiersParser.castExpression_return castExpression() throws RecognitionException { return gIdentifiersParser.castExpression(); }

	public HiveParser_SelectClauseParser.window_specification_return window_specification() throws RecognitionException { return gSelectClauseParser.window_specification(); }

	public HiveParser_IdentifiersParser.sysFuncNames_return sysFuncNames() throws RecognitionException { return gIdentifiersParser.sysFuncNames(); }

	public HiveParser_IdentifiersParser.precedenceStarExpression_return precedenceStarExpression() throws RecognitionException { return gIdentifiersParser.precedenceStarExpression(); }

	public HiveParser_FromClauseParser.partitionTableFunctionSource_return partitionTableFunctionSource() throws RecognitionException { return gFromClauseParser.partitionTableFunctionSource(); }

	public HiveParser_IdentifiersParser.distributeByClause_return distributeByClause() throws RecognitionException { return gIdentifiersParser.distributeByClause(); }

	public HiveParser_FromClauseParser.splitSample_return splitSample() throws RecognitionException { return gFromClauseParser.splitSample(); }

	public HiveParser_SelectClauseParser.window_clause_return window_clause() throws RecognitionException { return gSelectClauseParser.window_clause(); }

	public HiveParser_IdentifiersParser.precedenceSimilarExpressionMain_return precedenceSimilarExpressionMain() throws RecognitionException { return gIdentifiersParser.precedenceSimilarExpressionMain(); }

	public HiveParser_FromClauseParser.subQuerySource_return subQuerySource() throws RecognitionException { return gFromClauseParser.subQuerySource(); }

	public HiveParser_FromClauseParser.tableSample_return tableSample() throws RecognitionException { return gFromClauseParser.tableSample(); }

	public HiveParser_IdentifiersParser.precedenceConcatenateOperator_return precedenceConcatenateOperator() throws RecognitionException { return gIdentifiersParser.precedenceConcatenateOperator(); }

	public HiveParser_IdentifiersParser.expressionPart_return expressionPart(CommonTree t, boolean isStruct) throws RecognitionException { return gIdentifiersParser.expressionPart(t, isStruct); }

	public HiveParser_IdentifiersParser.precedenceBitwiseXorExpression_return precedenceBitwiseXorExpression() throws RecognitionException { return gIdentifiersParser.precedenceBitwiseXorExpression(); }

	public HiveParser_IdentifiersParser.precedenceAndExpression_return precedenceAndExpression() throws RecognitionException { return gIdentifiersParser.precedenceAndExpression(); }

	public HiveParser_IdentifiersParser.precedenceEqualExpression_return precedenceEqualExpression() throws RecognitionException { return gIdentifiersParser.precedenceEqualExpression(); }

	public HiveParser_FromClauseParser.tableSource_return tableSource() throws RecognitionException { return gFromClauseParser.tableSource(); }

	public HiveParser_IdentifiersParser.constant_return constant() throws RecognitionException { return gIdentifiersParser.constant(); }

	public HiveParser_FromClauseParser.uniqueJoinSource_return uniqueJoinSource() throws RecognitionException { return gFromClauseParser.uniqueJoinSource(); }

	public HiveParser_SelectClauseParser.selectTrfmClause_return selectTrfmClause() throws RecognitionException { return gSelectClauseParser.selectTrfmClause(); }

	public HiveParser_SelectClauseParser.window_defn_return window_defn() throws RecognitionException { return gSelectClauseParser.window_defn(); }

	public HiveParser_SelectClauseParser.window_value_expression_return window_value_expression() throws RecognitionException { return gSelectClauseParser.window_value_expression(); }

	public HiveParser_IdentifiersParser.precedenceAmpersandExpression_return precedenceAmpersandExpression() throws RecognitionException { return gIdentifiersParser.precedenceAmpersandExpression(); }

	public HiveParser_IdentifiersParser.precedenceBitwiseOrOperator_return precedenceBitwiseOrOperator() throws RecognitionException { return gIdentifiersParser.precedenceBitwiseOrOperator(); }

	public HiveParser_IdentifiersParser.precedenceSimilarExpressionPart_return precedenceSimilarExpressionPart(CommonTree t) throws RecognitionException { return gIdentifiersParser.precedenceSimilarExpressionPart(t); }

	public HiveParser_IdentifiersParser.sql11ReservedKeywordsUsedAsFunctionName_return sql11ReservedKeywordsUsedAsFunctionName() throws RecognitionException { return gIdentifiersParser.sql11ReservedKeywordsUsedAsFunctionName(); }

	public HiveParser_IdentifiersParser.nullCondition_return nullCondition() throws RecognitionException { return gIdentifiersParser.nullCondition(); }

	public HiveParser_IdentifiersParser.precedenceSimilarExpressionIn_return precedenceSimilarExpressionIn(CommonTree t) throws RecognitionException { return gIdentifiersParser.precedenceSimilarExpressionIn(t); }

	public HiveParser_FromClauseParser.tableNameColList_return tableNameColList() throws RecognitionException { return gFromClauseParser.tableNameColList(); }

	public HiveParser_IdentifiersParser.groupingSetExpression_return groupingSetExpression() throws RecognitionException { return gIdentifiersParser.groupingSetExpression(); }

	public HiveParser_FromClauseParser.whereClause_return whereClause() throws RecognitionException { return gFromClauseParser.whereClause(); }

	public HiveParser_FromClauseParser.uniqueJoinExpr_return uniqueJoinExpr() throws RecognitionException { return gFromClauseParser.uniqueJoinExpr(); }

	public HiveParser_IdentifiersParser.precedenceRegexpOperator_return precedenceRegexpOperator() throws RecognitionException { return gIdentifiersParser.precedenceRegexpOperator(); }

	public HiveParser_IdentifiersParser.expressionsNotInParenthesis_return expressionsNotInParenthesis(boolean isStruct) throws RecognitionException { return gIdentifiersParser.expressionsNotInParenthesis(isStruct); }

	public HiveParser_IdentifiersParser.columnRefOrderInParenthesis_return columnRefOrderInParenthesis() throws RecognitionException { return gIdentifiersParser.columnRefOrderInParenthesis(); }

	public HiveParser_FromClauseParser.tableAllColumns_return tableAllColumns() throws RecognitionException { return gFromClauseParser.tableAllColumns(); }

	public HiveParser_IdentifiersParser.precedenceUnarySuffixExpression_return precedenceUnarySuffixExpression() throws RecognitionException { return gIdentifiersParser.precedenceUnarySuffixExpression(); }

	public HiveParser_FromClauseParser.uniqueJoinToken_return uniqueJoinToken() throws RecognitionException { return gFromClauseParser.uniqueJoinToken(); }

	public HiveParser_FromClauseParser.lateralView_return lateralView() throws RecognitionException { return gFromClauseParser.lateralView(); }

	public HiveParser_SelectClauseParser.window_range_expression_return window_range_expression() throws RecognitionException { return gSelectClauseParser.window_range_expression(); }

	public HiveParser_IdentifiersParser.dateLiteral_return dateLiteral() throws RecognitionException { return gIdentifiersParser.dateLiteral(); }

	public HiveParser_IdentifiersParser.havingClause_return havingClause() throws RecognitionException { return gIdentifiersParser.havingClause(); }

	public HiveParser_IdentifiersParser.timeQualifiers_return timeQualifiers() throws RecognitionException { return gIdentifiersParser.timeQualifiers(); }

	public HiveParser_FromClauseParser.aliasList_return aliasList() throws RecognitionException { return gFromClauseParser.aliasList(); }

	public HiveParser_IdentifiersParser.expressionsInParenthesis_return expressionsInParenthesis(boolean isStruct) throws RecognitionException { return gIdentifiersParser.expressionsInParenthesis(isStruct); }

	public HiveParser_IdentifiersParser.booleanValueTok_return booleanValueTok() throws RecognitionException { return gIdentifiersParser.booleanValueTok(); }

	public HiveParser_IdentifiersParser.extractExpression_return extractExpression() throws RecognitionException { return gIdentifiersParser.extractExpression(); }

	public HiveParser_IdentifiersParser.groupby_expression_return groupby_expression() throws RecognitionException { return gIdentifiersParser.groupby_expression(); }

	public HiveParser_IdentifiersParser.groupingExpressionSingle_return groupingExpressionSingle() throws RecognitionException { return gIdentifiersParser.groupingExpressionSingle(); }

	public HiveParser_IdentifiersParser.floorDateQualifiers_return floorDateQualifiers() throws RecognitionException { return gIdentifiersParser.floorDateQualifiers(); }

	public HiveParser_IdentifiersParser.atomExpression_return atomExpression() throws RecognitionException { return gIdentifiersParser.atomExpression(); }

	public HiveParser_IdentifiersParser.precedenceSimilarExpressionAtom_return precedenceSimilarExpressionAtom(CommonTree t) throws RecognitionException { return gIdentifiersParser.precedenceSimilarExpressionAtom(t); }

	public HiveParser_IdentifiersParser.partitionVal_return partitionVal() throws RecognitionException { return gIdentifiersParser.partitionVal(); }

	public HiveParser_FromClauseParser.partitionedTableFunction_return partitionedTableFunction() throws RecognitionException { return gFromClauseParser.partitionedTableFunction(); }

	public HiveParser_FromClauseParser.tableName_return tableName() throws RecognitionException { return gFromClauseParser.tableName(); }

	public HiveParser_IdentifiersParser.precedenceNotExpression_return precedenceNotExpression() throws RecognitionException { return gIdentifiersParser.precedenceNotExpression(); }

	public HiveParser_FromClauseParser.valueRowConstructor_return valueRowConstructor() throws RecognitionException { return gFromClauseParser.valueRowConstructor(); }

	public HiveParser_IdentifiersParser.groupByEmpty_return groupByEmpty() throws RecognitionException { return gIdentifiersParser.groupByEmpty(); }

	public HiveParser_FromClauseParser.valuesClause_return valuesClause() throws RecognitionException { return gFromClauseParser.valuesClause(); }

	public HiveParser_IdentifiersParser.stringLiteralSequence_return stringLiteralSequence() throws RecognitionException { return gIdentifiersParser.stringLiteralSequence(); }

	public HiveParser_IdentifiersParser.precedenceBitwiseXorOperator_return precedenceBitwiseXorOperator() throws RecognitionException { return gIdentifiersParser.precedenceBitwiseXorOperator(); }

	public HiveParser_FromClauseParser.tableBucketSample_return tableBucketSample() throws RecognitionException { return gFromClauseParser.tableBucketSample(); }

	public HiveParser_IdentifiersParser.charSetStringLiteral_return charSetStringLiteral() throws RecognitionException { return gIdentifiersParser.charSetStringLiteral(); }

	public HiveParser_IdentifiersParser.subQueryExpression_return subQueryExpression() throws RecognitionException { return gIdentifiersParser.subQueryExpression(); }

	public HiveParser_IdentifiersParser.precedenceStarOperator_return precedenceStarOperator() throws RecognitionException { return gIdentifiersParser.precedenceStarOperator(); }

	public HiveParser_SelectClauseParser.selectClause_return selectClause() throws RecognitionException { return gSelectClauseParser.selectClause(); }

	public HiveParser_IdentifiersParser.precedencePlusExpression_return precedencePlusExpression() throws RecognitionException { return gIdentifiersParser.precedencePlusExpression(); }

	public HiveParser_SelectClauseParser.selectExpression_return selectExpression() throws RecognitionException { return gSelectClauseParser.selectExpression(); }

	public HiveParser_IdentifiersParser.precedenceAmpersandOperator_return precedenceAmpersandOperator() throws RecognitionException { return gIdentifiersParser.precedenceAmpersandOperator(); }

	public HiveParser_IdentifiersParser.sortByClause_return sortByClause() throws RecognitionException { return gIdentifiersParser.sortByClause(); }

	public HiveParser_IdentifiersParser.identifier_return identifier() throws RecognitionException { return gIdentifiersParser.identifier(); }

	public HiveParser_FromClauseParser.joinSourcePart_return joinSourcePart() throws RecognitionException { return gFromClauseParser.joinSourcePart(); }

	public HiveParser_IdentifiersParser.partitionSpec_return partitionSpec() throws RecognitionException { return gIdentifiersParser.partitionSpec(); }

	public HiveParser_IdentifiersParser.precedenceBitwiseOrExpression_return precedenceBitwiseOrExpression() throws RecognitionException { return gIdentifiersParser.precedenceBitwiseOrExpression(); }

	public HiveParser_IdentifiersParser.functionIdentifier_return functionIdentifier() throws RecognitionException { return gIdentifiersParser.functionIdentifier(); }

	public HiveParser_IdentifiersParser.intervalValue_return intervalValue() throws RecognitionException { return gIdentifiersParser.intervalValue(); }

	public HiveParser_IdentifiersParser.precedenceConcatenateExpression_return precedenceConcatenateExpression() throws RecognitionException { return gIdentifiersParser.precedenceConcatenateExpression(); }

	public HiveParser_IdentifiersParser.floorExpression_return floorExpression() throws RecognitionException { return gIdentifiersParser.floorExpression(); }

	public HiveParser_FromClauseParser.searchCondition_return searchCondition() throws RecognitionException { return gFromClauseParser.searchCondition(); }

	public HiveParser_SelectClauseParser.window_frame_return window_frame() throws RecognitionException { return gSelectClauseParser.window_frame(); }

	public HiveParser_IdentifiersParser.clusterByClause_return clusterByClause() throws RecognitionException { return gIdentifiersParser.clusterByClause(); }

	public HiveParser_FromClauseParser.tableOrColumn_return tableOrColumn() throws RecognitionException { return gFromClauseParser.tableOrColumn(); }

	public HiveParser_IdentifiersParser.precedenceSimilarOperator_return precedenceSimilarOperator() throws RecognitionException { return gIdentifiersParser.precedenceSimilarOperator(); }

	public HiveParser_IdentifiersParser.precedenceFieldExpression_return precedenceFieldExpression() throws RecognitionException { return gIdentifiersParser.precedenceFieldExpression(); }

	public HiveParser_SelectClauseParser.window_frame_start_boundary_return window_frame_start_boundary() throws RecognitionException { return gSelectClauseParser.window_frame_start_boundary(); }

	public HiveParser_SelectClauseParser.selectList_return selectList() throws RecognitionException { return gSelectClauseParser.selectList(); }

	public HiveParser_IdentifiersParser.partitionByClause_return partitionByClause() throws RecognitionException { return gIdentifiersParser.partitionByClause(); }

	public HiveParser_IdentifiersParser.precedencePlusOperator_return precedencePlusOperator() throws RecognitionException { return gIdentifiersParser.precedencePlusOperator(); }

	public HiveParser_IdentifiersParser.intervalExpression_return intervalExpression() throws RecognitionException { return gIdentifiersParser.intervalExpression(); }

	public HiveParser_IdentifiersParser.precedenceAndOperator_return precedenceAndOperator() throws RecognitionException { return gIdentifiersParser.precedenceAndOperator(); }

	public HiveParser_SelectClauseParser.window_frame_boundary_return window_frame_boundary() throws RecognitionException { return gSelectClauseParser.window_frame_boundary(); }

	public HiveParser_IdentifiersParser.orderByClause_return orderByClause() throws RecognitionException { return gIdentifiersParser.orderByClause(); }

	public HiveParser_IdentifiersParser.precedenceSimilarExpression_return precedenceSimilarExpression() throws RecognitionException { return gIdentifiersParser.precedenceSimilarExpression(); }

	public HiveParser_IdentifiersParser.columnRefOrderNotInParenthesis_return columnRefOrderNotInParenthesis() throws RecognitionException { return gIdentifiersParser.columnRefOrderNotInParenthesis(); }

	public HiveParser_IdentifiersParser.tableOrPartition_return tableOrPartition() throws RecognitionException { return gIdentifiersParser.tableOrPartition(); }

	public HiveParser_IdentifiersParser.timestampLiteral_return timestampLiteral() throws RecognitionException { return gIdentifiersParser.timestampLiteral(); }

	public HiveParser_IdentifiersParser.dropPartitionVal_return dropPartitionVal() throws RecognitionException { return gIdentifiersParser.dropPartitionVal(); }

	public HiveParser_IdentifiersParser.groupingSetExpressionMultiple_return groupingSetExpressionMultiple() throws RecognitionException { return gIdentifiersParser.groupingSetExpressionMultiple(); }

	public HiveParser_IdentifiersParser.precedenceNotOperator_return precedenceNotOperator() throws RecognitionException { return gIdentifiersParser.precedenceNotOperator(); }

	public HiveParser_SelectClauseParser.selectExpressionList_return selectExpressionList() throws RecognitionException { return gSelectClauseParser.selectExpressionList(); }

	public HiveParser_FromClauseParser.expressionList_return expressionList() throws RecognitionException { return gFromClauseParser.expressionList(); }

	public HiveParser_IdentifiersParser.dropPartitionSpec_return dropPartitionSpec() throws RecognitionException { return gIdentifiersParser.dropPartitionSpec(); }

	public HiveParser_IdentifiersParser.function_return function() throws RecognitionException { return gIdentifiersParser.function(); }

	public HiveParser_IdentifiersParser.principalIdentifier_return principalIdentifier() throws RecognitionException { return gIdentifiersParser.principalIdentifier(); }

	public HiveParser_FromClauseParser.viewName_return viewName() throws RecognitionException { return gFromClauseParser.viewName(); }

	public HiveParser_IdentifiersParser.precedenceOrOperator_return precedenceOrOperator() throws RecognitionException { return gIdentifiersParser.precedenceOrOperator(); }

	public HiveParser_IdentifiersParser.groupByClause_return groupByClause() throws RecognitionException { return gIdentifiersParser.groupByClause(); }

	public HiveParser_IdentifiersParser.dropPartitionOperator_return dropPartitionOperator() throws RecognitionException { return gIdentifiersParser.dropPartitionOperator(); }

	public HiveParser_FromClauseParser.fromClause_return fromClause() throws RecognitionException { return gFromClauseParser.fromClause(); }

	public HiveParser_FromClauseParser.uniqueJoinTableSource_return uniqueJoinTableSource() throws RecognitionException { return gFromClauseParser.uniqueJoinTableSource(); }

	public HiveParser_IdentifiersParser.rollupStandard_return rollupStandard() throws RecognitionException { return gIdentifiersParser.rollupStandard(); }

	public HiveParser_FromClauseParser.virtualTableSource_return virtualTableSource() throws RecognitionException { return gFromClauseParser.virtualTableSource(); }

	public HiveParser_IdentifiersParser.rollupOldSyntax_return rollupOldSyntax() throws RecognitionException { return gIdentifiersParser.rollupOldSyntax(); }

	public HiveParser_IdentifiersParser.precedenceSimilarExpressionPartNot_return precedenceSimilarExpressionPartNot(CommonTree t) throws RecognitionException { return gIdentifiersParser.precedenceSimilarExpressionPartNot(t); }

	public HiveParser_IdentifiersParser.booleanValue_return booleanValue() throws RecognitionException { return gIdentifiersParser.booleanValue(); }

	public HiveParser_IdentifiersParser.caseExpression_return caseExpression() throws RecognitionException { return gIdentifiersParser.caseExpression(); }

	public HiveParser_IdentifiersParser.functionName_return functionName() throws RecognitionException { return gIdentifiersParser.functionName(); }

	public HiveParser_IdentifiersParser.precedenceUnaryPrefixExpression_return precedenceUnaryPrefixExpression() throws RecognitionException { return gIdentifiersParser.precedenceUnaryPrefixExpression(); }

	public HiveParser_FromClauseParser.fromSource_return fromSource() throws RecognitionException { return gFromClauseParser.fromSource(); }

	public HiveParser_IdentifiersParser.precedenceOrExpression_return precedenceOrExpression() throws RecognitionException { return gIdentifiersParser.precedenceOrExpression(); }

	public HiveParser_IdentifiersParser.havingCondition_return havingCondition() throws RecognitionException { return gIdentifiersParser.havingCondition(); }

	public HiveParser_IdentifiersParser.precedenceUnaryOperator_return precedenceUnaryOperator() throws RecognitionException { return gIdentifiersParser.precedenceUnaryOperator(); }

	public HiveParser_IdentifiersParser.intervalLiteral_return intervalLiteral() throws RecognitionException { return gIdentifiersParser.intervalLiteral(); }

	public HiveParser_IdentifiersParser.descFuncNames_return descFuncNames() throws RecognitionException { return gIdentifiersParser.descFuncNames(); }

	public HiveParser_IdentifiersParser.whenExpression_return whenExpression() throws RecognitionException { return gIdentifiersParser.whenExpression(); }

	public HiveParser_FromClauseParser.joinToken_return joinToken() throws RecognitionException { return gFromClauseParser.joinToken(); }

	public HiveParser_SelectClauseParser.selectItem_return selectItem() throws RecognitionException { return gSelectClauseParser.selectItem(); }

	public final boolean synpred18_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred18_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred21_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred21_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred7_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred7_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred11_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred11_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred15_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred15_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred13_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred13_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred10_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred10_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred8_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred8_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred4_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred4_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred2_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred2_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred6_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred6_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred19_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred19_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred14_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred14_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred17_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred17_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred20_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred20_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred12_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred12_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred3_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred3_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred9_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred9_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred16_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred16_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred5_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred5_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}
	public final boolean synpred1_HiveParser() {
		state.backtracking++;
		int start = input.mark();
		try {
			synpred1_HiveParser_fragment(); // can never throw exception
		} catch (RecognitionException re) {
			System.err.println("impossible: "+re);
		}
		boolean success = !state.failed;
		input.rewind(start);
		state.backtracking--;
		state.failed=false;
		return success;
	}


	protected DFA2 dfa2 = new DFA2(this);
	protected DFA23 dfa23 = new DFA23(this);
	protected DFA226 dfa226 = new DFA226(this);
	static final String DFA2_eotS =
		"\122\uffff";
	static final String DFA2_eofS =
		"\122\uffff";
	static final String DFA2_minS =
		"\1\32\25\uffff\1\32\73\uffff";
	static final String DFA2_maxS =
		"\1\u014e\25\uffff\1\u014e\73\uffff";
	static final String DFA2_acceptS =
		"\1\uffff\1\2\41\uffff\1\1\56\uffff";
	static final String DFA2_specialS =
		"\122\uffff}>";
	static final String[] DFA2_transitionS = {
			"\1\1\4\uffff\1\1\1\26\5\uffff\1\43\27\uffff\1\1\7\uffff\1\1\20\uffff"+
			"\1\1\1\uffff\1\43\2\1\10\uffff\1\1\13\uffff\1\1\1\uffff\1\43\16\uffff"+
			"\1\43\1\1\3\uffff\1\1\6\uffff\1\1\7\uffff\1\1\24\uffff\1\1\2\uffff\1"+
			"\1\1\uffff\1\43\2\uffff\1\1\3\uffff\1\1\5\uffff\1\1\53\uffff\1\1\2\uffff"+
			"\1\1\3\uffff\1\1\3\uffff\1\1\5\uffff\1\1\6\uffff\1\1\4\uffff\1\1\2\uffff"+
			"\1\1\7\uffff\1\1\27\uffff\1\1\6\uffff\1\1\2\uffff\1\1\1\uffff\1\1\10"+
			"\uffff\1\43\10\uffff\1\1\7\uffff\1\1",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"\1\43\4\uffff\2\43\5\uffff\1\43\27\uffff\1\43\7\uffff\1\43\20\uffff"+
			"\1\43\1\uffff\3\43\10\uffff\1\43\13\uffff\1\43\1\uffff\1\43\16\uffff"+
			"\2\43\3\uffff\1\43\6\uffff\1\43\7\uffff\1\43\24\uffff\1\43\2\uffff\1"+
			"\43\1\uffff\1\43\2\uffff\1\43\3\uffff\1\43\5\uffff\1\43\53\uffff\1\43"+
			"\2\uffff\1\43\3\uffff\1\43\3\uffff\1\43\5\uffff\1\43\6\uffff\1\43\4\uffff"+
			"\1\43\2\uffff\1\43\7\uffff\1\43\7\uffff\1\1\17\uffff\1\43\6\uffff\1\43"+
			"\2\uffff\1\43\1\uffff\1\43\10\uffff\1\43\10\uffff\1\43\7\uffff\1\43",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			""
	};

	static final short[] DFA2_eot = DFA.unpackEncodedString(DFA2_eotS);
	static final short[] DFA2_eof = DFA.unpackEncodedString(DFA2_eofS);
	static final char[] DFA2_min = DFA.unpackEncodedStringToUnsignedChars(DFA2_minS);
	static final char[] DFA2_max = DFA.unpackEncodedStringToUnsignedChars(DFA2_maxS);
	static final short[] DFA2_accept = DFA.unpackEncodedString(DFA2_acceptS);
	static final short[] DFA2_special = DFA.unpackEncodedString(DFA2_specialS);
	static final short[][] DFA2_transition;

	static {
		int numStates = DFA2_transitionS.length;
		DFA2_transition = new short[numStates][];
		for (int i=0; i";
	static final String[] DFA23_transitionS = {
			"\1\21\4\uffff\1\5\1\13\45\uffff\1\1\23\uffff\2\6\10\uffff\1\3\41\uffff"+
			"\1\16\46\uffff\1\14\16\uffff\1\11\56\uffff\1\12\7\uffff\1\17\21\uffff"+
			"\1\20\2\uffff\1\10\37\uffff\1\4\6\uffff\1\15\4\uffff\1\2",
			"\1\26\44\uffff\1\30\20\uffff\1\34\12\uffff\1\24\45\uffff\1\22\24\uffff"+
			"\1\32\54\uffff\1\25\5\uffff\1\26\32\uffff\1\30\3\uffff\1\23\41\uffff"+
			"\1\32",
			"",
			"\1\43\65\uffff\1\45\12\uffff\1\40\45\uffff\1\37\101\uffff\1\42\5\uffff"+
			"\1\43\32\uffff\1\35\3\uffff\1\41\41\uffff\1\36",
			"",
			"",
			"",
			"",
			"\1\46\3\uffff\1\46\2\uffff\1\46\2\uffff\1\46\2\uffff\1\66\5\uffff\1"+
			"\46\61\uffff\1\46\3\uffff\1\46\1\62\10\uffff\2\46\35\uffff\1\46\47\uffff"+
			"\1\46\7\uffff\1\64\30\uffff\1\63\1\65\5\uffff\1\46\31\uffff\2\46\1\uffff"+
			"\1\46\10\uffff\1\46\32\uffff\1\46",
			"",
			"",
			"",
			"\1\75\u00ae\uffff\1\75\32\uffff\1\74",
			"\1\100\u00ae\uffff\1\100\32\uffff\1\77",
			"\1\115\1\uffff\4\115\1\102\1\103\1\115\1\uffff\1\115\2\uffff\1\115\1"+
			"\uffff\2\115\5\uffff\2\115\1\uffff\2\115\2\uffff\1\115\1\uffff\4\115"+
			"\1\uffff\2\115\1\uffff\4\115\2\uffff\1\115\1\105\6\uffff\1\115\1\uffff"+
			"\1\115\1\uffff\3\115\1\uffff\2\115\1\114\3\115\1\uffff\4\115\1\uffff"+
			"\1\115\1\uffff\1\115\1\106\2\115\1\uffff\1\115\1\uffff\1\115\2\uffff"+
			"\1\115\1\uffff\3\115\5\uffff\4\115\5\uffff\2\115\3\uffff\1\115\4\uffff"+
			"\2\115\3\uffff\1\107\1\115\1\uffff\3\115\1\113\5\uffff\3\115\1\uffff"+
			"\4\115\3\uffff\1\115\1\uffff\3\115\1\uffff\1\115\1\110\3\115\2\uffff"+
			"\3\115\1\uffff\1\115\1\uffff\2\115\1\uffff\1\115\1\uffff\2\115\1\uffff"+
			"\1\115\1\uffff\1\115\1\uffff\1\115\2\uffff\2\115\4\uffff\2\115\1\uffff"+
			"\2\115\2\uffff\2\115\1\uffff\1\115\3\uffff\1\115\1\uffff\1\115\1\uffff"+
			"\2\115\1\uffff\1\115\1\uffff\3\115\3\uffff\10\115\1\uffff\1\115\2\uffff"+
			"\2\115\4\uffff\3\115\1\111\4\115\1\uffff\3\115\1\112\1\115\1\uffff\4"+
			"\115\1\uffff\7\115\1\uffff\1\115\1\uffff\3\115\2\uffff\1\115\1\uffff"+
			"\3\115\4\uffff\1\115\1\uffff\1\115\1\uffff\1\115\1\uffff\3\115\1\104"+
			"\2\115\2\uffff\3\115\1\uffff\1\115\1\uffff\5\115\2\uffff\1\115\2\uffff"+
			"\3\115\66\uffff\1\115\42\uffff\1\115\52\uffff\1\115\3\uffff\1\115\52"+
			"\uffff\1\115\3\uffff\1\115\26\uffff\1\115\4\uffff\1\115",
			"\1\134\1\uffff\4\134\1\121\1\122\1\134\1\uffff\1\134\2\uffff\1\134\1"+
			"\uffff\2\134\5\uffff\2\134\1\uffff\2\134\2\uffff\1\134\1\uffff\4\134"+
			"\1\uffff\2\134\1\uffff\4\134\2\uffff\1\134\1\124\6\uffff\1\134\1\uffff"+
			"\1\134\1\uffff\3\134\1\uffff\2\134\1\133\3\134\1\uffff\4\134\1\uffff"+
			"\1\134\1\uffff\1\134\1\125\2\134\1\uffff\1\134\1\uffff\1\134\2\uffff"+
			"\1\134\1\uffff\3\134\5\uffff\4\134\5\uffff\2\134\3\uffff\1\134\1\120"+
			"\3\uffff\2\134\3\uffff\1\126\1\134\1\uffff\3\134\1\132\5\uffff\3\134"+
			"\1\uffff\4\134\3\uffff\1\134\1\uffff\3\134\1\uffff\1\134\1\127\3\134"+
			"\2\uffff\3\134\1\uffff\1\134\1\uffff\2\134\1\uffff\1\134\1\uffff\2\134"+
			"\1\uffff\1\134\1\uffff\1\134\1\uffff\1\134\2\uffff\2\134\4\uffff\2\134"+
			"\1\uffff\2\134\2\uffff\2\134\1\uffff\1\134\3\uffff\1\134\1\uffff\1\134"+
			"\1\uffff\2\134\1\uffff\1\134\1\uffff\3\134\3\uffff\10\134\1\uffff\1\134"+
			"\2\uffff\2\134\4\uffff\3\134\1\130\4\134\1\uffff\3\134\1\131\1\134\1"+
			"\uffff\4\134\1\uffff\7\134\1\uffff\1\134\1\uffff\3\134\2\uffff\1\134"+
			"\1\uffff\3\134\4\uffff\1\134\1\uffff\1\134\1\uffff\1\134\1\uffff\3\134"+
			"\1\123\2\134\2\uffff\3\134\1\uffff\1\134\1\uffff\5\134\2\uffff\1\134"+
			"\2\uffff\3\134\66\uffff\1\134\42\uffff\1\134\52\uffff\1\134\3\uffff\1"+
			"\134\52\uffff\1\134\3\uffff\1\134\26\uffff\1\134\4\uffff\1\134",
			"",
			"",
			"",
			"\1\30\20\uffff\1\34\54\uffff\1\140\146\uffff\1\30",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"\1\45\54\uffff\1\144",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"\1\147\u00bc\uffff\1\150\132\uffff\1\151\54\uffff\1\146",
			"\1\153\u00bc\uffff\1\154\132\uffff\1\155\54\uffff\1\152",
			"",
			"\1\157\u00bc\uffff\1\160\132\uffff\1\161\54\uffff\1\156",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"\1\163\170\uffff\1\165\103\uffff\1\164\u0087\uffff\1\162",
			"\1\167\170\uffff\1\171\103\uffff\1\170\u0087\uffff\1\166",
			"",
			"\1\173\170\uffff\1\175\103\uffff\1\174\u0087\uffff\1\172",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff",
			"",
			"\1\uffff"
	};

	static final short[] DFA23_eot = DFA.unpackEncodedString(DFA23_eotS);
	static final short[] DFA23_eof = DFA.unpackEncodedString(DFA23_eofS);
	static final char[] DFA23_min = DFA.unpackEncodedStringToUnsignedChars(DFA23_minS);
	static final char[] DFA23_max = DFA.unpackEncodedStringToUnsignedChars(DFA23_maxS);
	static final short[] DFA23_accept = DFA.unpackEncodedString(DFA23_acceptS);
	static final short[] DFA23_special = DFA.unpackEncodedString(DFA23_specialS);
	static final short[][] DFA23_transition;

	static {
		int numStates = DFA23_transitionS.length;
		DFA23_transition = new short[numStates][];
		for (int i=0; i grantPrivileges | ( revokePrivileges )=> revokePrivileges | showGrants | showRoleGrants | showRolePrincipals | showRoles | grantRole | revokeRole | setRole | showCurrentRole | abortTransactionStatement );";
		}
		@Override
		public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
			TokenStream input = (TokenStream)_input;
			int _s = s;
			switch ( s ) {
					case 0 : 
						int LA23_14 = input.LA(1);
						 
						int index23_14 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_14==KW_ALL) && (synpred1_HiveParser())) {s = 66;}
						else if ( (LA23_14==KW_ALTER) && (synpred1_HiveParser())) {s = 67;}
						else if ( (LA23_14==KW_UPDATE) && (synpred1_HiveParser())) {s = 68;}
						else if ( (LA23_14==KW_CREATE) && (synpred1_HiveParser())) {s = 69;}
						else if ( (LA23_14==KW_DROP) && (synpred1_HiveParser())) {s = 70;}
						else if ( (LA23_14==KW_INDEX) ) {s = 71;}
						else if ( (LA23_14==KW_LOCK) ) {s = 72;}
						else if ( (LA23_14==KW_SELECT) && (synpred1_HiveParser())) {s = 73;}
						else if ( (LA23_14==KW_SHOW_DATABASE) ) {s = 74;}
						else if ( (LA23_14==KW_INSERT) && (synpred1_HiveParser())) {s = 75;}
						else if ( (LA23_14==KW_DELETE) && (synpred1_HiveParser())) {s = 76;}
						else if ( (LA23_14==Identifier||(LA23_14 >= KW_ABORT && LA23_14 <= KW_AFTER)||LA23_14==KW_ANALYZE||LA23_14==KW_ARCHIVE||LA23_14==KW_ASC||(LA23_14 >= KW_AUTOCOMMIT && LA23_14 <= KW_BEFORE)||(LA23_14 >= KW_BUCKET && LA23_14 <= KW_BUCKETS)||(LA23_14 >= KW_CACHE && LA23_14 <= KW_CASCADE)||LA23_14==KW_CHANGE||(LA23_14 >= KW_CLUSTER && LA23_14 <= KW_COLLECTION)||(LA23_14 >= KW_COLUMNS && LA23_14 <= KW_COMMENT)||(LA23_14 >= KW_COMPACT && LA23_14 <= KW_CONCATENATE)||LA23_14==KW_CONTINUE||LA23_14==KW_DATA||LA23_14==KW_DATABASES||(LA23_14 >= KW_DATETIME && LA23_14 <= KW_DBPROPERTIES)||(LA23_14 >= KW_DEFERRED && LA23_14 <= KW_DEFINED)||(LA23_14 >= KW_DELIMITED && LA23_14 <= KW_DESC)||(LA23_14 >= KW_DETAIL && LA23_14 <= KW_DISABLE)||LA23_14==KW_DISTRIBUTE||LA23_14==KW_DOW||(LA23_14 >= KW_DUMP && LA23_14 <= KW_ELEM_TYPE)||LA23_14==KW_ENABLE||LA23_14==KW_ESCAPED||LA23_14==KW_EXCLUSIVE||(LA23_14 >= KW_EXPLAIN && LA23_14 <= KW_EXPRESSION)||(LA23_14 >= KW_FIELDS && LA23_14 <= KW_FIRST)||(LA23_14 >= KW_FORMAT && LA23_14 <= KW_FORMATTED)||LA23_14==KW_FUNCTIONS||(LA23_14 >= KW_HOUR && LA23_14 <= KW_IDXPROPERTIES)||LA23_14==KW_INDEXES||(LA23_14 >= KW_INPATH && LA23_14 <= KW_INPUTFORMAT)||(LA23_14 >= KW_ISOLATION && LA23_14 <= KW_JAR)||(LA23_14 >= KW_KEY && LA23_14 <= KW_LAST)||LA23_14==KW_LEVEL||(LA23_14 >= KW_LIMIT && LA23_14 <= KW_LOAD)||LA23_14==KW_LOCATION||(LA23_14 >= KW_LOCKS && LA23_14 <= KW_LONG)||(LA23_14 >= KW_MAPJOIN && LA23_14 <= KW_MATERIALIZED)||LA23_14==KW_METADATA||(LA23_14 >= KW_MINUTE && LA23_14 <= KW_MONTH)||LA23_14==KW_MSCK||(LA23_14 >= KW_NORELY && LA23_14 <= KW_NOSCAN)||LA23_14==KW_NOVALIDATE||LA23_14==KW_NULLS||LA23_14==KW_OFFSET||(LA23_14 >= KW_OPERATOR && LA23_14 <= KW_OPTION)||(LA23_14 >= KW_OUTPUTDRIVER && LA23_14 <= KW_OUTPUTFORMAT)||(LA23_14 >= KW_OVERWRITE && LA23_14 <= KW_OWNER)||(LA23_14 >= KW_PARTITIONED && LA23_14 <= KW_PARTITIONS)||LA23_14==KW_PLUS||LA23_14==KW_PRETTY||LA23_14==KW_PRINCIPALS||(LA23_14 >= KW_PURGE && LA23_14 <= KW_QUARTER)||LA23_14==KW_READ||(LA23_14 >= KW_REBUILD && LA23_14 <= KW_RECORDWRITER)||(LA23_14 >= KW_RELOAD && LA23_14 <= KW_RESTRICT)||LA23_14==KW_REWRITE||(LA23_14 >= KW_ROLE && LA23_14 <= KW_ROLES)||(LA23_14 >= KW_SCHEMA && LA23_14 <= KW_SECOND)||(LA23_14 >= KW_SEMI && LA23_14 <= KW_SERVER)||(LA23_14 >= KW_SETS && LA23_14 <= KW_SHOW)||LA23_14==KW_SKEWED||(LA23_14 >= KW_SNAPSHOT && LA23_14 <= KW_SSL)||(LA23_14 >= KW_STATISTICS && LA23_14 <= KW_SUMMARY)||LA23_14==KW_TABLES||(LA23_14 >= KW_TBLPROPERTIES && LA23_14 <= KW_TERMINATED)||LA23_14==KW_TINYINT||(LA23_14 >= KW_TOUCH && LA23_14 <= KW_TRANSACTIONS)||LA23_14==KW_UNARCHIVE||LA23_14==KW_UNDO||LA23_14==KW_UNIONTYPE||(LA23_14 >= KW_UNLOCK && LA23_14 <= KW_UNSIGNED)||(LA23_14 >= KW_URI && LA23_14 <= KW_USE)||(LA23_14 >= KW_UTC && LA23_14 <= KW_VALIDATE)||LA23_14==KW_VALUE_TYPE||(LA23_14 >= KW_VECTORIZATION && LA23_14 <= KW_WEEK)||LA23_14==KW_WHILE||(LA23_14 >= KW_WORK && LA23_14 <= KW_YEAR)||LA23_14==KW_BATCH||LA23_14==KW_DAYOFWEEK||LA23_14==KW_HOLD_DDLTIME||LA23_14==KW_IGNORE||LA23_14==KW_NO_DROP||LA23_14==KW_OFFLINE||LA23_14==KW_PROTECTION||LA23_14==KW_READONLY) ) {s = 77;}
						 
						input.seek(index23_14);
						if ( s>=0 ) return s;
						break;

					case 1 : 
						int LA23_15 = input.LA(1);
						 
						int index23_15 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_15==KW_GRANT) && (synpred2_HiveParser())) {s = 80;}
						else if ( (LA23_15==KW_ALL) && (synpred2_HiveParser())) {s = 81;}
						else if ( (LA23_15==KW_ALTER) && (synpred2_HiveParser())) {s = 82;}
						else if ( (LA23_15==KW_UPDATE) && (synpred2_HiveParser())) {s = 83;}
						else if ( (LA23_15==KW_CREATE) && (synpred2_HiveParser())) {s = 84;}
						else if ( (LA23_15==KW_DROP) && (synpred2_HiveParser())) {s = 85;}
						else if ( (LA23_15==KW_INDEX) ) {s = 86;}
						else if ( (LA23_15==KW_LOCK) ) {s = 87;}
						else if ( (LA23_15==KW_SELECT) && (synpred2_HiveParser())) {s = 88;}
						else if ( (LA23_15==KW_SHOW_DATABASE) ) {s = 89;}
						else if ( (LA23_15==KW_INSERT) && (synpred2_HiveParser())) {s = 90;}
						else if ( (LA23_15==KW_DELETE) && (synpred2_HiveParser())) {s = 91;}
						else if ( (LA23_15==Identifier||(LA23_15 >= KW_ABORT && LA23_15 <= KW_AFTER)||LA23_15==KW_ANALYZE||LA23_15==KW_ARCHIVE||LA23_15==KW_ASC||(LA23_15 >= KW_AUTOCOMMIT && LA23_15 <= KW_BEFORE)||(LA23_15 >= KW_BUCKET && LA23_15 <= KW_BUCKETS)||(LA23_15 >= KW_CACHE && LA23_15 <= KW_CASCADE)||LA23_15==KW_CHANGE||(LA23_15 >= KW_CLUSTER && LA23_15 <= KW_COLLECTION)||(LA23_15 >= KW_COLUMNS && LA23_15 <= KW_COMMENT)||(LA23_15 >= KW_COMPACT && LA23_15 <= KW_CONCATENATE)||LA23_15==KW_CONTINUE||LA23_15==KW_DATA||LA23_15==KW_DATABASES||(LA23_15 >= KW_DATETIME && LA23_15 <= KW_DBPROPERTIES)||(LA23_15 >= KW_DEFERRED && LA23_15 <= KW_DEFINED)||(LA23_15 >= KW_DELIMITED && LA23_15 <= KW_DESC)||(LA23_15 >= KW_DETAIL && LA23_15 <= KW_DISABLE)||LA23_15==KW_DISTRIBUTE||LA23_15==KW_DOW||(LA23_15 >= KW_DUMP && LA23_15 <= KW_ELEM_TYPE)||LA23_15==KW_ENABLE||LA23_15==KW_ESCAPED||LA23_15==KW_EXCLUSIVE||(LA23_15 >= KW_EXPLAIN && LA23_15 <= KW_EXPRESSION)||(LA23_15 >= KW_FIELDS && LA23_15 <= KW_FIRST)||(LA23_15 >= KW_FORMAT && LA23_15 <= KW_FORMATTED)||LA23_15==KW_FUNCTIONS||(LA23_15 >= KW_HOUR && LA23_15 <= KW_IDXPROPERTIES)||LA23_15==KW_INDEXES||(LA23_15 >= KW_INPATH && LA23_15 <= KW_INPUTFORMAT)||(LA23_15 >= KW_ISOLATION && LA23_15 <= KW_JAR)||(LA23_15 >= KW_KEY && LA23_15 <= KW_LAST)||LA23_15==KW_LEVEL||(LA23_15 >= KW_LIMIT && LA23_15 <= KW_LOAD)||LA23_15==KW_LOCATION||(LA23_15 >= KW_LOCKS && LA23_15 <= KW_LONG)||(LA23_15 >= KW_MAPJOIN && LA23_15 <= KW_MATERIALIZED)||LA23_15==KW_METADATA||(LA23_15 >= KW_MINUTE && LA23_15 <= KW_MONTH)||LA23_15==KW_MSCK||(LA23_15 >= KW_NORELY && LA23_15 <= KW_NOSCAN)||LA23_15==KW_NOVALIDATE||LA23_15==KW_NULLS||LA23_15==KW_OFFSET||(LA23_15 >= KW_OPERATOR && LA23_15 <= KW_OPTION)||(LA23_15 >= KW_OUTPUTDRIVER && LA23_15 <= KW_OUTPUTFORMAT)||(LA23_15 >= KW_OVERWRITE && LA23_15 <= KW_OWNER)||(LA23_15 >= KW_PARTITIONED && LA23_15 <= KW_PARTITIONS)||LA23_15==KW_PLUS||LA23_15==KW_PRETTY||LA23_15==KW_PRINCIPALS||(LA23_15 >= KW_PURGE && LA23_15 <= KW_QUARTER)||LA23_15==KW_READ||(LA23_15 >= KW_REBUILD && LA23_15 <= KW_RECORDWRITER)||(LA23_15 >= KW_RELOAD && LA23_15 <= KW_RESTRICT)||LA23_15==KW_REWRITE||(LA23_15 >= KW_ROLE && LA23_15 <= KW_ROLES)||(LA23_15 >= KW_SCHEMA && LA23_15 <= KW_SECOND)||(LA23_15 >= KW_SEMI && LA23_15 <= KW_SERVER)||(LA23_15 >= KW_SETS && LA23_15 <= KW_SHOW)||LA23_15==KW_SKEWED||(LA23_15 >= KW_SNAPSHOT && LA23_15 <= KW_SSL)||(LA23_15 >= KW_STATISTICS && LA23_15 <= KW_SUMMARY)||LA23_15==KW_TABLES||(LA23_15 >= KW_TBLPROPERTIES && LA23_15 <= KW_TERMINATED)||LA23_15==KW_TINYINT||(LA23_15 >= KW_TOUCH && LA23_15 <= KW_TRANSACTIONS)||LA23_15==KW_UNARCHIVE||LA23_15==KW_UNDO||LA23_15==KW_UNIONTYPE||(LA23_15 >= KW_UNLOCK && LA23_15 <= KW_UNSIGNED)||(LA23_15 >= KW_URI && LA23_15 <= KW_USE)||(LA23_15 >= KW_UTC && LA23_15 <= KW_VALIDATE)||LA23_15==KW_VALUE_TYPE||(LA23_15 >= KW_VECTORIZATION && LA23_15 <= KW_WEEK)||LA23_15==KW_WHILE||(LA23_15 >= KW_WORK && LA23_15 <= KW_YEAR)||LA23_15==KW_BATCH||LA23_15==KW_DAYOFWEEK||LA23_15==KW_HOLD_DDLTIME||LA23_15==KW_IGNORE||LA23_15==KW_NO_DROP||LA23_15==KW_OFFLINE||LA23_15==KW_PROTECTION||LA23_15==KW_READONLY) ) {s = 92;}
						 
						input.seek(index23_15);
						if ( s>=0 ) return s;
						break;

					case 2 : 
						int LA23_71 = input.LA(1);
						 
						int index23_71 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_71==LPAREN) && (synpred1_HiveParser())) {s = 102;}
						else if ( (LA23_71==COMMA) ) {s = 103;}
						else if ( (LA23_71==KW_ON) && (synpred1_HiveParser())) {s = 104;}
						else if ( (LA23_71==KW_TO) ) {s = 105;}
						 
						input.seek(index23_71);
						if ( s>=0 ) return s;
						break;

					case 3 : 
						int LA23_72 = input.LA(1);
						 
						int index23_72 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_72==LPAREN) && (synpred1_HiveParser())) {s = 106;}
						else if ( (LA23_72==COMMA) ) {s = 107;}
						else if ( (LA23_72==KW_ON) && (synpred1_HiveParser())) {s = 108;}
						else if ( (LA23_72==KW_TO) ) {s = 109;}
						 
						input.seek(index23_72);
						if ( s>=0 ) return s;
						break;

					case 4 : 
						int LA23_74 = input.LA(1);
						 
						int index23_74 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_74==LPAREN) && (synpred1_HiveParser())) {s = 110;}
						else if ( (LA23_74==COMMA) ) {s = 111;}
						else if ( (LA23_74==KW_ON) && (synpred1_HiveParser())) {s = 112;}
						else if ( (LA23_74==KW_TO) ) {s = 113;}
						 
						input.seek(index23_74);
						if ( s>=0 ) return s;
						break;

					case 5 : 
						int LA23_86 = input.LA(1);
						 
						int index23_86 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_86==LPAREN) && (synpred2_HiveParser())) {s = 114;}
						else if ( (LA23_86==COMMA) ) {s = 115;}
						else if ( (LA23_86==KW_ON) && (synpred2_HiveParser())) {s = 116;}
						else if ( (LA23_86==KW_FROM) ) {s = 117;}
						 
						input.seek(index23_86);
						if ( s>=0 ) return s;
						break;

					case 6 : 
						int LA23_87 = input.LA(1);
						 
						int index23_87 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_87==LPAREN) && (synpred2_HiveParser())) {s = 118;}
						else if ( (LA23_87==COMMA) ) {s = 119;}
						else if ( (LA23_87==KW_ON) && (synpred2_HiveParser())) {s = 120;}
						else if ( (LA23_87==KW_FROM) ) {s = 121;}
						 
						input.seek(index23_87);
						if ( s>=0 ) return s;
						break;

					case 7 : 
						int LA23_89 = input.LA(1);
						 
						int index23_89 = input.index();
						input.rewind();
						s = -1;
						if ( (LA23_89==LPAREN) && (synpred2_HiveParser())) {s = 122;}
						else if ( (LA23_89==COMMA) ) {s = 123;}
						else if ( (LA23_89==KW_ON) && (synpred2_HiveParser())) {s = 124;}
						else if ( (LA23_89==KW_FROM) ) {s = 125;}
						 
						input.seek(index23_89);
						if ( s>=0 ) return s;
						break;

					case 8 : 
						int LA23_103 = input.LA(1);
						 
						int index23_103 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred1_HiveParser()) ) {s = 112;}
						else if ( (true) ) {s = 77;}
						 
						input.seek(index23_103);
						if ( s>=0 ) return s;
						break;

					case 9 : 
						int LA23_105 = input.LA(1);
						 
						int index23_105 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred1_HiveParser()) ) {s = 112;}
						else if ( (true) ) {s = 77;}
						 
						input.seek(index23_105);
						if ( s>=0 ) return s;
						break;

					case 10 : 
						int LA23_107 = input.LA(1);
						 
						int index23_107 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred1_HiveParser()) ) {s = 112;}
						else if ( (true) ) {s = 77;}
						 
						input.seek(index23_107);
						if ( s>=0 ) return s;
						break;

					case 11 : 
						int LA23_109 = input.LA(1);
						 
						int index23_109 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred1_HiveParser()) ) {s = 112;}
						else if ( (true) ) {s = 77;}
						 
						input.seek(index23_109);
						if ( s>=0 ) return s;
						break;

					case 12 : 
						int LA23_111 = input.LA(1);
						 
						int index23_111 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred1_HiveParser()) ) {s = 112;}
						else if ( (true) ) {s = 77;}
						 
						input.seek(index23_111);
						if ( s>=0 ) return s;
						break;

					case 13 : 
						int LA23_113 = input.LA(1);
						 
						int index23_113 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred1_HiveParser()) ) {s = 112;}
						else if ( (true) ) {s = 77;}
						 
						input.seek(index23_113);
						if ( s>=0 ) return s;
						break;

					case 14 : 
						int LA23_115 = input.LA(1);
						 
						int index23_115 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred2_HiveParser()) ) {s = 124;}
						else if ( (true) ) {s = 92;}
						 
						input.seek(index23_115);
						if ( s>=0 ) return s;
						break;

					case 15 : 
						int LA23_117 = input.LA(1);
						 
						int index23_117 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred2_HiveParser()) ) {s = 124;}
						else if ( (true) ) {s = 92;}
						 
						input.seek(index23_117);
						if ( s>=0 ) return s;
						break;

					case 16 : 
						int LA23_119 = input.LA(1);
						 
						int index23_119 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred2_HiveParser()) ) {s = 124;}
						else if ( (true) ) {s = 92;}
						 
						input.seek(index23_119);
						if ( s>=0 ) return s;
						break;

					case 17 : 
						int LA23_121 = input.LA(1);
						 
						int index23_121 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred2_HiveParser()) ) {s = 124;}
						else if ( (true) ) {s = 92;}
						 
						input.seek(index23_121);
						if ( s>=0 ) return s;
						break;

					case 18 : 
						int LA23_123 = input.LA(1);
						 
						int index23_123 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred2_HiveParser()) ) {s = 124;}
						else if ( (true) ) {s = 92;}
						 
						input.seek(index23_123);
						if ( s>=0 ) return s;
						break;

					case 19 : 
						int LA23_125 = input.LA(1);
						 
						int index23_125 = input.index();
						input.rewind();
						s = -1;
						if ( (synpred2_HiveParser()) ) {s = 124;}
						else if ( (true) ) {s = 92;}
						 
						input.seek(index23_125);
						if ( s>=0 ) return s;
						break;
			}
			if (state.backtracking>0) {state.failed=true; return -1;}
			NoViableAltException nvae =
				new NoViableAltException(getDescription(), 23, _s, input);
			error(nvae);
			throw nvae;
		}
	}

	static final String DFA226_eotS =
		"\130\uffff";
	static final String DFA226_eofS =
		"\1\2\127\uffff";
	static final String DFA226_minS =
		"\1\44\1\14\41\uffff\1\4\64\uffff";
	static final String DFA226_maxS =
		"\1\u015b\1\u021d\41\uffff\1\u015f\64\uffff";
	static final String DFA226_acceptS =
		"\2\uffff\1\2\72\uffff\1\1\32\uffff";
	static final String DFA226_specialS =
		"\130\uffff}>";
	static final String[] DFA226_transitionS = {
			"\1\2\22\uffff\1\2\5\uffff\1\2\43\uffff\1\2\11\uffff\1\2\26\uffff\1\2"+
			"\4\uffff\1\2\1\uffff\1\2\2\uffff\1\2\10\uffff\1\2\1\uffff\1\2\13\uffff"+
			"\1\2\4\uffff\2\2\2\uffff\1\2\5\uffff\1\1\5\uffff\1\2\11\uffff\1\2\10"+
			"\uffff\1\2\32\uffff\3\2\27\uffff\1\2\14\uffff\1\2\5\uffff\1\2\7\uffff"+
			"\1\2\20\uffff\1\2\11\uffff\1\2\3\uffff\1\2\10\uffff\1\2\1\uffff\1\2\10"+
			"\uffff\1\2\14\uffff\1\2",
			"\1\2\13\uffff\6\2\2\uffff\1\2\1\uffff\2\2\1\uffff\1\2\1\uffff\2\2\1"+
			"\uffff\3\2\1\uffff\2\2\1\uffff\5\2\1\uffff\4\2\1\uffff\2\2\1\uffff\4"+
			"\2\2\uffff\1\2\4\uffff\2\2\1\uffff\1\2\1\uffff\5\2\1\uffff\2\2\1\uffff"+
			"\3\2\1\uffff\4\2\1\uffff\3\2\1\uffff\2\2\1\uffff\1\2\1\uffff\1\2\2\uffff"+
			"\5\2\2\uffff\2\2\1\uffff\6\2\3\uffff\2\2\3\uffff\1\2\2\uffff\1\2\1\uffff"+
			"\3\2\2\uffff\2\2\1\uffff\3\2\1\uffff\1\2\1\uffff\1\2\2\uffff\3\2\1\uffff"+
			"\1\2\1\43\2\2\3\uffff\1\2\1\uffff\3\2\1\uffff\5\2\1\uffff\4\2\1\uffff"+
			"\1\2\1\uffff\2\2\1\uffff\1\2\1\uffff\6\2\1\uffff\1\2\2\uffff\2\2\4\uffff"+
			"\2\2\1\uffff\2\2\2\uffff\2\2\1\uffff\1\2\3\uffff\1\2\1\uffff\1\2\1\uffff"+
			"\2\2\1\uffff\1\2\1\uffff\3\2\3\uffff\10\2\1\uffff\1\2\2\uffff\2\2\4\uffff"+
			"\3\2\1\uffff\4\2\1\uffff\12\2\1\uffff\7\2\1\uffff\1\2\1\uffff\3\2\1\uffff"+
			"\2\2\1\uffff\3\2\2\uffff\1\2\1\uffff\1\2\1\uffff\1\2\1\uffff\1\2\1\uffff"+
			"\3\2\1\uffff\2\2\2\uffff\3\2\1\uffff\1\2\1\uffff\5\2\2\uffff\1\2\2\uffff"+
			"\3\2\4\uffff\1\2\2\uffff\1\2\2\uffff\3\2\10\uffff\3\2\36\uffff\1\2\42"+
			"\uffff\1\2\52\uffff\1\2\3\uffff\1\2\52\uffff\1\2\3\uffff\1\2\26\uffff"+
			"\1\2\4\uffff\1\2",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"\3\2\2\uffff\2\2\2\uffff\2\2\1\uffff\1\2\1\uffff\2\2\1\uffff\2\2\12"+
			"\uffff\1\2\7\uffff\1\2\144\uffff\1\2\13\uffff\1\2\14\uffff\1\2\30\uffff"+
			"\1\2\11\uffff\1\2\34\uffff\1\2\2\uffff\1\2\13\uffff\1\2\4\uffff\1\2\41"+
			"\uffff\1\75\30\uffff\1\2\24\uffff\2\2\1\uffff\2\2\1\uffff\3\2\2\uffff"+
			"\1\2\10\uffff\1\2",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			"",
			""
	};

	static final short[] DFA226_eot = DFA.unpackEncodedString(DFA226_eotS);
	static final short[] DFA226_eof = DFA.unpackEncodedString(DFA226_eofS);
	static final char[] DFA226_min = DFA.unpackEncodedStringToUnsignedChars(DFA226_minS);
	static final char[] DFA226_max = DFA.unpackEncodedStringToUnsignedChars(DFA226_maxS);
	static final short[] DFA226_accept = DFA.unpackEncodedString(DFA226_acceptS);
	static final short[] DFA226_special = DFA.unpackEncodedString(DFA226_specialS);
	static final short[][] DFA226_transition;

	static {
		int numStates = DFA226_transitionS.length;
		DFA226_transition = new short[numStates][];
		for (int i=0; i