这是calcite 1.21版本,源代码中解析SQL语句结构的关键词识别列表,
位置在这里:package org.apache.calcite.sql.parser.impl;
具体类是:public class SqlParserImpl extends SqlAbstractParserImpl implements SqlParserImplConstants
case RESET: case SET: stmt = SqlSetOption(Span.of(), null); break; case ALTER: stmt = SqlAlter(); break; case A: case ABS: case ABSENT: case ABSOLUTE: case ACTION: case ADA: case ADD: case ADMIN: case AFTER: case ALWAYS: case APPLY: case ARRAY: case ASC: case ASSERTION: case ASSIGNMENT: case ATTRIBUTE: case ATTRIBUTES: case AVG: case BEFORE: case BERNOULLI: case BREADTH: case C: case CARDINALITY: case CASCADE: case CASE: case CAST: case CATALOG: case CATALOG_NAME: case CEIL: case CEILING: case CENTURY: case CHAIN: case CHAR_LENGTH: case CHARACTER_LENGTH: case CHARACTER_SET_CATALOG: case CHARACTER_SET_NAME: case CHARACTER_SET_SCHEMA: case CHARACTERISTICS: case CHARACTERS: case CLASSIFIER: case CLASS_ORIGIN: case COALESCE: case COBOL: case COLLATION: case COLLATION_CATALOG: case COLLATION_NAME: case COLLATION_SCHEMA: case COLLECT: case COLUMN_NAME: case COMMAND_FUNCTION: case COMMAND_FUNCTION_CODE: case COMMITTED: case CONDITIONAL: case CONDITION_NUMBER: case CONNECTION: case CONNECTION_NAME: case CONSTRAINT_CATALOG: case CONSTRAINT_NAME: case CONSTRAINT_SCHEMA: case CONSTRAINTS: case CONSTRUCTOR: case CONTINUE: case CONVERT: case COUNT: case COVAR_POP: case COVAR_SAMP: case CUME_DIST: case CURRENT: case CURRENT_CATALOG: case CURRENT_DATE: case CURRENT_DEFAULT_TRANSFORM_GROUP: case CURRENT_PATH: case CURRENT_ROLE: case CURRENT_SCHEMA: case CURRENT_TIME: case CURRENT_TIMESTAMP: case CURRENT_USER: case CURSOR: case CURSOR_NAME: case DATA: case DATABASE: case DATE: case DATETIME_INTERVAL_CODE: case DATETIME_INTERVAL_PRECISION: case DECADE: case DEFAULTS: case DEFERRABLE: case DEFERRED: case DEFINED: case DEFINER: case DEGREE: case DENSE_RANK: case DEPTH: case DERIVED: case DESC: case DESCRIPTION: case DESCRIPTOR: case DIAGNOSTICS: case DISPATCH: case DOMAIN: case DOW: case DOY: case DYNAMIC_FUNCTION: case DYNAMIC_FUNCTION_CODE: case ELEMENT: case ENCODING: case EPOCH: case ERROR: case EXCEPTION: case EXCLUDE: case EXCLUDING: case EXISTS: case EXP: case EXTRACT: case FALSE: case FINAL: case FIRST: case FIRST_VALUE: case FLOOR: case FOLLOWING: case FORMAT: case FORTRAN: case FOUND: case FRAC_SECOND: case FUSION: case G: case GENERAL: case GENERATED: case GEOMETRY: case GO: case GOTO: case GRANTED: case GROUPING: case HIERARCHY: case HOUR: case IGNORE: case IMMEDIATE: case IMMEDIATELY: case IMPLEMENTATION: case INCLUDING: case INCREMENT: case INITIALLY: case INPUT: case INSTANCE: case INSTANTIABLE: case INTERVAL: case INVOKER: case ISODOW: case ISOYEAR: case ISOLATION: case JAVA: case JSON: case JSON_ARRAY: case JSON_ARRAYAGG: case JSON_EXISTS: case JSON_OBJECT: case JSON_OBJECTAGG: case JSON_QUERY: case JSON_VALUE: case K: case KEY: case KEY_MEMBER: case KEY_TYPE: case LABEL: case LAG: case LAST: case LAST_VALUE: case LEAD: case LEFT: case LENGTH: case LEVEL: case LIBRARY: case LN: case LOCALTIME: case LOCALTIMESTAMP: case LOCATOR: case LOWER: case M: case MAP: case MATCHED: case MATCH_NUMBER: case MAX: case MAXVALUE: case MESSAGE_LENGTH: case MESSAGE_OCTET_LENGTH: case MESSAGE_TEXT: case MICROSECOND: case MILLISECOND: case MILLENNIUM: case MIN: case MINUTE: case MINVALUE: case MOD: case MONTH: case MORE_: case MULTISET: case MUMPS: case NAME: case NAMES: case NANOSECOND: case NESTING: case NEW: case NEXT: case NORMALIZED: case NOT: case NTH_VALUE: case NTILE: case NULL: case NULLABLE: case NULLIF: case NULLS: case NUMBER: case OBJECT: case OCTET_LENGTH: case OCTETS: case OPTION: case OPTIONS: case ORDERING: case ORDINALITY: case OTHERS: case OUTPUT: case OVERLAY: case OVERRIDING: case PAD: case PARAMETER_MODE: case PARAMETER_NAME: case PARAMETER_ORDINAL_POSITION: case PARAMETER_SPECIFIC_CATALOG: case PARAMETER_SPECIFIC_NAME: case PARAMETER_SPECIFIC_SCHEMA: case PARTIAL: case PASCAL: case PASSING: case PASSTHROUGH: case PAST: case PATH: case PERCENT_RANK: case PERIOD: case PLACING: case PLAN: case PLI: case POSITION: case POWER: case PRECEDING: case PRESERVE: case PREV: case PRIOR: case PRIVILEGES: case PUBLIC: case QUARTER: case RANK: case READ: case REGR_COUNT: case REGR_SXX: case REGR_SYY: case RELATIVE: case REPEATABLE: case REPLACE: case RESPECT: case RESTART: case RESTRICT: case RETURNED_CARDINALITY: case RETURNED_LENGTH: case RETURNED_OCTET_LENGTH: case RETURNED_SQLSTATE: case RETURNING: case RIGHT: case ROLE: case ROUTINE: case ROUTINE_CATALOG: case ROUTINE_NAME: case ROUTINE_SCHEMA: case ROW: case ROW_COUNT: case ROW_NUMBER: case RUNNING: case SCALAR: case SCALE: case SCHEMA: case SCHEMA_NAME: case SCOPE_CATALOGS: case SCOPE_NAME: case SCOPE_SCHEMA: case SECOND: case SECTION: case SECURITY: case SELECT: case SELF: case SEQUENCE: case SERIALIZABLE: case SERVER: case SERVER_NAME: case SESSION: case SESSION_USER: case SETS: case SIMPLE: case SIZE: case SOURCE: case SPACE: case SPECIFIC: case SPECIFIC_NAME: case SQL_BIGINT: case SQL_BINARY: case SQL_BIT: case SQL_BLOB: case SQL_BOOLEAN: case SQL_CHAR: case SQL_CLOB: case SQL_DATE: case SQL_DECIMAL: case SQL_DOUBLE: case SQL_FLOAT: case SQL_INTEGER: case SQL_INTERVAL_DAY: case SQL_INTERVAL_DAY_TO_HOUR: case SQL_INTERVAL_DAY_TO_MINUTE: case SQL_INTERVAL_DAY_TO_SECOND: case SQL_INTERVAL_HOUR: case SQL_INTERVAL_HOUR_TO_MINUTE: case SQL_INTERVAL_HOUR_TO_SECOND: case SQL_INTERVAL_MINUTE: case SQL_INTERVAL_MINUTE_TO_SECOND: case SQL_INTERVAL_MONTH: case SQL_INTERVAL_SECOND: case SQL_INTERVAL_YEAR: case SQL_INTERVAL_YEAR_TO_MONTH: case SQL_LONGVARBINARY: case SQL_LONGVARCHAR: case SQL_LONGVARNCHAR: case SQL_NCHAR: case SQL_NCLOB: case SQL_NUMERIC: case SQL_NVARCHAR: case SQL_REAL: case SQL_SMALLINT: case SQL_TIME: case SQL_TIMESTAMP: case SQL_TINYINT: case SQL_TSI_DAY: case SQL_TSI_FRAC_SECOND: case SQL_TSI_HOUR: case SQL_TSI_MICROSECOND: case SQL_TSI_MINUTE: case SQL_TSI_MONTH: case SQL_TSI_QUARTER: case SQL_TSI_SECOND: case SQL_TSI_WEEK: case SQL_TSI_YEAR: case SQL_VARBINARY: case SQL_VARCHAR: case SQRT: case STATE: case STATEMENT: case STDDEV_POP: case STDDEV_SAMP: case STRUCTURE: case STYLE: case SUBCLASS_ORIGIN: case SUBSTITUTE: case SUBSTRING: case SUM: case SYSTEM_USER: case TABLE: case TABLE_NAME: case TEMPORARY: case TIES: case TIME: case TIMESTAMP: case TIMESTAMPADD: case TIMESTAMPDIFF: case TOP_LEVEL_COUNT: case TRANSACTION: case TRANSACTIONS_ACTIVE: case TRANSACTIONS_COMMITTED: case TRANSACTIONS_ROLLED_BACK: case TRANSFORM: case TRANSFORMS: case TRANSLATE: case TRIGGER_CATALOG: case TRIGGER_NAME: case TRIGGER_SCHEMA: case TRIM: case TRUE: case TRUNCATE: case TYPE: case UNBOUNDED: case UNCOMMITTED: case UNCONDITIONAL: case UNDER: case UNKNOWN: case UNNAMED: case UPPER: case USAGE: case USER: case USER_DEFINED_TYPE_CATALOG: case USER_DEFINED_TYPE_CODE: case USER_DEFINED_TYPE_NAME: case USER_DEFINED_TYPE_SCHEMA: case UTF8: case UTF16: case UTF32: case VALUES: case VAR_POP: case VAR_SAMP: case VERSION: case VIEW: case WEEK: case WITH: case WORK: case WRAPPER: case WRITE: case XML: case YEAR: case ZONE: case UNSIGNED_INTEGER_LITERAL: case APPROX_NUMERIC_LITERAL: case DECIMAL_NUMERIC_LITERAL: case BINARY_STRING_LITERAL: case QUOTED_STRING: case PREFIXED_STRING_LITERAL: case UNICODE_STRING_LITERAL: case LPAREN: case LBRACE_D: case LBRACE_T: case LBRACE_TS: case LBRACE_FN: case HOOK: case PLUS: case MINUS: case BRACKET_QUOTED_IDENTIFIER: case QUOTED_IDENTIFIER: case BACK_QUOTED_IDENTIFIER: case IDENTIFIER: case UNICODE_QUOTED_IDENTIFIER: stmt = OrderedQueryOrExpr(ExprContext.ACCEPT_QUERY); break; case EXPLAIN: stmt = SqlExplain(); break; case DESCRIBE: stmt = SqlDescribe(); break; case INSERT: case UPSERT: stmt = SqlInsert(); break; case DELETE: stmt = SqlDelete(); break; case UPDATE: stmt = SqlUpdate(); break; case MERGE: stmt = SqlMerge(); break; case CALL: stmt = SqlProcedureCall(); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException();