Class FlinkSqlParserImpl
- java.lang.Object
-
- org.apache.calcite.sql.parser.SqlAbstractParserImpl
-
- org.apache.flink.sql.parser.impl.FlinkSqlParserImpl
-
- All Implemented Interfaces:
FlinkSqlParserImplConstants
public class FlinkSqlParserImpl extends org.apache.calcite.sql.parser.SqlAbstractParserImpl implements FlinkSqlParserImplConstants
SQL parser, generated from Parser.jj by JavaCC.The public wrapper for this parser is
SqlParser.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.sql.parser.SqlAbstractParserImpl
org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext, org.apache.calcite.sql.parser.SqlAbstractParserImpl.LexicalState, org.apache.calcite.sql.parser.SqlAbstractParserImpl.Metadata, org.apache.calcite.sql.parser.SqlAbstractParserImpl.MetadataImpl
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.calcite.sql.parser.SqlParserImplFactoryFACTORYSqlParserImplFactoryimplementation for creating parser.Tokenjj_ntbooleanlookingAheadTokentokenFlinkSqlParserImplTokenManagertoken_source-
Fields inherited from class org.apache.calcite.sql.parser.SqlAbstractParserImpl
nDynamicParams, originalSql, warnings
-
Fields inherited from interface org.apache.flink.sql.parser.impl.FlinkSqlParserImplConstants
A, ABS, ABSENT, ABSOLUTE, ACTION, ADA, ADD, ADMIN, AFTER, ALL, ALLOCATE, ALLOW, ALTER, ALWAYS, ANALYZE, AND, ANY, APPLY, APPROX_NUMERIC_LITERAL, ARE, ARRAY, ARRAY_AGG, ARRAY_CONCAT_AGG, ARRAY_MAX_CARDINALITY, AS, ASC, ASENSITIVE, ASSERTION, ASSIGNMENT, ASYMMETRIC, AT, ATOMIC, ATTRIBUTE, ATTRIBUTES, AUTHORIZATION, AVG, BACK_QUOTED_IDENTIFIER, BEFORE, BEGIN, BEGIN_FRAME, BEGIN_PARTITION, BEL, BERNOULLI, BETWEEN, BIG_QUERY_BACK_QUOTED_IDENTIFIER, BIG_QUERY_DOUBLE_QUOTED_STRING, BIG_QUERY_QUOTED_STRING, BIGINT, BINARY, BINARY_STRING_LITERAL, BIT, BLOB, BOOLEAN, BOTH, BQHID, BQID, BRACKET_QUOTED_IDENTIFIER, BREADTH, BTID, BUCKETS, BY, BYTES, C, C_STYLE_ESCAPED_STRING_LITERAL, CALL, CALLED, CARDINALITY, CARET, CASCADE, CASCADED, CASE, CAST, CATALOG, CATALOG_NAME, CATALOGS, CEIL, CEILING, CENTURY, CHAIN, CHANGELOG_MODE, CHAR, CHAR_LENGTH, CHARACTER, CHARACTER_LENGTH, CHARACTER_SET_CATALOG, CHARACTER_SET_NAME, CHARACTER_SET_SCHEMA, CHARACTERISTICS, CHARACTERS, CHARSETNAME, CHECK, CLASS_ORIGIN, CLASSIFIER, CLOB, CLOSE, COALESCE, COBOL, COLLATE, COLLATION, COLLATION_CATALOG, COLLATION_ID, COLLATION_NAME, COLLATION_SCHEMA, COLLECT, COLON, COLUMN, COLUMN_NAME, COLUMNS, COMMA, COMMAND_FUNCTION, COMMAND_FUNCTION_CODE, COMMENT, COMMENT_END, COMMIT, COMMITTED, COMPILE, COMPUTE, CONCAT, CONDITION, CONDITION_NUMBER, CONDITIONAL, CONNECT, CONNECTION, CONNECTION_NAME, CONSTRAINT, CONSTRAINT_CATALOG, CONSTRAINT_NAME, CONSTRAINT_SCHEMA, CONSTRAINTS, CONSTRUCTOR, CONTAINS, CONTINUE, CONTINUOUS, CONVERT, CORR, CORRESPONDING, COUNT, COVAR_POP, COVAR_SAMP, CREATE, CROSS, CUBE, CUME_DIST, CURRENT, CURRENT_CATALOG, CURRENT_DATE, CURRENT_DEFAULT_TRANSFORM_GROUP, CURRENT_PATH, CURRENT_ROLE, CURRENT_ROW, CURRENT_SCHEMA, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_TRANSFORM_GROUP_FOR_TYPE, CURRENT_USER, CURSOR, CURSOR_NAME, CYCLE, DATA, DATABASE, DATABASES, DATE, DATE_DIFF, DATE_TRUNC, DATETIME, DATETIME_DIFF, DATETIME_INTERVAL_CODE, DATETIME_INTERVAL_PRECISION, DAY, DAYS, DEALLOCATE, DEC, DECADE, DECIMAL, DECIMAL_NUMERIC_LITERAL, DECLARE, DEFAULT, DEFAULT_, DEFAULTS, DEFERRABLE, DEFERRED, DEFINE, DEFINED, DEFINER, DEGREE, DELETE, DENSE_RANK, DEPTH, DEREF, DERIVED, DESC, DESCRIBE, DESCRIPTION, DESCRIPTOR, DETERMINISTIC, DIAGNOSTICS, DIGIT, DISALLOW, DISCONNECT, DISPATCH, DISTINCT, DISTRIBUTED, DISTRIBUTION, DOLLAR, DOMAIN, DOT, DOT_FORMAT, DOUBLE, DOUBLE_PERIOD, DOW, DOY, DQID, DRAIN, DROP, DYNAMIC, DYNAMIC_FUNCTION, DYNAMIC_FUNCTION_CODE, EACH, ELEMENT, ELSE, EMPTY, ENCODING, END, END_EXEC, END_FRAME, END_PARTITION, ENFORCED, EOF, EPOCH, EQ, EQUALS, ERROR, ESCAPE, ESTIMATED_COST, EVERY, EXCEPT, EXCEPTION, EXCLUDE, EXCLUDING, EXEC, EXECUTE, EXISTS, EXP, EXPLAIN, EXPONENT, EXTEND, EXTENDED, EXTERNAL, EXTRACT, FALSE, FETCH, FILTER, FINAL, FIRST, FIRST_VALUE, FLOAT, FLOOR, FOLLOWING, FOR, FOREIGN, FORMAL_COMMENT, FORMAT, FORTRAN, FOUND, FRAC_SECOND, FRAME_ROW, FREE, FRESHNESS, FRIDAY, FROM, FULL, FUNCTION, FUNCTIONS, FUSION, G, GE, GENERAL, GENERATED, GEOMETRY, GET, GLOBAL, GO, GOTO, GRANT, GRANTED, GROUP, GROUP_CONCAT, GROUPING, GROUPS, GT, HASH, HAVING, HEXDIGIT, HIERARCHY, HINT_BEG, HOLD, HOOK, HOP, HOUR, HOURS, HYPHENATED_IDENTIFIER, IDENTIFIER, IDENTITY, IF, IGNORE, ILIKE, IMMEDIATE, IMMEDIATELY, IMPLEMENTATION, IMPORT, IN, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, INCLUDE, INCLUDING, INCREMENT, INDICATOR, INITIAL, INITIALLY, INNER, INOUT, INPUT, INSENSITIVE, INSERT, INSTANCE, INSTANTIABLE, INT, INTEGER, INTERSECT, INTERSECTION, INTERVAL, INTO, INVOKER, IS, ISODOW, ISOLATION, ISOYEAR, JAR, JARS, JAVA, JOB, JOBS, JOIN, JSON, JSON_ARRAY, JSON_ARRAYAGG, JSON_EXECUTION_PLAN, JSON_EXISTS, JSON_OBJECT, JSON_OBJECTAGG, JSON_QUERY, JSON_VALUE, K, KEY, KEY_MEMBER, KEY_TYPE, LABEL, LAG, LANGUAGE, LARGE, LAST, LAST_VALUE, LATERAL, LBRACE, LBRACE_D, LBRACE_FN, LBRACE_T, LBRACE_TS, LBRACKET, LE, LEAD, LEADING, LEFT, LENGTH, LETTER, LEVEL, LIBRARY, LIKE, LIKE_REGEX, LIMIT, LN, LOAD, LOCAL, LOCALTIME, LOCALTIMESTAMP, LOCATOR, LOWER, LPAREN, LT, M, MAP, MATCH, MATCH_NUMBER, MATCH_RECOGNIZE, MATCHED, MATCHES, MATERIALIZED, MAX, MAXVALUE, MEASURES, MEMBER, MERGE, MESSAGE_LENGTH, MESSAGE_OCTET_LENGTH, MESSAGE_TEXT, METADATA, METHOD, MICROSECOND, MILLENNIUM, MILLISECOND, MIN, MINUS, MINUTE, MINUTES, MINVALUE, MOD, MODEL, MODELS, MODIFIES, MODIFY, MODULE, MODULES, MONDAY, MONTH, MONTHS, MORE_, MULTI_LINE_COMMENT, MULTISET, MUMPS, NAME, NAMED_ARGUMENT_ASSIGNMENT, NAMES, NANOSECOND, NATIONAL, NATURAL, NCHAR, NCLOB, NE, NE2, NESTING, NEW, NEXT, NO, NONE, NORMALIZE, NORMALIZED, NOT, NTH_VALUE, NTILE, NULL, NULLABLE, NULLIF, NULLS, NUMBER, NUMERIC, OBJECT, OCCURRENCES_REGEX, OCTET_LENGTH, OCTETS, OF, OFFSET, OLD, OMIT, ON, ONE, ONLY, OPEN, OPTION, OPTIONS, OR, ORDER, ORDERING, ORDINALITY, OTHERS, OUT, OUTER, OUTPUT, OVER, OVERLAPS, OVERLAY, OVERRIDING, OVERWRITE, OVERWRITING, PAD, PARAMETER, PARAMETER_MODE, PARAMETER_NAME, PARAMETER_ORDINAL_POSITION, PARAMETER_SPECIFIC_CATALOG, PARAMETER_SPECIFIC_NAME, PARAMETER_SPECIFIC_SCHEMA, PARTIAL, PARTITION, PARTITIONED, PARTITIONS, PASCAL, PASSING, PASSTHROUGH, PAST, PATH, PATTERN, PER, PERCENT, PERCENT_RANK, PERCENT_REMAINDER, PERCENTILE_CONT, PERCENTILE_DISC, PERIOD, PERMUTE, PIVOT, PLACING, PLAN, PLAN_ADVICE, PLI, PLUS, PORTION, POSITION, POSITION_REGEX, POWER, PRECEDES, PRECEDING, PRECISION, PREFIXED_STRING_LITERAL, PREPARE, PRESERVE, PREV, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PROCEDURES, PUBLIC, PYTHON, QUALIFY, QUARTER, QUARTERS, QUOTE, QUOTED_IDENTIFIER, QUOTED_STRING, RANGE, RANK, RAW, RBRACE, RBRACKET, READ, READS, REAL, RECURSIVE, REF, REFERENCES, REFERENCING, REFRESH, REFRESH_MODE, REGR_AVGX, REGR_AVGY, REGR_COUNT, REGR_INTERCEPT, REGR_R2, REGR_SLOPE, REGR_SXX, REGR_SXY, REGR_SYY, RELATIVE, RELEASE, REMOVE, RENAME, REPEATABLE, REPLACE, RESET, RESPECT, RESTART, RESTRICT, RESULT, RESUME, RETURN, RETURNED_CARDINALITY, RETURNED_LENGTH, RETURNED_OCTET_LENGTH, RETURNED_SQLSTATE, RETURNING, RETURNS, REVOKE, RIGHT, RLIKE, ROLE, ROLLBACK, ROLLUP, ROUTINE, ROUTINE_CATALOG, ROUTINE_NAME, ROUTINE_SCHEMA, ROW, ROW_COUNT, ROW_NUMBER, ROWS, RPAREN, RUNNING, SATURDAY, SAVEPOINT, SCALA, SCALAR, SCALE, SCHEMA, SCHEMA_NAME, SCOPE, SCOPE_CATALOGS, SCOPE_NAME, SCOPE_SCHEMA, SCROLL, SEARCH, SECOND, SECONDS, SECTION, SECURITY, SEEK, SELECT, SELF, SEMICOLON, SENSITIVE, SEPARATOR, SEQUENCE, SERIALIZABLE, SERVER, SERVER_NAME, SESSION, SESSION_USER, SET, SET_MINUS, SETS, SHOW, SIMILAR, SIMPLE, SINGLE_LINE_COMMENT, SIZE, SKIP_, SLASH, SMALLINT, SOME, SOURCE, SPACE, SPECIFIC, SPECIFIC_NAME, SPECIFICTYPE, SQL, SQL_BIGINT, SQL_BINARY, SQL_BIT, SQL_BLOB, SQL_BOOLEAN, SQL_CHAR, SQL_CLOB, SQL_DATE, SQL_DECIMAL, SQL_DOUBLE, SQL_FLOAT, SQL_INTEGER, SQL_INTERVAL_DAY, SQL_INTERVAL_DAY_TO_HOUR, SQL_INTERVAL_DAY_TO_MINUTE, SQL_INTERVAL_DAY_TO_SECOND, SQL_INTERVAL_HOUR, SQL_INTERVAL_HOUR_TO_MINUTE, SQL_INTERVAL_HOUR_TO_SECOND, SQL_INTERVAL_MINUTE, SQL_INTERVAL_MINUTE_TO_SECOND, SQL_INTERVAL_MONTH, SQL_INTERVAL_SECOND, SQL_INTERVAL_YEAR, SQL_INTERVAL_YEAR_TO_MONTH, SQL_LONGVARBINARY, SQL_LONGVARCHAR, SQL_LONGVARNCHAR, SQL_NCHAR, SQL_NCLOB, SQL_NUMERIC, SQL_NVARCHAR, SQL_REAL, SQL_SMALLINT, SQL_TIME, SQL_TIMESTAMP, SQL_TINYINT, SQL_TSI_DAY, SQL_TSI_FRAC_SECOND, SQL_TSI_HOUR, SQL_TSI_MICROSECOND, SQL_TSI_MINUTE, SQL_TSI_MONTH, SQL_TSI_QUARTER, SQL_TSI_SECOND, SQL_TSI_WEEK, SQL_TSI_YEAR, SQL_VARBINARY, SQL_VARCHAR, SQLEXCEPTION, SQLSTATE, SQLWARNING, SQRT, STAR, START, STATE, STATEMENT, STATIC, STATISTICS, STDDEV_POP, STDDEV_SAMP, STOP, STREAM, STRING, STRING_AGG, STRUCTURE, STYLE, SUBCLASS_ORIGIN, SUBMULTISET, SUBSET, SUBSTITUTE, SUBSTRING, SUBSTRING_REGEX, SUCCEEDS, SUM, SUNDAY, SUSPEND, SYMMETRIC, SYSTEM, SYSTEM_TIME, SYSTEM_USER, TABLE, TABLE_NAME, TABLES, TABLESAMPLE, TEMPORARY, THEN, THURSDAY, TIES, TIME, TIME_DIFF, TIME_TRUNC, TIMESTAMP, TIMESTAMP_DIFF, TIMESTAMP_LTZ, TIMESTAMP_TRUNC, TIMESTAMPADD, TIMESTAMPDIFF, TIMEZONE_HOUR, TIMEZONE_MINUTE, TINYINT, TO, tokenImage, TOP_LEVEL_COUNT, TRAILING, TRANSACTION, TRANSACTIONS_ACTIVE, TRANSACTIONS_COMMITTED, TRANSACTIONS_ROLLED_BACK, TRANSFORM, TRANSFORMS, TRANSLATE, TRANSLATE_REGEX, TRANSLATION, TREAT, TRIGGER, TRIGGER_CATALOG, TRIGGER_NAME, TRIGGER_SCHEMA, TRIM, TRIM_ARRAY, TRUE, TRUNCATE, TRY_CAST, TUESDAY, TUMBLE, TYPE, UESCAPE, UNBOUNDED, UNCOMMITTED, UNCONDITIONAL, UNDER, UNICODE_QUOTED_ESCAPE_CHAR, UNICODE_QUOTED_IDENTIFIER, UNICODE_STRING_LITERAL, UNION, UNIQUE, UNKNOWN, UNLOAD, UNNAMED, UNNEST, UNPIVOT, UNSIGNED_INTEGER_LITERAL, UPDATE, UPPER, UPSERT, USAGE, USE, USER, USER_DEFINED_TYPE_CATALOG, USER_DEFINED_TYPE_CODE, USER_DEFINED_TYPE_NAME, USER_DEFINED_TYPE_SCHEMA, USING, UTF16, UTF32, UTF8, VALUE, VALUE_OF, VALUES, VAR_POP, VAR_SAMP, VARBINARY, VARCHAR, VARYING, VERSION, VERSIONING, VERTICAL_BAR, VIEW, VIEWS, VIRTUAL, WATERMARK, WATERMARKS, WEDNESDAY, WEEK, WEEKS, WHEN, WHENEVER, WHERE, WHITESPACE, WIDTH_BUCKET, WINDOW, WITH, WITHIN, WITHOUT, WORK, WRAPPER, WRITE, XML, YEAR, YEARS, ZONE
-
-
Constructor Summary
Constructors Constructor Description FlinkSqlParserImpl(InputStream stream)FlinkSqlParserImpl(InputStream stream, String encoding)FlinkSqlParserImpl(Reader stream)FlinkSqlParserImpl(FlinkSqlParserImplTokenManager tm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAddArg(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)voidAddArg0(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)voidAddColumnType(List<org.apache.calcite.sql.SqlNode> list)voidAddCompoundColumnIdentifier(List<org.apache.calcite.sql.SqlNode> list)voidAddCompoundIdentifierType(List<org.apache.calcite.sql.SqlNode> list, List<org.apache.calcite.sql.SqlNode> extendList)Parses a compound identifier with optional type.voidAddCompoundIdentifierTypes(List<org.apache.calcite.sql.SqlNode> list, List<org.apache.calcite.sql.SqlNode> extendList)Parses a comma-separated list of compound identifiers.voidAddExpression(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)AsExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext)but appends to a list.voidAddExpression2b(List<Object> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)voidAddExpressions(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a list of expressions separated by commas, appending expressions to a given list.voidAddFieldNameType(List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes)voidAddFieldNameTypes(List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes)Parse a "name1 type1 [NULL | NOT NULL], name2 type2 [NULL | NOT NULL] ..." list, the field type default is not nullable.voidAddGroupingElement(List<org.apache.calcite.sql.SqlNode> list)voidAddHint(List<org.apache.calcite.sql.SqlNode> hints)voidAddIdentifierSegment(List<String> names, List<org.apache.calcite.sql.parser.SqlParserPos> positions)Parses one segment of an identifier that may be composite.voidAddKeyValueOption(List<org.apache.calcite.sql.SqlNode> list)Parses an option with format key=val whose key is a simple identifier or string literal and value is a string literal.voidAddMeasureColumn(List<org.apache.calcite.sql.SqlNode> list)voidAddOptionValue(List<org.apache.calcite.sql.SqlNode> list)Parses an option value (either a string or a numeric) and adds to a list.voidAddOrderItem(List<org.apache.calcite.sql.SqlNode> list)Parses one item in an ORDER BY clause, and adds it to a list.voidAddOrModifyColumn(SqlAlterTable.AlterTableContext context)ParsesADD/MODIFY column_name column_data_type [...].voidAddPivotAgg(List<org.apache.calcite.sql.SqlNode> list)voidAddPivotValue(List<org.apache.calcite.sql.SqlNode> list)voidAddRowConstructor(List<org.apache.calcite.sql.SqlNode> list)Parses a row constructor and adds it to a list.voidAddSelectItem(List<org.apache.calcite.sql.SqlNode> list)Parses one item in a select list.voidAddSetOpQuery(List<Object> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a set operator (e.g.voidAddSetOpQueryOrExpr(List<Object> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a set operator (e.g.voidAddSimpleIdentifiers(List<org.apache.calcite.sql.SqlNode> list)Parses a comma-separated list of simple identifiers.voidAddSubsetDefinition(List<org.apache.calcite.sql.SqlNode> list)voidAddTableIdentifierSegment(List<String> names, List<org.apache.calcite.sql.parser.SqlParserPos> positions)AsAddIdentifierSegment(java.util.List<java.lang.String>, java.util.List<org.apache.calcite.sql.parser.SqlParserPos>)but part of a table name (for example, followingFROM,INSERTorUPDATE).voidAddUnpivotValue(List<org.apache.calcite.sql.SqlNode> list)voidAddWindowSpec(List<org.apache.calcite.sql.SqlNode> list)voidAddWithItem(List<org.apache.calcite.sql.SqlWithItem> list)org.apache.calcite.sql.SqlLiteralAllOrDistinct()voidAlterTableAddOrModify(SqlAlterTable.AlterTableContext context)ParsesALTER TABLE table_name ADD/MODIFY [...].voidAlterTableAddPartition(SqlAddPartitions.AlterTableAddPartitionContext context)ParsesALTER TABLE table_name ADD [IF NOT EXISTS] PARTITION partition_spec [PARTITION partition_spec][...].voidAlterTableDropPartitions(SqlDropPartitions.AlterTableDropPartitionsContext context)ParsesALTER TABLE table_name DROP [IF EXISTS] PARTITION partition_spec[, PARTITION partition_spec, ...].org.apache.calcite.sql.SqlNodeArrayConstructor()Parses an ARRAY constructororg.apache.calcite.sql.SqlCallArrayLiteral()org.apache.calcite.sql.SqlNodeAtomicRowExpression()Parses an atomic row expression.org.apache.calcite.sql.SqlBinaryOperatorBinaryMultisetOperator()Parses a binary multiset operator.org.apache.calcite.sql.SqlBinaryOperatorBinaryQueryOperator()Parses a binary query operator like UNION.org.apache.calcite.sql.SqlBinaryOperatorBinaryRowOperator()Parses a binary row operator like AND.org.apache.calcite.sql.SqlNodeBuiltinFunctionCall()Parses a call to a builtin function with special syntax.org.apache.calcite.sql.SqlNodeCaseExpression()org.apache.calcite.sql.SqlTypeNameSpecCharacterTypeName(org.apache.calcite.sql.parser.Span s)Parse character types: char, varchar.org.apache.calcite.sql.SqlCollationCollateClause()Parses a COLLATE clauseorg.apache.calcite.sql.SqlTypeNameSpecCollectionsTypeName(org.apache.calcite.sql.SqlTypeNameSpec elementTypeName)Parse a collection type name, the input element type name may also be a collection type.SqlTableConstraintColumnConstraint(org.apache.calcite.sql.SqlIdentifier column)Parses a column constraint for CREATE TABLE.org.apache.calcite.sql.SqlKindcomp()Parses a comparison operator inside a SOME / ALL predicate.org.apache.calcite.sql.SqlIdentifierCompoundIdentifier()Parses a compound identifier.org.apache.calcite.sql.SqlIdentifierCompoundTableIdentifier()Parses a compound identifier in the FROM clause.SqlTableColumnComputedColumn(SqlCreateTable.TableCreationContext context)Parsescolumn_name AS expr [COMMENT 'comment'].org.apache.calcite.sql.SqlLiteralConstraintEnforcement()org.apache.calcite.sql.SqlIdentifierConstraintName()org.apache.calcite.sql.SqlIdentifierContextVariable()org.apache.calcite.sql.SqlNodeCreateSetSemanticsTableIfNeeded(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.SqlNode e, org.apache.calcite.sql.SqlNodeList partitionList, org.apache.calcite.sql.SqlNodeList orderList)org.apache.calcite.sql.SqlNodeCursorExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a CURSOR(query) expression.org.apache.calcite.sql.SqlTypeNameSpecCustomizedCollectionsTypeName()org.apache.calcite.sql.SqlDataTypeSpecDataType()org.apache.calcite.sql.SqlCallDateDiffFunctionCall()Parses a call to BigQuery's DATE_DIFF.org.apache.calcite.sql.SqlNodeDateTimeConstructorCall()Parses a Date/Time constructor function, for example "DATE(1969, 7, 21)" or "DATETIME(d, t)".org.apache.calcite.sql.SqlCallDatetimeDiffFunctionCall()Parses BigQuery's built-in DATETIME_DIFF() function.org.apache.calcite.sql.SqlLiteralDateTimeLiteral()Parses a date/time literal.org.apache.calcite.sql.SqlTypeNameSpecDateTimeTypeName()Parse datetime types: date, time, timestamp.org.apache.calcite.sql.SqlCallDateTruncFunctionCall()Parses a call to DATE_TRUNC.org.apache.calcite.avatica.util.TimeUnitDay()org.apache.calcite.sql.SqlNodeDefault()voiddisable_tracing()org.apache.calcite.sql.SqlDynamicParamDynamicParam()Parses a dynamic parameter marker.voidenable_tracing()org.apache.calcite.sql.SqlExplain.DepthExplainDepth()Parses WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION modifier for EXPLAIN PLAN.org.apache.calcite.sql.SqlExplainLevelExplainDetailLevel()Parses INCLUDING ALL ATTRIBUTES modifier for EXPLAIN PLAN.org.apache.calcite.sql.SqlNodeExplicitTable(org.apache.calcite.sql.parser.SqlParserPos pos)Parses an explicit TABLE t reference.org.apache.calcite.sql.SqlNodeExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a row expression or a parenthesized expression of any kind.List<Object>Expression2(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a binary row expression, or a parenthesized expression of any kind.org.apache.calcite.sql.SqlNodeExpression3(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a unary row expression, or a parenthesized expression of any kind.org.apache.calcite.sql.SqlNodeListExpressionCommaList(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a list of expressions separated by commas.org.apache.calcite.sql.SqlNodeExprOrJoinOrOrderedQuery(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Syntactical Descriptions *org.apache.calcite.sql.SqlTypeNameSpecExtendedCollectionsTypeName(org.apache.calcite.sql.SqlTypeNameSpec elementTypeName, boolean elementNullable)Parse a collection type name, the input element type name may also be a collection type.org.apache.calcite.sql.SqlDataTypeSpecExtendedDataType()Different withDataType(), we support a [ NULL | NOT NULL ] suffix syntax for both the collection element data type and the data type itself.voidExtendedFieldNameTypeCommaList(List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes, List<org.apache.calcite.sql.SqlCharStringLiteral> comments)Parse a "name1 type1 [ NULL | NOT NULL] [ comment ] [, name2 type2 [ NULL | NOT NULL] [ comment ] ]* ..." list.voidExtendedPartitionSpecCommaList(org.apache.calcite.sql.SqlNodeList list)Parses a partition specifications statement, e.g.org.apache.calcite.sql.SqlTypeNameSpecExtendedSqlBasicTypeName()A sql type name extended basic data type, it has a counterpart basic sql type name but always represents as a special alias compared with the standard name.org.apache.calcite.sql.SqlTypeNameSpecExtendedSqlRowTypeName()Parse Row type, we support both Row(name1 type1, name2 type2) and Row<name1 type1, name2 type2>.org.apache.calcite.sql.SqlNodeExtendedTableRef()Allows parser to be extended with new types of table references.org.apache.calcite.sql.SqlNodeListExtendList()org.apache.calcite.sql.SqlNodeExtendTable(org.apache.calcite.sql.SqlNode tableRef)Wraps a table reference in a call to EXTEND if an optional "EXTEND" clause is present.voidFetchClause(org.apache.calcite.sql.SqlNode[] offsetFetch)Parses a FETCH clause in an ORDER BY expression.org.apache.calcite.sql.SqlNodeFloorCeilOptions(org.apache.calcite.sql.parser.Span s, boolean floorFlag)org.apache.calcite.sql.SqlNodeFromClause()Parses the FROM clause for a SELECT.org.apache.calcite.sql.SqlIdentifierFunctionName()Parses the name of a function (either a compound identifier or a reserved word which can be used as a function name).List<org.apache.calcite.sql.SqlNode>FunctionParameterList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses function parameter lists including DISTINCT keyword recognition, DEFAULT, and named argument assignment.ParseExceptiongenerateParseException()org.apache.calcite.sql.parser.SqlAbstractParserImpl.MetadatagetMetadata()TokengetNextToken()protected org.apache.calcite.sql.parser.SqlParserPosgetPos()TokengetToken(int index)org.apache.calcite.sql.SqlNodeListGroupBy()Parses a GROUP BY clause for SELECT.org.apache.calcite.sql.SqlCallGroupByWindowingCall()Parses a call to a grouping function inside the GROUP BY clause, for exampleTUMBLE(rowtime, INTERVAL '1' MINUTE).List<org.apache.calcite.sql.SqlNode>GroupingElementList()org.apache.calcite.sql.SqlNodeHaving()Parses a HAVING clause for SELECT.org.apache.calcite.avatica.util.TimeUnitHour()StringIdentifier()Parses a simple identifier as a String.booleanIfExistsOpt()Parses a "IF EXISTS" option, default is false.booleanIfNotExistsOpt()Parses a "IF NOT EXISTS" option, default is false.org.apache.calcite.sql.SqlNodeImplicitTableFunctionCallArgs(org.apache.calcite.sql.SqlIdentifier name)org.apache.calcite.sql.SqlLiteralIntervalLiteral()Parses an interval literal.org.apache.calcite.sql.SqlNodeIntervalLiteralOrExpression()Parses an interval literal (e.g.org.apache.calcite.sql.SqlIntervalQualifierIntervalQualifier()org.apache.calcite.sql.SqlIntervalQualifierIntervalQualifierStart()Interval qualifier without 'TO unit'.intIntLiteral()org.apache.calcite.sql.SqlNumericLiteralIntoBuckets(org.apache.calcite.sql.parser.SqlParserPos startPos)org.apache.calcite.sql.SqlNodeJdbcFunctionCall()Parses a function call expression with JDBC syntax.org.apache.calcite.sql.SqlLiteralJdbcOdbcDataType()org.apache.calcite.sql.SqlJdbcDataTypeNameJdbcOdbcDataTypeName()org.apache.calcite.sql.SqlNodeJoinOrCommaTable(org.apache.calcite.sql.SqlNode e)org.apache.calcite.sql.SqlNodeJoinTable(org.apache.calcite.sql.SqlNode e)Matches "LEFT JOIN t ONorg.apache.calcite.sql.SqlLiteralJoinType()List<org.apache.calcite.sql.SqlNode>JsonApiCommonSyntax()org.apache.calcite.sql.SqlCallJsonArrayAggFunctionCall()org.apache.calcite.sql.SqlNodeListJsonArrayAggOrderByClause()org.apache.calcite.sql.SqlCallJsonArrayFunctionCall()org.apache.calcite.sql.SqlNodeJsonConstructorNullClause()org.apache.calcite.sql.SqlJsonExistsErrorBehaviorJsonExistsErrorBehavior()org.apache.calcite.sql.SqlCallJsonExistsFunctionCall()voidJsonInputClause()org.apache.calcite.sql.SqlNodeJsonName()List<org.apache.calcite.sql.SqlNode>JsonNameAndValue()org.apache.calcite.sql.SqlCallJsonObjectAggFunctionCall()org.apache.calcite.sql.SqlCallJsonObjectFunctionCall()org.apache.calcite.sql.SqlDataTypeSpecJsonOutputClause()org.apache.calcite.sql.SqlNodeJsonPathSpec()List<org.apache.calcite.sql.SqlNode>JsonQueryEmptyOrErrorBehavior()org.apache.calcite.sql.SqlCallJsonQueryFunctionCall()org.apache.calcite.sql.SqlNodeJsonQueryWrapperBehavior()org.apache.calcite.sql.SqlJsonEncodingJsonRepresentation()org.apache.calcite.sql.SqlDataTypeSpecJsonReturningClause()List<org.apache.calcite.sql.SqlNode>JsonValueEmptyOrErrorBehavior()org.apache.calcite.sql.SqlCallJsonValueFunctionCall()org.apache.calcite.sql.SqlNodeLeafQuery(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a leaf in a query expression (SELECT, VALUES or TABLE).org.apache.calcite.sql.SqlNodeLeafQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses either a row expression, a leaf query expression, or a parenthesized expression of any kind.voidLimitClause(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.SqlNode[] offsetFetch)Parses a LIMIT clause in an ORDER BY expression.org.apache.calcite.sql.SqlNodeLiteral()Parses a literal expression, allowing continued string literals.org.apache.calcite.sql.SqlNodeLiteralOrIntervalExpression()Parses a literal or an interval expression.org.apache.calcite.sql.SqlNodeMapConstructor()Parses a MAP constructororg.apache.calcite.sql.SqlMatchRecognizeMatchRecognize(org.apache.calcite.sql.SqlNode tableRef)Parses a MATCH_RECOGNIZE clause following a table expression.org.apache.calcite.sql.SqlCallMatchRecognizeCallWithModifier()org.apache.calcite.sql.SqlCallMatchRecognizeFunctionCall()org.apache.calcite.sql.SqlCallMatchRecognizeNavigationLogical()org.apache.calcite.sql.SqlCallMatchRecognizeNavigationPhysical()org.apache.calcite.sql.SqlNodeListMeasureColumnCommaList(org.apache.calcite.sql.parser.Span s)SqlTableColumnMetadataColumn(SqlCreateTable.TableCreationContext context, org.apache.calcite.sql.SqlIdentifier name, org.apache.calcite.sql.SqlDataTypeSpec type)Parsescolumn_name column_data_type METADATA [FROM 'alias_name'] [VIRTUAL] [COMMENT 'comment'].org.apache.calcite.avatica.util.TimeUnitMinute()org.apache.calcite.avatica.util.TimeUnitMonth()org.apache.calcite.sql.SqlNodeMultisetConstructor()Parses a MULTISET constructororg.apache.calcite.sql.SqlCallNamedCall()org.apache.calcite.sql.SqlNodeNamedFunctionCall()Parses a call to a named function (could be a builtin with regular syntax, or else a UDF).org.apache.calcite.sql.SqlNodeNamedRoutineCall(org.apache.calcite.sql.SqlFunctionCategory routineType, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)org.apache.calcite.sql.SqlLiteralNatural()org.apache.calcite.sql.SqlNodeNewSpecification()Parses a NEW UDT(...) expression.org.apache.calcite.sql.SqlNodeNonIntervalLiteral()Parses a literal that is not an interval literal.StringNonReservedJdbcFunctionName()Parses the name of a JDBC function that is a token but is not reserved.StringNonReservedKeyWord()Parses a non-reserved keyword for use as an identifier.voidNonReservedKeyWord0of3()voidNonReservedKeyWord1of3()voidNonReservedKeyWord2of3()org.apache.calcite.sql.parser.SqlParseExceptionnormalizeException(Throwable ex)booleanNotNullOpt()Parses NOT NULL and returns false, or parses nothing and returns true.booleanNullableOptDefaultFalse()Parse a nullable option, default is false.booleanNullableOptDefaultTrue()Parse a nullable option, default is true.org.apache.calcite.sql.SqlCallnullTreatment(org.apache.calcite.sql.SqlCall arg)org.apache.calcite.util.Pair<org.apache.calcite.sql.parser.SqlParserPos,org.apache.calcite.sql.SqlOperator>NullTreatment()org.apache.calcite.sql.SqlLiteralNumericLiteral()Parses a numeric literal (can be signed)voidOffsetClause(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.SqlNode[] offsetFetch)Parses an OFFSET clause in an ORDER BY expression.org.apache.calcite.sql.SqlNodeListOrderBy(boolean accept)Parses an ORDER BY clause.org.apache.calcite.sql.SqlNodeOrderByLimitOpt(org.apache.calcite.sql.SqlNode e)Reads optional "ORDER BY", "LIMIT", "OFFSET", "FETCH" following a query,e.org.apache.calcite.sql.SqlNodeListOrderByOfSetSemanticsTable()org.apache.calcite.sql.SqlNodeOrderedQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses either a row expression or a query expression with an optional ORDER BY.org.apache.calcite.sql.SqlNodeOver(org.apache.calcite.sql.SqlNode tableRef)Wraps a table reference in a call to OVER if an optional "OVER" clause is present (if the dialect supports OVER for table expressions).org.apache.calcite.util.Pair<org.apache.calcite.sql.SqlNodeList,org.apache.calcite.sql.SqlNodeList>ParenthesizedCompoundIdentifierList()List of compound identifiers in parentheses.org.apache.calcite.sql.SqlNodeParenthesizedExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a parenthesized query or single row expression.org.apache.calcite.sql.SqlNodeListParenthesizedKeyValueOptionCommaList()org.apache.calcite.sql.SqlNodeListParenthesizedLiteralOptionCommaList()Parses a literal list separated by comma.org.apache.calcite.sql.SqlNodeListParenthesizedQueryOrCommaList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses a parenthesized query or comma-list of row expressions.org.apache.calcite.sql.SqlNodeListParenthesizedQueryOrCommaListWithDefault(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)As ParenthesizedQueryOrCommaList, but allows DEFAULT in place of any of the expressions.org.apache.calcite.sql.SqlNodeListParenthesizedSimpleIdentifierList()List of simple identifiers in parentheses.org.apache.calcite.sql.SqlNodeparseArray()voidParseExplainDetail(Set<String> explainDetails)org.apache.calcite.sql.SqlNodeparseSqlExpressionEof()org.apache.calcite.sql.SqlNodeparseSqlStmtEof()org.apache.calcite.sql.SqlNodeListparseSqlStmtList()org.apache.calcite.sql.SqlNodePartitionedByAndOrderBy(org.apache.calcite.sql.SqlNode e)org.apache.calcite.sql.SqlNodePartitionedQueryOrQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)voidPartitionSpecCommaList(org.apache.calcite.sql.SqlNodeList list)Parses a partition specifications statement, e.g. insert into tbl1 partition(col1='val1', col2='val2') select col3 from tbl.SqlPartitionSpecPropertyPartitionSpecProperty()Parses a partition key/value, e.g. p or p = '10'.org.apache.calcite.sql.SqlNodePatternDefinition()org.apache.calcite.sql.SqlNodeListPatternDefinitionCommaList(org.apache.calcite.sql.parser.Span s)org.apache.calcite.sql.SqlNodePatternExpression()org.apache.calcite.sql.SqlNodePatternFactor()org.apache.calcite.sql.SqlNodePatternPrimary()org.apache.calcite.sql.SqlNodePatternTerm()org.apache.calcite.sql.SqlNodePeriodConstructor()Parses a PERIOD constructororg.apache.calcite.sql.SqlOperatorperiodOperator()org.apache.calcite.sql.SqlNodePivot(org.apache.calcite.sql.SqlNode tableRef)Parses a PIVOT clause following a table expression.org.apache.calcite.sql.SqlPostfixOperatorPostfixRowOperator()Parses a postfix row operator like IS NOT NULL.intPrecisionOpt()org.apache.calcite.sql.SqlPrefixOperatorPrefixRowOperator()Parses a prefix row operator like NOT.org.apache.calcite.sql.SqlNodeListProperties()Parse properties such as ('k' = 'v').org.apache.calcite.sql.SqlNodeListPropertyKeys()Parse a table option key list.org.apache.calcite.sql.SqlNodeQualify()Parses a QUALIFY clause for SELECT.org.apache.calcite.avatica.util.TimeUnitQuarter()org.apache.calcite.sql.SqlNodeQuery(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)org.apache.calcite.sql.SqlNodeQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses either a row expression or a query expression without ORDER BY.SqlTableColumnRegularColumn(SqlCreateTable.TableCreationContext context, org.apache.calcite.sql.SqlIdentifier name, org.apache.calcite.sql.SqlDataTypeSpec type)Parsescolumn_name column_data_type [constraint] [COMMENT 'comment'].voidReInit(InputStream stream)voidReInit(InputStream stream, String encoding)voidReInit(Reader stream)voidReInit(FlinkSqlParserImplTokenManager tm)org.apache.calcite.sql.SqlIdentifierReservedFunctionName()Parses a reserved word which is used as the name of a function.org.apache.calcite.sql.SqlNodeRichSqlInsert()Parses an INSERT statement.org.apache.calcite.sql.SqlNodeRowConstructor()Parses a row constructor in the context of a VALUES expression.org.apache.calcite.sql.SqlNodeRowExpressionExtension()Parses a row expression extension, it can be either an identifier, or a call to a named function.org.apache.calcite.sql.SqlTypeNameSpecRowTypeName()Parse Row type with format: Row(name1 type1, name2 type2).StringScope()org.apache.calcite.avatica.util.TimeUnitSecond()org.apache.calcite.sql.SqlNodeSelectExpression()Parses one unaliased expression in a select list.org.apache.calcite.sql.SqlCallSequenceExpression()voidsetConformance(org.apache.calcite.sql.validate.SqlConformance conformance)voidsetIdentifierMaxLength(int identifierMaxLength)voidsetQuotedCasing(org.apache.calcite.avatica.util.Casing quotedCasing)voidsetTabSize(int tabSize)voidsetUnquotedCasing(org.apache.calcite.avatica.util.Casing unquotedCasing)org.apache.calcite.sql.SqlIdentifierSimpleIdentifier()Parses a simple identifier as an SqlIdentifier.org.apache.calcite.sql.SqlNodeListSimpleIdentifierCommaListWithPosition()Parses a comma-separated list of simple identifiers with position.org.apache.calcite.sql.SqlIdentifierSimpleIdentifierFromStringLiteral()Parses a character literal as an SqlIdentifier.org.apache.calcite.sql.SqlNodeListSimpleIdentifierOrList()List of simple identifiers in parentheses or one simple identifier.StringSimpleStringLiteral()Parses a character literal.org.apache.calcite.sql.SqlSnapshotSnapshot(org.apache.calcite.sql.SqlNode tableRef)Parses a FOR SYSTEM_TIME clause following a table expression.org.apache.calcite.sql.SqlLiteralSpecialLiteral()Parse a special literal keywordSqlAddJarSqlAddJar()Parses an ADD JAR statement.org.apache.calcite.sql.SqlAlterSqlAlter()Parses an expression for setting or resetting an option in SQL, such as QUOTED_IDENTIFIERS, or explain plan level (physical/logical).SqlAlterCatalogSqlAlterCatalog()Parses an alter catalog statement.SqlAlterDatabaseSqlAlterDatabase()SqlAlterFunctionSqlAlterFunction()SqlAlterMaterializedTableSqlAlterMaterializedTable()Parses alter materialized table.SqlAlterModelSqlAlterModel()ALTER MODEL [IF EXISTS] modelName SET (property_key = property_val, ...)SqlAlterTableSqlAlterTable()SqlAlterViewSqlAlterView()org.apache.calcite.sql.SqlNodeSqlAnalyzeTable()Parses an ANALYZE TABLE statement.SqlBeginStatementSetSqlBeginStatementSet()Parse a start statement set statement.org.apache.calcite.sql.SqlNodeSqlCompileAndExecutePlan()Parses a compile plan statement.org.apache.calcite.sql.SqlNodeSqlCompilePlan()Parses a compile plan statement.org.apache.calcite.sql.SqlCreateSqlCreate()Parses a CREATE statement.org.apache.calcite.sql.SqlCreateSqlCreateCatalog(org.apache.calcite.sql.parser.Span s, boolean replace)Parses a create catalog statement.org.apache.calcite.sql.SqlCreateSqlCreateDatabase(org.apache.calcite.sql.parser.Span s, boolean replace)Parses a create database statement.org.apache.calcite.sql.SqlCreateSqlCreateExtended(org.apache.calcite.sql.parser.Span s, boolean replace)org.apache.calcite.sql.SqlCreateSqlCreateFunction(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)org.apache.calcite.sql.SqlCreateSqlCreateMaterializedTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)Parses a CREATE MATERIALIZED TABLE statement.org.apache.calcite.sql.SqlCreateSqlCreateModel(org.apache.calcite.sql.parser.Span s, boolean isTemporary)CREATE MODEL [IF NOT EXIST] modelName [INPUT(col1 type1, col2 type2, ...)]org.apache.calcite.sql.SqlCreateSqlCreateTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)org.apache.calcite.sql.SqlCreateSqlCreateView(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)Parses a create view or temporary view statement.org.apache.calcite.sql.SqlNodeSqlDelete()Parses a DELETE statement.org.apache.calcite.sql.SqlNodeSqlDescribe()Parses a DESCRIBE statement.SqlDescribeCatalogSqlDescribeCatalog()Parse a "DESCRIBE CATALOG" metadata query commandSqlDescribeDatabaseSqlDescribeDatabase()SqlDescribeJobSqlDescribeJob()Parse a "DESCRIBE JOB" statement: DESCRIBE | DESC JOBSqlDistributionSqlDistribution(org.apache.calcite.sql.parser.SqlParserPos startPos)org.apache.calcite.sql.SqlDropSqlDrop()Parses a DROP statement.org.apache.calcite.sql.SqlDropSqlDropCatalog(org.apache.calcite.sql.parser.Span s, boolean replace)org.apache.calcite.sql.SqlDropSqlDropDatabase(org.apache.calcite.sql.parser.Span s, boolean replace)org.apache.calcite.sql.SqlDropSqlDropExtended(org.apache.calcite.sql.parser.Span s, boolean replace)org.apache.calcite.sql.SqlDropSqlDropFunction(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)org.apache.calcite.sql.SqlDropSqlDropMaterializedTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)Parses a DROP MATERIALIZED TABLE statement.org.apache.calcite.sql.SqlDropSqlDropModel(org.apache.calcite.sql.parser.Span s, boolean isTemporary)DROP MODEL [IF EXIST] modelNameorg.apache.calcite.sql.SqlDropSqlDropTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)org.apache.calcite.sql.SqlDropSqlDropView(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary)SqlEndStatementSetSqlEndStatementSet()Parse a end statement set statement.org.apache.calcite.sql.SqlNodeSqlExecute()Parses an execute statement.org.apache.calcite.sql.SqlNodeSqlExecutePlan()Parses an execute plan statement.org.apache.calcite.sql.SqlNodeSqlExplain()Parses an EXPLAIN PLAN statement.org.apache.calcite.sql.SqlNodeSqlExpressionEof()Parses a SQL expression (such as might occur in a WHERE clause) followed by the end-of-file symbol.org.apache.calcite.sql.SqlNodeSqlInsert()Parses an INSERT statement.voidSqlInsertKeywords(List<org.apache.calcite.sql.SqlLiteral> keywords)SqlLoadModuleSqlLoadModule()Parses a load module statement.org.apache.calcite.sql.SqlTypeNameSpecSqlMapTypeName()Parses a SQL map type, e.g.org.apache.calcite.sql.SqlNodeSqlMerge()Parses a MERGE statement.org.apache.calcite.sql.SqlNodeSqlProcedureCall()Parses a CALL statement.org.apache.calcite.sql.SqlNodeSqlQueryEof()Parses a query (SELECT, UNION, INTERSECT, EXCEPT, VALUES, TABLE) followed by the end-of-file symbol.org.apache.calcite.sql.SqlNodeSqlQueryOrDml()Parses a query (SELECT or VALUES) or DML statement (INSERT, UPDATE, DELETE, MERGE).org.apache.calcite.sql.SqlTypeNameSpecSqlRawTypeName()Parses a SQL raw type such asRAW('org.my.Class', 'sW3Djsds...').SqlRemoveJarSqlRemoveJar()Parses a remove jar statement.org.apache.calcite.sql.SqlNodeSqlReplaceTable()Parser a REPLACE TABLE AS statementorg.apache.calcite.sql.SqlNodeSqlReset()Parses a RESET statement: RESET ['key'];SqlResourceSqlResourceInfo()Parse resource type and path.SqlRichDescribeFunctionSqlRichDescribeFunction()DESCRIBE | DESC FUNCTION [ EXTENDED] [[catalogName.] dataBasesName].functionName sql call.SqlRichDescribeModelSqlRichDescribeModel()DESCRIBE | DESC MODEL [ EXTENDED] [[catalogName.] dataBasesName].modelName sql call.SqlRichDescribeTableSqlRichDescribeTable()DESCRIBE | DESC [ EXTENDED] [[catalogName.] dataBasesName].tableName sql call.org.apache.calcite.sql.SqlNodeSqlRichExplain()Parses an explain module statement.org.apache.calcite.sql.SqlSelectSqlSelect()Parses a leaf SELECT expression without ORDER BY.voidSqlSelectKeywords(List<org.apache.calcite.sql.SqlLiteral> keywords)org.apache.calcite.sql.SqlNodeSqlSet()org.apache.calcite.sql.SqlSetOptionSqlSetOption(org.apache.calcite.sql.parser.Span s, String scope)Parses "SET <NAME> = VALUE" or "RESET <NAME>", without a leading "ALTER <SCOPE>".SqlShowCatalogsSqlShowCatalogs()Parse a "Show Catalogs" metadata query command.SqlShowColumnsSqlShowColumns()SHOW COLUMNS FROM [[catalog.] database.]sqlIdentifier sql call.SqlShowCreateSqlShowCreate()Parse a "Show Create Table" query and "Show Create View" and "Show Create Catalog" query commands.org.apache.calcite.sql.SqlCallSqlShowCurrentCatalogOrDatabase()SqlShowDatabasesSqlShowDatabases()Parse a "Show DATABASES" metadata query command.SqlShowFunctionsSqlShowFunctions()Parses a show functions statement.SqlShowJarsSqlShowJars()Parses a show jars statement.SqlShowJobsSqlShowJobs()Parse a "SHOW JOBS" statement.SqlShowModelsSqlShowModels()SHOW MODELS [FROM [catalog.] database] sql call.SqlShowModulesSqlShowModules()Parses a show modules statement.SqlShowPartitionsSqlShowPartitions()SHOW PARTITIONS table_name [PARTITION partition_spec];SqlShowProceduresSqlShowProcedures()Parses a show functions statement.SqlShowTablesSqlShowTables()Parses a show tables statement.SqlShowViewsSqlShowViews()SHOW VIEWS FROM [catalog.] database sql call.org.apache.calcite.sql.SqlNodeSqlStatementSet()Parse a statement set.org.apache.calcite.sql.SqlNodeSqlStmt()Parses an SQL statement.org.apache.calcite.sql.SqlNodeSqlStmtEof()Parses an SQL statement followed by the end-of-file symbol.org.apache.calcite.sql.SqlNodeListSqlStmtList()Parses a list of SQL statements separated by semicolon.SqlStopJobSqlStopJob()Parses a STOP JOB statement: STOP JOB[ ] [ ]; SqlTableLikeSqlTableLike(org.apache.calcite.sql.parser.SqlParserPos startPos)SqlTableLike.SqlTableLikeOptionSqlTableLikeOption()SqlTruncateTableSqlTruncateTable()Parses a TRUNCATE TABLE statement.org.apache.calcite.sql.SqlTypeNameSpecSqlTypeName(org.apache.calcite.sql.parser.Span s)org.apache.calcite.sql.SqlTypeNameSpecSqlTypeName1(org.apache.calcite.sql.parser.Span s)org.apache.calcite.sql.SqlTypeNameSpecSqlTypeName2(org.apache.calcite.sql.parser.Span s)org.apache.calcite.sql.SqlTypeNameSpecSqlTypeName3(org.apache.calcite.sql.parser.Span s)SqlUnloadModuleSqlUnloadModule()Parses an unload module statement.org.apache.calcite.sql.SqlNodeSqlUpdate()Parses an UPDATE statement.SqlUseCatalogSqlUseCatalog()SqlUseDatabaseSqlUseDatabase()SqlUseModulesSqlUseModules()Parses an use modules statement.org.apache.calcite.sql.SqlNodeStandardFloorCeilOptions(org.apache.calcite.sql.parser.Span s, boolean floorFlag)org.apache.calcite.sql.SqlCallStringAggFunctionCall()Parses a call to the STRING_AGG aggregate function (or to an aggregate function with similar syntax: ARRAY_AGG, ARRAY_CONCAT_AGG, GROUP_CONCAT).org.apache.calcite.sql.SqlNodeStringLiteral()Parses a string literal.org.apache.calcite.sql.SqlNodeListSubsetDefinitionCommaList(org.apache.calcite.sql.parser.Span s)voidswitchTo(org.apache.calcite.sql.parser.SqlAbstractParserImpl.LexicalState state)org.apache.calcite.sql.SqlIdentifierTableApiIdentifier()Those methods should not be used in SQL.voidTableApiIdentifierSegment(List<String> names, List<org.apache.calcite.sql.parser.SqlParserPos> positions)voidTableColumn(SqlCreateTable.TableCreationContext context)voidTableColumnsOrIdentifiers(org.apache.calcite.sql.parser.SqlParserPos pos, SqlCreateTable.TableCreationContext ctx)SqlTableConstraintTableConstraint()Parses a table constraint for CREATE TABLE.org.apache.calcite.sql.SqlNodeTableConstructor()Parses a VALUES leaf query expression.org.apache.calcite.sql.SqlNodeTableFunctionCall()org.apache.calcite.sql.SqlNodeTableHints(org.apache.calcite.sql.SqlIdentifier tableName)Parses hints following a table reference, and returns the wrapped table reference.org.apache.calcite.sql.SqlNodeTableOption()org.apache.calcite.sql.SqlNodeTableOverOpt()Allows an OVER clause following a table expression as an extension to standard SQL syntax.org.apache.calcite.sql.SqlNodeTableParam()Table parameter of a table function.org.apache.calcite.sql.SqlNodeTableRef()Parses a table reference in a FROM clause, not lateral unless LATERAL is explicitly specified.org.apache.calcite.sql.SqlNodeTableRef1(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)org.apache.calcite.sql.SqlNodeTableRef2(boolean lateral)Parses a table reference in a FROM clause.org.apache.calcite.sql.SqlNodeTableRef3(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext, boolean lateral)org.apache.calcite.sql.SqlNodeTablesample(org.apache.calcite.sql.SqlNode tableRef)org.apache.calcite.sql.SqlCallTimeDiffFunctionCall()Parses a call to BigQuery's TIME_DIFF.org.apache.calcite.sql.SqlCallTimestampAddFunctionCall()Parses a call to TIMESTAMPADD.org.apache.calcite.sql.SqlCallTimestampDiff3FunctionCall()Parses a call to BigQuery's TIMESTAMP_DIFF.org.apache.calcite.sql.SqlCallTimestampDiffFunctionCall()Parses a call to TIMESTAMPDIFF.org.apache.calcite.sql.SqlCallTimestampTruncFunctionCall()Parses a call to TIMESTAMP_TRUNC.org.apache.calcite.sql.SqlCallTimeTruncFunctionCall()Parses a call to TIME_TRUNC.org.apache.calcite.sql.SqlIntervalQualifierTimeUnit()Parses a built-in time unit (e.g.org.apache.calcite.sql.SqlIntervalQualifierTimeUnitOrName()Parses a built-in time unit (e.g.booleanTimeZoneOpt()Parse a time zone suffix for DateTime types.org.apache.calcite.sql.SqlNodeTryCastFunctionCall()Parses a TRY_CAST invocation.SqlTableColumnTypedColumn(SqlCreateTable.TableCreationContext context)Parsescolumn_name column_data_type [...].org.apache.calcite.sql.SqlTypeNameSpecTypeName()org.apache.calcite.sql.SqlLiteralUniqueSpec()org.apache.calcite.sql.SqlNodeUnpivot(org.apache.calcite.sql.SqlNode tableRef)Parses an UNPIVOT clause following a table expression.List<org.apache.calcite.sql.SqlNode>UnquantifiedFunctionParameterList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext)Parses function parameter lists.intUnsignedIntLiteral()org.apache.calcite.sql.SqlNumericLiteralUnsignedNumericLiteral()Parses a unsigned numeric literalorg.apache.calcite.sql.SqlNodeUnsignedNumericLiteralOrParam()Numeric literal or parameter; used in LIMIT, OFFSET and FETCH clauses.voidUnusedExtension()Defines a production which can never be accepted by the parser.voidWatermark(SqlCreateTable.TableCreationContext context)org.apache.calcite.avatica.util.TimeUnitWeek()StringweekdayName()org.apache.calcite.sql.SqlUpdateWhenMatchedClause(org.apache.calcite.sql.SqlNode table, org.apache.calcite.sql.SqlIdentifier alias)org.apache.calcite.sql.SqlInsertWhenNotMatchedClause(org.apache.calcite.sql.SqlNode table)org.apache.calcite.sql.SqlNodeWhere()Parses a WHERE clause for SELECT, DELETE, and UPDATE.org.apache.calcite.sql.SqlNodeListWindow()Parses a WINDOW clause for SELECT.org.apache.calcite.sql.SqlNodeWindowRange()org.apache.calcite.sql.SqlWindowWindowSpecification()Parses a window specification.org.apache.calcite.sql.SqlCallwithinDistinct(org.apache.calcite.sql.SqlNode arg)org.apache.calcite.sql.SqlCallwithinGroup(org.apache.calcite.sql.SqlNode arg)org.apache.calcite.sql.SqlNodeListWithList()org.apache.calcite.avatica.util.TimeUnitYear()
-
-
-
Field Detail
-
FACTORY
public static final org.apache.calcite.sql.parser.SqlParserImplFactory FACTORY
SqlParserImplFactoryimplementation for creating parser.
-
token_source
public FlinkSqlParserImplTokenManager token_source
-
token
public Token token
-
jj_nt
public Token jj_nt
-
lookingAhead
public boolean lookingAhead
-
-
Constructor Detail
-
FlinkSqlParserImpl
public FlinkSqlParserImpl(InputStream stream)
-
FlinkSqlParserImpl
public FlinkSqlParserImpl(InputStream stream, String encoding)
-
FlinkSqlParserImpl
public FlinkSqlParserImpl(Reader stream)
-
FlinkSqlParserImpl
public FlinkSqlParserImpl(FlinkSqlParserImplTokenManager tm)
-
-
Method Detail
-
normalizeException
public org.apache.calcite.sql.parser.SqlParseException normalizeException(Throwable ex)
- Specified by:
normalizeExceptionin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
getMetadata
public org.apache.calcite.sql.parser.SqlAbstractParserImpl.Metadata getMetadata()
- Specified by:
getMetadatain classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
setTabSize
public void setTabSize(int tabSize)
- Specified by:
setTabSizein classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
switchTo
public void switchTo(org.apache.calcite.sql.parser.SqlAbstractParserImpl.LexicalState state)
- Specified by:
switchToin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
setQuotedCasing
public void setQuotedCasing(org.apache.calcite.avatica.util.Casing quotedCasing)
- Specified by:
setQuotedCasingin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
setUnquotedCasing
public void setUnquotedCasing(org.apache.calcite.avatica.util.Casing unquotedCasing)
- Specified by:
setUnquotedCasingin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
setIdentifierMaxLength
public void setIdentifierMaxLength(int identifierMaxLength)
- Specified by:
setIdentifierMaxLengthin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
setConformance
public void setConformance(org.apache.calcite.sql.validate.SqlConformance conformance)
- Specified by:
setConformancein classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
parseSqlExpressionEof
public org.apache.calcite.sql.SqlNode parseSqlExpressionEof() throws Exception- Specified by:
parseSqlExpressionEofin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl- Throws:
Exception
-
parseSqlStmtEof
public org.apache.calcite.sql.SqlNode parseSqlStmtEof() throws Exception- Specified by:
parseSqlStmtEofin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl- Throws:
Exception
-
parseSqlStmtList
public org.apache.calcite.sql.SqlNodeList parseSqlStmtList() throws Exception- Specified by:
parseSqlStmtListin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl- Throws:
Exception
-
parseArray
public org.apache.calcite.sql.SqlNode parseArray() throws org.apache.calcite.sql.parser.SqlParseException- Specified by:
parseArrayin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl- Throws:
org.apache.calcite.sql.parser.SqlParseException
-
ExtendedTableRef
public final org.apache.calcite.sql.SqlNode ExtendedTableRef() throws ParseExceptionAllows parser to be extended with new types of table references. The default implementation of this production is empty.- Throws:
ParseException
-
TableOverOpt
public final org.apache.calcite.sql.SqlNode TableOverOpt() throws ParseExceptionAllows an OVER clause following a table expression as an extension to standard SQL syntax. The default implementation of this production is empty.- Throws:
ParseException
-
SqlSelectKeywords
public final void SqlSelectKeywords(List<org.apache.calcite.sql.SqlLiteral> keywords) throws ParseException
- Throws:
ParseException
-
SqlInsertKeywords
public final void SqlInsertKeywords(List<org.apache.calcite.sql.SqlLiteral> keywords) throws ParseException
- Throws:
ParseException
-
FloorCeilOptions
public final org.apache.calcite.sql.SqlNode FloorCeilOptions(org.apache.calcite.sql.parser.Span s, boolean floorFlag) throws ParseException- Throws:
ParseException
-
getPos
protected org.apache.calcite.sql.parser.SqlParserPos getPos() throws ParseException- Specified by:
getPosin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl- Throws:
ParseException
-
ExprOrJoinOrOrderedQuery
public final org.apache.calcite.sql.SqlNode ExprOrJoinOrOrderedQuery(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionSyntactical Descriptions *- Throws:
ParseException
-
OrderedQueryOrExpr
public final org.apache.calcite.sql.SqlNode OrderedQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses either a row expression or a query expression with an optional ORDER BY.Postgres syntax for limit:
[ LIMIT { count | ALL } ] [ OFFSET start ]Trino syntax for limit:
[ OFFSET start ] [ LIMIT { count | ALL } ]MySQL syntax for limit:
[ LIMIT { count | start, count } ]SQL:2008 syntax for limit:
[ OFFSET start { ROW | ROWS } ] [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]- Throws:
ParseException
-
OrderByLimitOpt
public final org.apache.calcite.sql.SqlNode OrderByLimitOpt(org.apache.calcite.sql.SqlNode e) throws ParseExceptionReads optional "ORDER BY", "LIMIT", "OFFSET", "FETCH" following a query,e. If any of them are present, adds them to the query; otherwise returns the query unchanged. Throws if they are present andeis not a query.- Throws:
ParseException
-
OffsetClause
public final void OffsetClause(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.SqlNode[] offsetFetch) throws ParseExceptionParses an OFFSET clause in an ORDER BY expression.- Throws:
ParseException
-
FetchClause
public final void FetchClause(org.apache.calcite.sql.SqlNode[] offsetFetch) throws ParseExceptionParses a FETCH clause in an ORDER BY expression.- Throws:
ParseException
-
LimitClause
public final void LimitClause(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.SqlNode[] offsetFetch) throws ParseExceptionParses a LIMIT clause in an ORDER BY expression.- Throws:
ParseException
-
LeafQuery
public final org.apache.calcite.sql.SqlNode LeafQuery(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a leaf in a query expression (SELECT, VALUES or TABLE).- Throws:
ParseException
-
ParenthesizedExpression
public final org.apache.calcite.sql.SqlNode ParenthesizedExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a parenthesized query or single row expression. Depending onexprContext, may also accept a join.- Throws:
ParseException
-
ParenthesizedQueryOrCommaList
public final org.apache.calcite.sql.SqlNodeList ParenthesizedQueryOrCommaList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a parenthesized query or comma-list of row expressions.REVIEW jvs 8-Feb-2004: There's a small hole in this production. It can be used to construct something like
WHERE x IN (select count(*) from t where c=d,5)
which should be illegal. The above is interpreted as equivalent to
WHERE x IN ((select count(*) from t where c=d),5)
which is a legal use of a sub-query. The only way to fix the hole is to be able to remember whether a subexpression was parenthesized or not, which means preserving parentheses in the SqlNode tree. This is probably desirable anyway for use in purely syntactic parsing applications (e.g. SQL pretty-printer). However, if this is done, it's important to also make isA() on the paren node call down to its operand so that we can always correctly discriminate a query from a row expression.
- Throws:
ParseException
-
ParenthesizedQueryOrCommaListWithDefault
public final org.apache.calcite.sql.SqlNodeList ParenthesizedQueryOrCommaListWithDefault(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionAs ParenthesizedQueryOrCommaList, but allows DEFAULT in place of any of the expressions. For example,(x, DEFAULT, null, DEFAULT).- Throws:
ParseException
-
UnquantifiedFunctionParameterList
public final List<org.apache.calcite.sql.SqlNode> UnquantifiedFunctionParameterList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Parses function parameter lists. If the list starts with DISTINCT or ALL, it is discarded.- Throws:
ParseException
-
FunctionParameterList
public final List<org.apache.calcite.sql.SqlNode> FunctionParameterList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Parses function parameter lists including DISTINCT keyword recognition, DEFAULT, and named argument assignment.- Throws:
ParseException
-
AllOrDistinct
public final org.apache.calcite.sql.SqlLiteral AllOrDistinct() throws ParseException- Throws:
ParseException
-
AddArg0
public final void AddArg0(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
- Throws:
ParseException
-
AddArg
public final void AddArg(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
- Throws:
ParseException
-
Default
public final org.apache.calcite.sql.SqlNode Default() throws ParseException- Throws:
ParseException
-
SqlQueryEof
public final org.apache.calcite.sql.SqlNode SqlQueryEof() throws ParseExceptionParses a query (SELECT, UNION, INTERSECT, EXCEPT, VALUES, TABLE) followed by the end-of-file symbol.- Throws:
ParseException
-
SqlStmtList
public final org.apache.calcite.sql.SqlNodeList SqlStmtList() throws ParseExceptionParses a list of SQL statements separated by semicolon. The semicolon is required between statements, but is optional at the end.- Throws:
ParseException
-
SqlStmt
public final org.apache.calcite.sql.SqlNode SqlStmt() throws ParseExceptionParses an SQL statement.- Throws:
ParseException
-
SqlStmtEof
public final org.apache.calcite.sql.SqlNode SqlStmtEof() throws ParseExceptionParses an SQL statement followed by the end-of-file symbol.- Throws:
ParseException
-
IfExistsOpt
public final boolean IfExistsOpt() throws ParseExceptionParses a "IF EXISTS" option, default is false.- Throws:
ParseException
-
IfNotExistsOpt
public final boolean IfNotExistsOpt() throws ParseExceptionParses a "IF NOT EXISTS" option, default is false.- Throws:
ParseException
-
SqlShowCatalogs
public final SqlShowCatalogs SqlShowCatalogs() throws ParseException
Parse a "Show Catalogs" metadata query command.- Throws:
ParseException
-
SqlShowCurrentCatalogOrDatabase
public final org.apache.calcite.sql.SqlCall SqlShowCurrentCatalogOrDatabase() throws ParseException- Throws:
ParseException
-
SqlDescribeCatalog
public final SqlDescribeCatalog SqlDescribeCatalog() throws ParseException
Parse a "DESCRIBE CATALOG" metadata query command. { DESCRIBE | DESC } CATALOG [EXTENDED] catalog_name;- Throws:
ParseException
-
SqlUseCatalog
public final SqlUseCatalog SqlUseCatalog() throws ParseException
- Throws:
ParseException
-
SqlCreateCatalog
public final org.apache.calcite.sql.SqlCreate SqlCreateCatalog(org.apache.calcite.sql.parser.Span s, boolean replace) throws ParseExceptionParses a create catalog statement. CREATE CATALOG [IF NOT EXISTS] catalog_name [COMMENT 'comment_value'] [WITH (property_name=property_value, ...)];- Throws:
ParseException
-
SqlDropCatalog
public final org.apache.calcite.sql.SqlDrop SqlDropCatalog(org.apache.calcite.sql.parser.Span s, boolean replace) throws ParseException- Throws:
ParseException
-
SqlAlterCatalog
public final SqlAlterCatalog SqlAlterCatalog() throws ParseException
Parses an alter catalog statement.- Throws:
ParseException
-
SqlShowDatabases
public final SqlShowDatabases SqlShowDatabases() throws ParseException
Parse a "Show DATABASES" metadata query command.- Throws:
ParseException
-
SqlUseDatabase
public final SqlUseDatabase SqlUseDatabase() throws ParseException
- Throws:
ParseException
-
SqlCreateDatabase
public final org.apache.calcite.sql.SqlCreate SqlCreateDatabase(org.apache.calcite.sql.parser.Span s, boolean replace) throws ParseExceptionParses a create database statement.CREATE DATABASE database_name [COMMENT database_comment] [WITH (property_name=property_value, ...)].- Throws:
ParseException
-
SqlAlterDatabase
public final SqlAlterDatabase SqlAlterDatabase() throws ParseException
- Throws:
ParseException
-
SqlDropDatabase
public final org.apache.calcite.sql.SqlDrop SqlDropDatabase(org.apache.calcite.sql.parser.Span s, boolean replace) throws ParseException- Throws:
ParseException
-
SqlDescribeDatabase
public final SqlDescribeDatabase SqlDescribeDatabase() throws ParseException
- Throws:
ParseException
-
SqlCreateFunction
public final org.apache.calcite.sql.SqlCreate SqlCreateFunction(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseException- Throws:
ParseException
-
SqlResourceInfo
public final SqlResource SqlResourceInfo() throws ParseException
Parse resource type and path.- Throws:
ParseException
-
SqlDropFunction
public final org.apache.calcite.sql.SqlDrop SqlDropFunction(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseException- Throws:
ParseException
-
SqlAlterFunction
public final SqlAlterFunction SqlAlterFunction() throws ParseException
- Throws:
ParseException
-
SqlShowFunctions
public final SqlShowFunctions SqlShowFunctions() throws ParseException
Parses a show functions statement. SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) pattern;- Throws:
ParseException
-
SqlShowProcedures
public final SqlShowProcedures SqlShowProcedures() throws ParseException
Parses a show functions statement. SHOW PROCEDURES [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) pattern;- Throws:
ParseException
-
SqlShowViews
public final SqlShowViews SqlShowViews() throws ParseException
SHOW VIEWS FROM [catalog.] database sql call.- Throws:
ParseException
-
SqlShowTables
public final SqlShowTables SqlShowTables() throws ParseException
Parses a show tables statement. SHOW TABLES [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] LIKE pattern ];- Throws:
ParseException
-
SqlShowColumns
public final SqlShowColumns SqlShowColumns() throws ParseException
SHOW COLUMNS FROM [[catalog.] database.]sqlIdentifier sql call.- Throws:
ParseException
-
SqlShowCreate
public final SqlShowCreate SqlShowCreate() throws ParseException
Parse a "Show Create Table" query and "Show Create View" and "Show Create Catalog" query commands.- Throws:
ParseException
-
SqlRichDescribeFunction
public final SqlRichDescribeFunction SqlRichDescribeFunction() throws ParseException
DESCRIBE | DESC FUNCTION [ EXTENDED] [[catalogName.] dataBasesName].functionName sql call. Here we add Rich in className to match the naming of SqlRichDescribeTable.- Throws:
ParseException
-
SqlRichDescribeModel
public final SqlRichDescribeModel SqlRichDescribeModel() throws ParseException
DESCRIBE | DESC MODEL [ EXTENDED] [[catalogName.] dataBasesName].modelName sql call. Here we add Rich in className to match the naming of SqlRichDescribeTable.- Throws:
ParseException
-
SqlRichDescribeTable
public final SqlRichDescribeTable SqlRichDescribeTable() throws ParseException
DESCRIBE | DESC [ EXTENDED] [[catalogName.] dataBasesName].tableName sql call. Here we add Rich in className to distinguish from calcite's original SqlDescribeTable.- Throws:
ParseException
-
SqlAlterTable
public final SqlAlterTable SqlAlterTable() throws ParseException
- Throws:
ParseException
-
PropertyKeys
public final org.apache.calcite.sql.SqlNodeList PropertyKeys() throws ParseExceptionParse a table option key list.- Throws:
ParseException
-
TableColumn
public final void TableColumn(SqlCreateTable.TableCreationContext context) throws ParseException
- Throws:
ParseException
-
Watermark
public final void Watermark(SqlCreateTable.TableCreationContext context) throws ParseException
- Throws:
ParseException
-
TypedColumn
public final SqlTableColumn TypedColumn(SqlCreateTable.TableCreationContext context) throws ParseException
Parsescolumn_name column_data_type [...].- Throws:
ParseException
-
ComputedColumn
public final SqlTableColumn ComputedColumn(SqlCreateTable.TableCreationContext context) throws ParseException
Parsescolumn_name AS expr [COMMENT 'comment'].- Throws:
ParseException
-
MetadataColumn
public final SqlTableColumn MetadataColumn(SqlCreateTable.TableCreationContext context, org.apache.calcite.sql.SqlIdentifier name, org.apache.calcite.sql.SqlDataTypeSpec type) throws ParseException
Parsescolumn_name column_data_type METADATA [FROM 'alias_name'] [VIRTUAL] [COMMENT 'comment'].- Throws:
ParseException
-
RegularColumn
public final SqlTableColumn RegularColumn(SqlCreateTable.TableCreationContext context, org.apache.calcite.sql.SqlIdentifier name, org.apache.calcite.sql.SqlDataTypeSpec type) throws ParseException
Parsescolumn_name column_data_type [constraint] [COMMENT 'comment'].- Throws:
ParseException
-
AlterTableAddPartition
public final void AlterTableAddPartition(SqlAddPartitions.AlterTableAddPartitionContext context) throws ParseException
ParsesALTER TABLE table_name ADD [IF NOT EXISTS] PARTITION partition_spec [PARTITION partition_spec][...].- Throws:
ParseException
-
AlterTableAddOrModify
public final void AlterTableAddOrModify(SqlAlterTable.AlterTableContext context) throws ParseException
ParsesALTER TABLE table_name ADD/MODIFY [...].- Throws:
ParseException
-
AddOrModifyColumn
public final void AddOrModifyColumn(SqlAlterTable.AlterTableContext context) throws ParseException
ParsesADD/MODIFY column_name column_data_type [...].- Throws:
ParseException
-
AlterTableDropPartitions
public final void AlterTableDropPartitions(SqlDropPartitions.AlterTableDropPartitionsContext context) throws ParseException
ParsesALTER TABLE table_name DROP [IF EXISTS] PARTITION partition_spec[, PARTITION partition_spec, ...].- Throws:
ParseException
-
ExtendedDataType
public final org.apache.calcite.sql.SqlDataTypeSpec ExtendedDataType() throws ParseExceptionDifferent withDataType(), we support a [ NULL | NOT NULL ] suffix syntax for both the collection element data type and the data type itself.See
#SqlDataTypeSpecfor the syntax details ofDataType().- Throws:
ParseException
-
ColumnConstraint
public final SqlTableConstraint ColumnConstraint(org.apache.calcite.sql.SqlIdentifier column) throws ParseException
Parses a column constraint for CREATE TABLE.- Throws:
ParseException
-
TableConstraint
public final SqlTableConstraint TableConstraint() throws ParseException
Parses a table constraint for CREATE TABLE.- Throws:
ParseException
-
ConstraintName
public final org.apache.calcite.sql.SqlIdentifier ConstraintName() throws ParseException- Throws:
ParseException
-
UniqueSpec
public final org.apache.calcite.sql.SqlLiteral UniqueSpec() throws ParseException- Throws:
ParseException
-
ConstraintEnforcement
public final org.apache.calcite.sql.SqlLiteral ConstraintEnforcement() throws ParseException- Throws:
ParseException
-
TableOption
public final org.apache.calcite.sql.SqlNode TableOption() throws ParseException- Throws:
ParseException
-
Properties
public final org.apache.calcite.sql.SqlNodeList Properties() throws ParseExceptionParse properties such as ('k' = 'v').- Throws:
ParseException
-
IntoBuckets
public final org.apache.calcite.sql.SqlNumericLiteral IntoBuckets(org.apache.calcite.sql.parser.SqlParserPos startPos) throws ParseException- Throws:
ParseException
-
SqlDistribution
public final SqlDistribution SqlDistribution(org.apache.calcite.sql.parser.SqlParserPos startPos) throws ParseException
- Throws:
ParseException
-
SqlCreateTable
public final org.apache.calcite.sql.SqlCreate SqlCreateTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseException- Throws:
ParseException
-
SqlTableLike
public final SqlTableLike SqlTableLike(org.apache.calcite.sql.parser.SqlParserPos startPos) throws ParseException
- Throws:
ParseException
-
SqlTableLikeOption
public final SqlTableLike.SqlTableLikeOption SqlTableLikeOption() throws ParseException
- Throws:
ParseException
-
SqlDropTable
public final org.apache.calcite.sql.SqlDrop SqlDropTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseException- Throws:
ParseException
-
TableColumnsOrIdentifiers
public final void TableColumnsOrIdentifiers(org.apache.calcite.sql.parser.SqlParserPos pos, SqlCreateTable.TableCreationContext ctx) throws ParseException- Throws:
ParseException
-
AddCompoundColumnIdentifier
public final void AddCompoundColumnIdentifier(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
SqlReplaceTable
public final org.apache.calcite.sql.SqlNode SqlReplaceTable() throws ParseExceptionParser a REPLACE TABLE AS statement- Throws:
ParseException
-
SqlCreateMaterializedTable
public final org.apache.calcite.sql.SqlCreate SqlCreateMaterializedTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseExceptionParses a CREATE MATERIALIZED TABLE statement.- Throws:
ParseException
-
SqlDropMaterializedTable
public final org.apache.calcite.sql.SqlDrop SqlDropMaterializedTable(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseExceptionParses a DROP MATERIALIZED TABLE statement.- Throws:
ParseException
-
SqlAlterMaterializedTable
public final SqlAlterMaterializedTable SqlAlterMaterializedTable() throws ParseException
Parses alter materialized table.- Throws:
ParseException
-
RichSqlInsert
public final org.apache.calcite.sql.SqlNode RichSqlInsert() throws ParseExceptionParses an INSERT statement.- Throws:
ParseException
-
PartitionSpecCommaList
public final void PartitionSpecCommaList(org.apache.calcite.sql.SqlNodeList list) throws ParseExceptionParses a partition specifications statement, e.g. insert into tbl1 partition(col1='val1', col2='val2') select col3 from tbl.- Throws:
ParseException
-
SqlCreateView
public final org.apache.calcite.sql.SqlCreate SqlCreateView(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseExceptionParses a create view or temporary view statement. CREATE [OR REPLACE] [TEMPORARY] VIEW [IF NOT EXISTS] view_name [ (field1, field2 ...) ] AS select_statement We only support [IF NOT EXISTS] semantic in Flink although the parser supports [OR REPLACE] grammar. See: FLINK-17067- Throws:
ParseException
-
SqlDropView
public final org.apache.calcite.sql.SqlDrop SqlDropView(org.apache.calcite.sql.parser.Span s, boolean replace, boolean isTemporary) throws ParseException- Throws:
ParseException
-
SqlAlterView
public final SqlAlterView SqlAlterView() throws ParseException
- Throws:
ParseException
-
ExtendedSqlBasicTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec ExtendedSqlBasicTypeName() throws ParseExceptionA sql type name extended basic data type, it has a counterpart basic sql type name but always represents as a special alias compared with the standard name.For example: 1. STRING is synonym of VARCHAR(INT_MAX), 2. BYTES is synonym of VARBINARY(INT_MAX), 3. TIMESTAMP_LTZ(precision) is synonym of TIMESTAMP(precision) WITH LOCAL TIME ZONE.
- Throws:
ParseException
-
CustomizedCollectionsTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec CustomizedCollectionsTypeName() throws ParseException- Throws:
ParseException
-
ExtendedCollectionsTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec ExtendedCollectionsTypeName(org.apache.calcite.sql.SqlTypeNameSpec elementTypeName, boolean elementNullable) throws ParseExceptionParse a collection type name, the input element type name may also be a collection type. Different with #CollectionsTypeName, the element type can have a [ NULL | NOT NULL ] suffix, default is NULL(nullable).- Throws:
ParseException
-
SqlMapTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec SqlMapTypeName() throws ParseExceptionParses a SQL map type, e.g. MAP<INT NOT NULL, VARCHAR NULL>.- Throws:
ParseException
-
SqlRawTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec SqlRawTypeName() throws ParseExceptionParses a SQL raw type such asRAW('org.my.Class', 'sW3Djsds...').- Throws:
ParseException
-
ExtendedFieldNameTypeCommaList
public final void ExtendedFieldNameTypeCommaList(List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes, List<org.apache.calcite.sql.SqlCharStringLiteral> comments) throws ParseException
Parse a "name1 type1 [ NULL | NOT NULL] [ comment ] [, name2 type2 [ NULL | NOT NULL] [ comment ] ]* ..." list. The comment and NULL syntax doest not belong to standard SQL.- Throws:
ParseException
-
ExtendedSqlRowTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec ExtendedSqlRowTypeName() throws ParseExceptionParse Row type, we support both Row(name1 type1, name2 type2) and Row<name1 type1, name2 type2>. Every item type can have a suffix of `NULL` or `NOT NULL` to indicate if this type is nullable. i.e. Row(f0 int not null, f1 varchar null). Default is nullable.The difference with
#SqlRowTypeName():- Support comment syntax for every field
- Field data type default is nullable
- Support ROW type with empty fields, e.g. ROW()
- Throws:
ParseException
-
TableApiIdentifier
public final org.apache.calcite.sql.SqlIdentifier TableApiIdentifier() throws ParseExceptionThose methods should not be used in SQL. They are good for parsing identifiers in Table API. The difference between those identifiers and CompoundIdentifer is that the Table API identifiers ignore any keywords. They are also strictly limited to three part identifiers. The quoting still works the same way.- Throws:
ParseException
-
TableApiIdentifierSegment
public final void TableApiIdentifierSegment(List<String> names, List<org.apache.calcite.sql.parser.SqlParserPos> positions) throws ParseException
- Throws:
ParseException
-
SqlCreateExtended
public final org.apache.calcite.sql.SqlCreate SqlCreateExtended(org.apache.calcite.sql.parser.Span s, boolean replace) throws ParseException- Throws:
ParseException
-
SqlDropExtended
public final org.apache.calcite.sql.SqlDrop SqlDropExtended(org.apache.calcite.sql.parser.Span s, boolean replace) throws ParseException- Throws:
ParseException
-
SqlShowPartitions
public final SqlShowPartitions SqlShowPartitions() throws ParseException
SHOW PARTITIONS table_name [PARTITION partition_spec];- Throws:
ParseException
-
SqlLoadModule
public final SqlLoadModule SqlLoadModule() throws ParseException
Parses a load module statement. LOAD MODULE module_name [WITH (property_name=property_value, ...)];- Throws:
ParseException
-
SqlUnloadModule
public final SqlUnloadModule SqlUnloadModule() throws ParseException
Parses an unload module statement. UNLOAD MODULE module_name;- Throws:
ParseException
-
SqlUseModules
public final SqlUseModules SqlUseModules() throws ParseException
Parses an use modules statement. USE MODULES module_name1 [, module_name2, ...];- Throws:
ParseException
-
SqlShowModules
public final SqlShowModules SqlShowModules() throws ParseException
Parses a show modules statement. SHOW [FULL] MODULES;- Throws:
ParseException
-
SqlBeginStatementSet
public final SqlBeginStatementSet SqlBeginStatementSet() throws ParseException
Parse a start statement set statement. BEGIN STATEMENT SET;- Throws:
ParseException
-
SqlEndStatementSet
public final SqlEndStatementSet SqlEndStatementSet() throws ParseException
Parse a end statement set statement. END;- Throws:
ParseException
-
SqlStatementSet
public final org.apache.calcite.sql.SqlNode SqlStatementSet() throws ParseExceptionParse a statement set. STATEMENT SET BEGIN (RichSqlInsert();)+ END- Throws:
ParseException
-
SqlRichExplain
public final org.apache.calcite.sql.SqlNode SqlRichExplain() throws ParseExceptionParses an explain module statement.- Throws:
ParseException
-
SqlExecute
public final org.apache.calcite.sql.SqlNode SqlExecute() throws ParseExceptionParses an execute statement.- Throws:
ParseException
-
SqlExecutePlan
public final org.apache.calcite.sql.SqlNode SqlExecutePlan() throws ParseExceptionParses an execute plan statement.- Throws:
ParseException
-
SqlCompileAndExecutePlan
public final org.apache.calcite.sql.SqlNode SqlCompileAndExecutePlan() throws ParseExceptionParses a compile plan statement.- Throws:
ParseException
-
SqlCompilePlan
public final org.apache.calcite.sql.SqlNode SqlCompilePlan() throws ParseExceptionParses a compile plan statement.- Throws:
ParseException
-
ParseExplainDetail
public final void ParseExplainDetail(Set<String> explainDetails) throws ParseException
- Throws:
ParseException
-
SqlAddJar
public final SqlAddJar SqlAddJar() throws ParseException
Parses an ADD JAR statement.- Throws:
ParseException
-
SqlRemoveJar
public final SqlRemoveJar SqlRemoveJar() throws ParseException
Parses a remove jar statement. REMOVE JAR jar_path;- Throws:
ParseException
-
SqlShowJars
public final SqlShowJars SqlShowJars() throws ParseException
Parses a show jars statement. SHOW JARS;- Throws:
ParseException
-
SqlSet
public final org.apache.calcite.sql.SqlNode SqlSet() throws ParseException- Throws:
ParseException
-
SqlReset
public final org.apache.calcite.sql.SqlNode SqlReset() throws ParseExceptionParses a RESET statement: RESET ['key'];- Throws:
ParseException
-
TryCastFunctionCall
public final org.apache.calcite.sql.SqlNode TryCastFunctionCall() throws ParseExceptionParses a TRY_CAST invocation.- Throws:
ParseException
-
PartitionSpecProperty
public final SqlPartitionSpecProperty PartitionSpecProperty() throws ParseException
Parses a partition key/value, e.g. p or p = '10'.- Throws:
ParseException
-
ExtendedPartitionSpecCommaList
public final void ExtendedPartitionSpecCommaList(org.apache.calcite.sql.SqlNodeList list) throws ParseExceptionParses a partition specifications statement, e.g. ANALYZE TABLE tbl1 partition(col1='val1', col2='val2') xxx or ANALYZE TABLE tbl1 partition(col1, col2) xxx. or ANALYZE TABLE tbl1 partition(col1='val1', col2) xxx.- Throws:
ParseException
-
SimpleIdentifierCommaListWithPosition
public final org.apache.calcite.sql.SqlNodeList SimpleIdentifierCommaListWithPosition() throws ParseExceptionParses a comma-separated list of simple identifiers with position.- Throws:
ParseException
-
SqlAnalyzeTable
public final org.apache.calcite.sql.SqlNode SqlAnalyzeTable() throws ParseExceptionParses an ANALYZE TABLE statement.- Throws:
ParseException
-
SqlShowJobs
public final SqlShowJobs SqlShowJobs() throws ParseException
Parse a "SHOW JOBS" statement.- Throws:
ParseException
-
SqlDescribeJob
public final SqlDescribeJob SqlDescribeJob() throws ParseException
Parse a "DESCRIBE JOB" statement: DESCRIBE | DESC JOB- Throws:
ParseException
-
SqlStopJob
public final SqlStopJob SqlStopJob() throws ParseException
Parses a STOP JOB statement: STOP JOB[ ] [ ]; - Throws:
ParseException
-
SqlTruncateTable
public final SqlTruncateTable SqlTruncateTable() throws ParseException
Parses a TRUNCATE TABLE statement.- Throws:
ParseException
-
SqlShowModels
public final SqlShowModels SqlShowModels() throws ParseException
SHOW MODELS [FROM [catalog.] database] sql call.- Throws:
ParseException
-
SqlAlterModel
public final SqlAlterModel SqlAlterModel() throws ParseException
ALTER MODEL [IF EXISTS] modelName SET (property_key = property_val, ...) ALTER MODEL [IF EXISTS] modelName RENAME TO newModelName- Throws:
ParseException
-
SqlDropModel
public final org.apache.calcite.sql.SqlDrop SqlDropModel(org.apache.calcite.sql.parser.Span s, boolean isTemporary) throws ParseExceptionDROP MODEL [IF EXIST] modelName- Throws:
ParseException
-
SqlCreateModel
public final org.apache.calcite.sql.SqlCreate SqlCreateModel(org.apache.calcite.sql.parser.Span s, boolean isTemporary) throws ParseExceptionCREATE MODEL [IF NOT EXIST] modelName [INPUT(col1 type1, col2 type2, ...)] [OUTPUT(col3 type1, col4 type4, ...)] [COMMENT model_comment] WITH (option_key = option_val, ...) [AS SELECT ...]- Throws:
ParseException
-
ParenthesizedKeyValueOptionCommaList
public final org.apache.calcite.sql.SqlNodeList ParenthesizedKeyValueOptionCommaList() throws ParseException- Throws:
ParseException
-
AddKeyValueOption
public final void AddKeyValueOption(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
Parses an option with format key=val whose key is a simple identifier or string literal and value is a string literal.- Throws:
ParseException
-
AddOptionValue
public final void AddOptionValue(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
Parses an option value (either a string or a numeric) and adds to a list.- Throws:
ParseException
-
ParenthesizedLiteralOptionCommaList
public final org.apache.calcite.sql.SqlNodeList ParenthesizedLiteralOptionCommaList() throws ParseExceptionParses a literal list separated by comma. The literal is either a string or a numeric.- Throws:
ParseException
-
AddHint
public final void AddHint(List<org.apache.calcite.sql.SqlNode> hints) throws ParseException
- Throws:
ParseException
-
TableHints
public final org.apache.calcite.sql.SqlNode TableHints(org.apache.calcite.sql.SqlIdentifier tableName) throws ParseExceptionParses hints following a table reference, and returns the wrapped table reference.- Throws:
ParseException
-
SqlSelect
public final org.apache.calcite.sql.SqlSelect SqlSelect() throws ParseExceptionParses a leaf SELECT expression without ORDER BY.- Throws:
ParseException
-
SqlExplain
public final org.apache.calcite.sql.SqlNode SqlExplain() throws ParseExceptionParses an EXPLAIN PLAN statement.- Throws:
ParseException
-
SqlQueryOrDml
public final org.apache.calcite.sql.SqlNode SqlQueryOrDml() throws ParseExceptionParses a query (SELECT or VALUES) or DML statement (INSERT, UPDATE, DELETE, MERGE).- Throws:
ParseException
-
ExplainDepth
public final org.apache.calcite.sql.SqlExplain.Depth ExplainDepth() throws ParseExceptionParses WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION modifier for EXPLAIN PLAN.- Throws:
ParseException
-
ExplainDetailLevel
public final org.apache.calcite.sql.SqlExplainLevel ExplainDetailLevel() throws ParseExceptionParses INCLUDING ALL ATTRIBUTES modifier for EXPLAIN PLAN.- Throws:
ParseException
-
SqlDescribe
public final org.apache.calcite.sql.SqlNode SqlDescribe() throws ParseExceptionParses a DESCRIBE statement.- Throws:
ParseException
-
SqlProcedureCall
public final org.apache.calcite.sql.SqlNode SqlProcedureCall() throws ParseExceptionParses a CALL statement.- Throws:
ParseException
-
NamedRoutineCall
public final org.apache.calcite.sql.SqlNode NamedRoutineCall(org.apache.calcite.sql.SqlFunctionCategory routineType, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException- Throws:
ParseException
-
TableParam
public final org.apache.calcite.sql.SqlNode TableParam() throws ParseExceptionTable parameter of a table function. The input table with set semantics may be partitioned/ordered on one or more columns.- Throws:
ParseException
-
PartitionedQueryOrQueryOrExpr
public final org.apache.calcite.sql.SqlNode PartitionedQueryOrQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException- Throws:
ParseException
-
PartitionedByAndOrderBy
public final org.apache.calcite.sql.SqlNode PartitionedByAndOrderBy(org.apache.calcite.sql.SqlNode e) throws ParseException- Throws:
ParseException
-
OrderByOfSetSemanticsTable
public final org.apache.calcite.sql.SqlNodeList OrderByOfSetSemanticsTable() throws ParseException- Throws:
ParseException
-
CreateSetSemanticsTableIfNeeded
public final org.apache.calcite.sql.SqlNode CreateSetSemanticsTableIfNeeded(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.SqlNode e, org.apache.calcite.sql.SqlNodeList partitionList, org.apache.calcite.sql.SqlNodeList orderList) throws ParseException- Throws:
ParseException
-
SqlInsert
public final org.apache.calcite.sql.SqlNode SqlInsert() throws ParseExceptionParses an INSERT statement.- Throws:
ParseException
-
SqlDelete
public final org.apache.calcite.sql.SqlNode SqlDelete() throws ParseExceptionParses a DELETE statement.- Throws:
ParseException
-
SqlUpdate
public final org.apache.calcite.sql.SqlNode SqlUpdate() throws ParseExceptionParses an UPDATE statement.- Throws:
ParseException
-
SqlMerge
public final org.apache.calcite.sql.SqlNode SqlMerge() throws ParseExceptionParses a MERGE statement.- Throws:
ParseException
-
WhenMatchedClause
public final org.apache.calcite.sql.SqlUpdate WhenMatchedClause(org.apache.calcite.sql.SqlNode table, org.apache.calcite.sql.SqlIdentifier alias) throws ParseException- Throws:
ParseException
-
WhenNotMatchedClause
public final org.apache.calcite.sql.SqlInsert WhenNotMatchedClause(org.apache.calcite.sql.SqlNode table) throws ParseException- Throws:
ParseException
-
AddSelectItem
public final void AddSelectItem(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
Parses one item in a select list.- Throws:
ParseException
-
SelectExpression
public final org.apache.calcite.sql.SqlNode SelectExpression() throws ParseExceptionParses one unaliased expression in a select list.- Throws:
ParseException
-
Natural
public final org.apache.calcite.sql.SqlLiteral Natural() throws ParseException- Throws:
ParseException
-
JoinType
public final org.apache.calcite.sql.SqlLiteral JoinType() throws ParseException- Throws:
ParseException
-
FromClause
public final org.apache.calcite.sql.SqlNode FromClause() throws ParseExceptionParses the FROM clause for a SELECT.FROM is mandatory in standard SQL, optional in dialects such as MySQL, PostgreSQL. The parser allows SELECT without FROM, but the validator fails if conformance is, say, STRICT_2003.
- Throws:
ParseException
-
JoinOrCommaTable
public final org.apache.calcite.sql.SqlNode JoinOrCommaTable(org.apache.calcite.sql.SqlNode e) throws ParseException- Throws:
ParseException
-
JoinTable
public final org.apache.calcite.sql.SqlNode JoinTable(org.apache.calcite.sql.SqlNode e) throws ParseExceptionMatches "LEFT JOIN t ON ...", "RIGHT JOIN t USING ...", "JOIN t".- Throws:
ParseException
-
TableRef
public final org.apache.calcite.sql.SqlNode TableRef() throws ParseExceptionParses a table reference in a FROM clause, not lateral unless LATERAL is explicitly specified.- Throws:
ParseException
-
TableRef1
public final org.apache.calcite.sql.SqlNode TableRef1(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException- Throws:
ParseException
-
TableRef2
public final org.apache.calcite.sql.SqlNode TableRef2(boolean lateral) throws ParseExceptionParses a table reference in a FROM clause.- Throws:
ParseException
-
TableRef3
public final org.apache.calcite.sql.SqlNode TableRef3(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext, boolean lateral) throws ParseException- Throws:
ParseException
-
Tablesample
public final org.apache.calcite.sql.SqlNode Tablesample(org.apache.calcite.sql.SqlNode tableRef) throws ParseException- Throws:
ParseException
-
ExtendTable
public final org.apache.calcite.sql.SqlNode ExtendTable(org.apache.calcite.sql.SqlNode tableRef) throws ParseExceptionWraps a table reference in a call to EXTEND if an optional "EXTEND" clause is present.- Throws:
ParseException
-
ExtendList
public final org.apache.calcite.sql.SqlNodeList ExtendList() throws ParseException- Throws:
ParseException
-
AddColumnType
public final void AddColumnType(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
AddCompoundIdentifierType
public final void AddCompoundIdentifierType(List<org.apache.calcite.sql.SqlNode> list, List<org.apache.calcite.sql.SqlNode> extendList) throws ParseException
Parses a compound identifier with optional type.- Throws:
ParseException
-
ImplicitTableFunctionCallArgs
public final org.apache.calcite.sql.SqlNode ImplicitTableFunctionCallArgs(org.apache.calcite.sql.SqlIdentifier name) throws ParseException- Throws:
ParseException
-
TableFunctionCall
public final org.apache.calcite.sql.SqlNode TableFunctionCall() throws ParseException- Throws:
ParseException
-
ExplicitTable
public final org.apache.calcite.sql.SqlNode ExplicitTable(org.apache.calcite.sql.parser.SqlParserPos pos) throws ParseExceptionParses an explicit TABLE t reference.- Throws:
ParseException
-
TableConstructor
public final org.apache.calcite.sql.SqlNode TableConstructor() throws ParseExceptionParses a VALUES leaf query expression.- Throws:
ParseException
-
AddRowConstructor
public final void AddRowConstructor(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
Parses a row constructor and adds it to a list.- Throws:
ParseException
-
RowConstructor
public final org.apache.calcite.sql.SqlNode RowConstructor() throws ParseExceptionParses a row constructor in the context of a VALUES expression.- Throws:
ParseException
-
Where
public final org.apache.calcite.sql.SqlNode Where() throws ParseExceptionParses a WHERE clause for SELECT, DELETE, and UPDATE.- Throws:
ParseException
-
GroupBy
public final org.apache.calcite.sql.SqlNodeList GroupBy() throws ParseExceptionParses a GROUP BY clause for SELECT.- Throws:
ParseException
-
GroupingElementList
public final List<org.apache.calcite.sql.SqlNode> GroupingElementList() throws ParseException
- Throws:
ParseException
-
AddGroupingElement
public final void AddGroupingElement(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
ExpressionCommaList
public final org.apache.calcite.sql.SqlNodeList ExpressionCommaList(org.apache.calcite.sql.parser.Span s, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a list of expressions separated by commas.- Throws:
ParseException
-
AddExpressions
public final void AddExpressions(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Parses a list of expressions separated by commas, appending expressions to a given list.- Throws:
ParseException
-
Having
public final org.apache.calcite.sql.SqlNode Having() throws ParseExceptionParses a HAVING clause for SELECT.- Throws:
ParseException
-
Window
public final org.apache.calcite.sql.SqlNodeList Window() throws ParseExceptionParses a WINDOW clause for SELECT.- Throws:
ParseException
-
AddWindowSpec
public final void AddWindowSpec(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
WindowSpecification
public final org.apache.calcite.sql.SqlWindow WindowSpecification() throws ParseExceptionParses a window specification.- Throws:
ParseException
-
WindowRange
public final org.apache.calcite.sql.SqlNode WindowRange() throws ParseException- Throws:
ParseException
-
Qualify
public final org.apache.calcite.sql.SqlNode Qualify() throws ParseExceptionParses a QUALIFY clause for SELECT.- Throws:
ParseException
-
OrderBy
public final org.apache.calcite.sql.SqlNodeList OrderBy(boolean accept) throws ParseExceptionParses an ORDER BY clause.- Throws:
ParseException
-
AddOrderItem
public final void AddOrderItem(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
Parses one item in an ORDER BY clause, and adds it to a list.- Throws:
ParseException
-
Over
public final org.apache.calcite.sql.SqlNode Over(org.apache.calcite.sql.SqlNode tableRef) throws ParseExceptionWraps a table reference in a call to OVER if an optional "OVER" clause is present (if the dialect supports OVER for table expressions).- Throws:
ParseException
-
Snapshot
public final org.apache.calcite.sql.SqlSnapshot Snapshot(org.apache.calcite.sql.SqlNode tableRef) throws ParseExceptionParses a FOR SYSTEM_TIME clause following a table expression.- Throws:
ParseException
-
Pivot
public final org.apache.calcite.sql.SqlNode Pivot(org.apache.calcite.sql.SqlNode tableRef) throws ParseExceptionParses a PIVOT clause following a table expression.- Throws:
ParseException
-
AddPivotAgg
public final void AddPivotAgg(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
AddPivotValue
public final void AddPivotValue(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
Unpivot
public final org.apache.calcite.sql.SqlNode Unpivot(org.apache.calcite.sql.SqlNode tableRef) throws ParseExceptionParses an UNPIVOT clause following a table expression.- Throws:
ParseException
-
AddUnpivotValue
public final void AddUnpivotValue(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
MatchRecognize
public final org.apache.calcite.sql.SqlMatchRecognize MatchRecognize(org.apache.calcite.sql.SqlNode tableRef) throws ParseExceptionParses a MATCH_RECOGNIZE clause following a table expression.- Throws:
ParseException
-
MeasureColumnCommaList
public final org.apache.calcite.sql.SqlNodeList MeasureColumnCommaList(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
AddMeasureColumn
public final void AddMeasureColumn(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
PatternExpression
public final org.apache.calcite.sql.SqlNode PatternExpression() throws ParseException- Throws:
ParseException
-
PatternTerm
public final org.apache.calcite.sql.SqlNode PatternTerm() throws ParseException- Throws:
ParseException
-
PatternFactor
public final org.apache.calcite.sql.SqlNode PatternFactor() throws ParseException- Throws:
ParseException
-
PatternPrimary
public final org.apache.calcite.sql.SqlNode PatternPrimary() throws ParseException- Throws:
ParseException
-
SubsetDefinitionCommaList
public final org.apache.calcite.sql.SqlNodeList SubsetDefinitionCommaList(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
AddSubsetDefinition
public final void AddSubsetDefinition(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
- Throws:
ParseException
-
PatternDefinitionCommaList
public final org.apache.calcite.sql.SqlNodeList PatternDefinitionCommaList(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
PatternDefinition
public final org.apache.calcite.sql.SqlNode PatternDefinition() throws ParseException- Throws:
ParseException
-
SqlExpressionEof
public final org.apache.calcite.sql.SqlNode SqlExpressionEof() throws ParseExceptionParses a SQL expression (such as might occur in a WHERE clause) followed by the end-of-file symbol.- Throws:
ParseException
-
QueryOrExpr
public final org.apache.calcite.sql.SqlNode QueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses either a row expression or a query expression without ORDER BY.Examples of valid queries:
SELECT c FROM tSELECT c(valid in some dialects)SELECT c FROM t UNION SELECT c2 FROM t2WITH q AS (SELECT 1) SELECT * FROM qVALUES (1, 2)TABLE t
Non-examples:
emp CROSS JOIN deptSELECT c FROM t ORDER BY c(SELECT c FROM t)
- Throws:
ParseException
-
Query
public final org.apache.calcite.sql.SqlNode Query(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException- Throws:
ParseException
-
AddSetOpQueryOrExpr
public final void AddSetOpQueryOrExpr(List<Object> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Parses a set operator (e.g. UNION or INTERSECT) followed by a query or expression, and adds both tolist.- Throws:
ParseException
-
AddSetOpQuery
public final void AddSetOpQuery(List<Object> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Parses a set operator (e.g. UNION or INTERSECT) followed by a query, and adds both tolist.- Throws:
ParseException
-
WithList
public final org.apache.calcite.sql.SqlNodeList WithList() throws ParseException- Throws:
ParseException
-
AddWithItem
public final void AddWithItem(List<org.apache.calcite.sql.SqlWithItem> list) throws ParseException
- Throws:
ParseException
-
LeafQueryOrExpr
public final org.apache.calcite.sql.SqlNode LeafQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses either a row expression, a leaf query expression, or a parenthesized expression of any kind.- Throws:
ParseException
-
AddExpression
public final void AddExpression(List<org.apache.calcite.sql.SqlNode> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
AsExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext)but appends to a list.- Throws:
ParseException
-
Expression
public final org.apache.calcite.sql.SqlNode Expression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a row expression or a parenthesized expression of any kind.- Throws:
ParseException
-
AddExpression2b
public final void AddExpression2b(List<Object> list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
- Throws:
ParseException
-
Expression2
public final List<Object> Expression2(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Parses a binary row expression, or a parenthesized expression of any kind.The result is as a flat list of operators and operands. The top-level call to get an expression should call
Expression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext), but lower-level calls should call this, to give the parser the opportunity to associate operator calls.For example 'a = b like c = d' should come out '((a = b) like c) = d' because LIKE and '=' have the same precedence, but tends to come out as '(a = b) like (c = d)' because (a = b) and (c = d) are parsed as separate expressions.
- Throws:
ParseException
-
comp
public final org.apache.calcite.sql.SqlKind comp() throws ParseExceptionParses a comparison operator inside a SOME / ALL predicate.- Throws:
ParseException
-
Expression3
public final org.apache.calcite.sql.SqlNode Expression3(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a unary row expression, or a parenthesized expression of any kind.- Throws:
ParseException
-
periodOperator
public final org.apache.calcite.sql.SqlOperator periodOperator() throws ParseException- Throws:
ParseException
-
CollateClause
public final org.apache.calcite.sql.SqlCollation CollateClause() throws ParseExceptionParses a COLLATE clause- Throws:
ParseException
-
UnsignedNumericLiteralOrParam
public final org.apache.calcite.sql.SqlNode UnsignedNumericLiteralOrParam() throws ParseExceptionNumeric literal or parameter; used in LIMIT, OFFSET and FETCH clauses.- Throws:
ParseException
-
RowExpressionExtension
public final org.apache.calcite.sql.SqlNode RowExpressionExtension() throws ParseExceptionParses a row expression extension, it can be either an identifier, or a call to a named function.- Throws:
ParseException
-
StringAggFunctionCall
public final org.apache.calcite.sql.SqlCall StringAggFunctionCall() throws ParseExceptionParses a call to the STRING_AGG aggregate function (or to an aggregate function with similar syntax: ARRAY_AGG, ARRAY_CONCAT_AGG, GROUP_CONCAT).- Throws:
ParseException
-
AtomicRowExpression
public final org.apache.calcite.sql.SqlNode AtomicRowExpression() throws ParseExceptionParses an atomic row expression.- Throws:
ParseException
-
CaseExpression
public final org.apache.calcite.sql.SqlNode CaseExpression() throws ParseException- Throws:
ParseException
-
SequenceExpression
public final org.apache.calcite.sql.SqlCall SequenceExpression() throws ParseException- Throws:
ParseException
-
SqlSetOption
public final org.apache.calcite.sql.SqlSetOption SqlSetOption(org.apache.calcite.sql.parser.Span s, String scope) throws ParseExceptionParses "SET <NAME> = VALUE" or "RESET <NAME>", without a leading "ALTER <SCOPE>".- Throws:
ParseException
-
SqlAlter
public final org.apache.calcite.sql.SqlAlter SqlAlter() throws ParseExceptionParses an expression for setting or resetting an option in SQL, such as QUOTED_IDENTIFIERS, or explain plan level (physical/logical).- Throws:
ParseException
-
Scope
public final String Scope() throws ParseException
- Throws:
ParseException
-
SqlCreate
public final org.apache.calcite.sql.SqlCreate SqlCreate() throws ParseExceptionParses a CREATE statement.- Throws:
ParseException
-
SqlDrop
public final org.apache.calcite.sql.SqlDrop SqlDrop() throws ParseExceptionParses a DROP statement.- Throws:
ParseException
-
Literal
public final org.apache.calcite.sql.SqlNode Literal() throws ParseExceptionParses a literal expression, allowing continued string literals. Usually returns an SqlLiteral, but a continued string literal is an SqlCall expression, which concatenates 2 or more string literals; the validator reduces this.If the context allows both literals and expressions, use
LiteralOrIntervalExpression(), which requires less lookahead.- Throws:
ParseException
-
NonIntervalLiteral
public final org.apache.calcite.sql.SqlNode NonIntervalLiteral() throws ParseExceptionParses a literal that is not an interval literal.- Throws:
ParseException
-
LiteralOrIntervalExpression
public final org.apache.calcite.sql.SqlNode LiteralOrIntervalExpression() throws ParseExceptionParses a literal or an interval expression.We include them in the same production because it is difficult to distinguish interval literals from interval expression (both of which start with the
INTERVALkeyword); this way, we can use less LOOKAHEAD.- Throws:
ParseException
-
UnsignedNumericLiteral
public final org.apache.calcite.sql.SqlNumericLiteral UnsignedNumericLiteral() throws ParseExceptionParses a unsigned numeric literal- Throws:
ParseException
-
NumericLiteral
public final org.apache.calcite.sql.SqlLiteral NumericLiteral() throws ParseExceptionParses a numeric literal (can be signed)- Throws:
ParseException
-
SpecialLiteral
public final org.apache.calcite.sql.SqlLiteral SpecialLiteral() throws ParseExceptionParse a special literal keyword- Throws:
ParseException
-
StringLiteral
public final org.apache.calcite.sql.SqlNode StringLiteral() throws ParseExceptionParses a string literal. The literal may be continued onto several lines. For a simple literal, the result is an SqlLiteral. For a continued literal, the result is an SqlCall expression, which concatenates 2 or more string literals; the validator reduces this.- Returns:
- a literal expression
- Throws:
ParseException- See Also:
SqlLiteral.unchain(SqlNode),SqlLiteral.stringValue(SqlNode)
-
SimpleStringLiteral
public final String SimpleStringLiteral() throws ParseException
Parses a character literal. Matches a single-quoted string, such as 'foo'; on BigQuery also matches a double-quoted string, such as "foo". Returns the value of the string with quotes removed.- Throws:
ParseException
-
DateTimeLiteral
public final org.apache.calcite.sql.SqlLiteral DateTimeLiteral() throws ParseExceptionParses a date/time literal.- Throws:
ParseException
-
DateTimeConstructorCall
public final org.apache.calcite.sql.SqlNode DateTimeConstructorCall() throws ParseExceptionParses a Date/Time constructor function, for example "DATE(1969, 7, 21)" or "DATETIME(d, t)". Enabled in some libraries (e.g. BigQuery).- Throws:
ParseException
-
MultisetConstructor
public final org.apache.calcite.sql.SqlNode MultisetConstructor() throws ParseExceptionParses a MULTISET constructor- Throws:
ParseException
-
ArrayConstructor
public final org.apache.calcite.sql.SqlNode ArrayConstructor() throws ParseExceptionParses an ARRAY constructor- Throws:
ParseException
-
ArrayLiteral
public final org.apache.calcite.sql.SqlCall ArrayLiteral() throws ParseException- Throws:
ParseException
-
MapConstructor
public final org.apache.calcite.sql.SqlNode MapConstructor() throws ParseExceptionParses a MAP constructor- Throws:
ParseException
-
PeriodConstructor
public final org.apache.calcite.sql.SqlNode PeriodConstructor() throws ParseExceptionParses a PERIOD constructor- Throws:
ParseException
-
IntervalLiteral
public final org.apache.calcite.sql.SqlLiteral IntervalLiteral() throws ParseExceptionParses an interval literal.- Throws:
ParseException
-
IntervalLiteralOrExpression
public final org.apache.calcite.sql.SqlNode IntervalLiteralOrExpression() throws ParseExceptionParses an interval literal (e.g.INTERVAL '2:3' HOUR TO MINUTE) or an interval expression (e.g.INTERVAL emp.empno MINUTEorINTERVAL 3 MONTHS).- Throws:
ParseException
-
Year
public final org.apache.calcite.avatica.util.TimeUnit Year() throws ParseException- Throws:
ParseException
-
Quarter
public final org.apache.calcite.avatica.util.TimeUnit Quarter() throws ParseException- Throws:
ParseException
-
Month
public final org.apache.calcite.avatica.util.TimeUnit Month() throws ParseException- Throws:
ParseException
-
Week
public final org.apache.calcite.avatica.util.TimeUnit Week() throws ParseException- Throws:
ParseException
-
Day
public final org.apache.calcite.avatica.util.TimeUnit Day() throws ParseException- Throws:
ParseException
-
Hour
public final org.apache.calcite.avatica.util.TimeUnit Hour() throws ParseException- Throws:
ParseException
-
Minute
public final org.apache.calcite.avatica.util.TimeUnit Minute() throws ParseException- Throws:
ParseException
-
Second
public final org.apache.calcite.avatica.util.TimeUnit Second() throws ParseException- Throws:
ParseException
-
IntervalQualifier
public final org.apache.calcite.sql.SqlIntervalQualifier IntervalQualifier() throws ParseException- Throws:
ParseException
-
IntervalQualifierStart
public final org.apache.calcite.sql.SqlIntervalQualifier IntervalQualifierStart() throws ParseExceptionInterval qualifier without 'TO unit'.- Throws:
ParseException
-
TimeUnitOrName
public final org.apache.calcite.sql.SqlIntervalQualifier TimeUnitOrName() throws ParseExceptionParses a built-in time unit (e.g. "YEAR") or user-defined time frame (e.g. "MINUTE15") and in each case returns aSqlIntervalQualifier.The units are used in several functions, incuding CEIL, FLOOR, EXTRACT. Includes NANOSECOND, MILLISECOND, which were previously allowed in EXTRACT but not CEIL, FLOOR.
Includes
WEEKandWEEK(SUNDAY)throughWEEK(SATURDAY).Does not include SQL_TSI_DAY, SQL_TSI_FRAC_SECOND etc. These will be parsed as identifiers and can be resolved in the validator if they are registered as abbreviations in your time frame set.
- Throws:
ParseException
-
TimeUnit
public final org.apache.calcite.sql.SqlIntervalQualifier TimeUnit() throws ParseExceptionParses a built-in time unit (e.g. "YEAR") and returns aSqlIntervalQualifier.Includes
WEEKandWEEK(SUNDAY)throughWEEK(SATURDAY).Does not include SQL_TSI_DAY, SQL_TSI_FRAC_SECOND etc. These will be parsed as identifiers and can be resolved in the validator if they are registered as abbreviations in your time frame set.
- Throws:
ParseException
-
weekdayName
public final String weekdayName() throws ParseException
- Throws:
ParseException
-
DynamicParam
public final org.apache.calcite.sql.SqlDynamicParam DynamicParam() throws ParseExceptionParses a dynamic parameter marker.- Throws:
ParseException
-
AddIdentifierSegment
public final void AddIdentifierSegment(List<String> names, List<org.apache.calcite.sql.parser.SqlParserPos> positions) throws ParseException
Parses one segment of an identifier that may be composite.Each time it reads an identifier it writes one element to each list; the entry in
positionsrecords its position and whether the segment was quoted.- Throws:
ParseException
-
AddTableIdentifierSegment
public final void AddTableIdentifierSegment(List<String> names, List<org.apache.calcite.sql.parser.SqlParserPos> positions) throws ParseException
AsAddIdentifierSegment(java.util.List<java.lang.String>, java.util.List<org.apache.calcite.sql.parser.SqlParserPos>)but part of a table name (for example, followingFROM,INSERTorUPDATE).In some dialects the lexical rules for table names are different from for other identifiers. For example, in BigQuery, table names may contain hyphens.
- Throws:
ParseException
-
Identifier
public final String Identifier() throws ParseException
Parses a simple identifier as a String.- Throws:
ParseException
-
SimpleIdentifier
public final org.apache.calcite.sql.SqlIdentifier SimpleIdentifier() throws ParseExceptionParses a simple identifier as an SqlIdentifier.- Throws:
ParseException
-
SimpleIdentifierFromStringLiteral
public final org.apache.calcite.sql.SqlIdentifier SimpleIdentifierFromStringLiteral() throws ParseExceptionParses a character literal as an SqlIdentifier. Only valid for column aliases in certain dialects.- Throws:
ParseException
-
AddSimpleIdentifiers
public final void AddSimpleIdentifiers(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
Parses a comma-separated list of simple identifiers.- Throws:
ParseException
-
ParenthesizedSimpleIdentifierList
public final org.apache.calcite.sql.SqlNodeList ParenthesizedSimpleIdentifierList() throws ParseExceptionList of simple identifiers in parentheses. The position extends from the open parenthesis to the close parenthesis.- Throws:
ParseException
-
SimpleIdentifierOrList
public final org.apache.calcite.sql.SqlNodeList SimpleIdentifierOrList() throws ParseExceptionList of simple identifiers in parentheses or one simple identifier.- Examples:
DEPTNO(EMPNO, DEPTNO)
- Throws:
ParseException
-
CompoundIdentifier
public final org.apache.calcite.sql.SqlIdentifier CompoundIdentifier() throws ParseExceptionParses a compound identifier.- Throws:
ParseException
-
CompoundTableIdentifier
public final org.apache.calcite.sql.SqlIdentifier CompoundTableIdentifier() throws ParseExceptionParses a compound identifier in the FROM clause.- Throws:
ParseException
-
AddCompoundIdentifierTypes
public final void AddCompoundIdentifierTypes(List<org.apache.calcite.sql.SqlNode> list, List<org.apache.calcite.sql.SqlNode> extendList) throws ParseException
Parses a comma-separated list of compound identifiers.- Throws:
ParseException
-
ParenthesizedCompoundIdentifierList
public final org.apache.calcite.util.Pair<org.apache.calcite.sql.SqlNodeList,org.apache.calcite.sql.SqlNodeList> ParenthesizedCompoundIdentifierList() throws ParseExceptionList of compound identifiers in parentheses. The position extends from the open parenthesis to the close parenthesis.- Throws:
ParseException
-
NewSpecification
public final org.apache.calcite.sql.SqlNode NewSpecification() throws ParseExceptionParses a NEW UDT(...) expression.- Throws:
ParseException
-
UnsignedIntLiteral
public final int UnsignedIntLiteral() throws ParseException- Throws:
ParseException
-
IntLiteral
public final int IntLiteral() throws ParseException- Throws:
ParseException
-
DataType
public final org.apache.calcite.sql.SqlDataTypeSpec DataType() throws ParseException- Throws:
ParseException
-
TypeName
public final org.apache.calcite.sql.SqlTypeNameSpec TypeName() throws ParseException- Throws:
ParseException
-
SqlTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec SqlTypeName(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
SqlTypeName1
public final org.apache.calcite.sql.SqlTypeNameSpec SqlTypeName1(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
SqlTypeName2
public final org.apache.calcite.sql.SqlTypeNameSpec SqlTypeName2(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
SqlTypeName3
public final org.apache.calcite.sql.SqlTypeNameSpec SqlTypeName3(org.apache.calcite.sql.parser.Span s) throws ParseException- Throws:
ParseException
-
JdbcOdbcDataTypeName
public final org.apache.calcite.sql.SqlJdbcDataTypeName JdbcOdbcDataTypeName() throws ParseException- Throws:
ParseException
-
JdbcOdbcDataType
public final org.apache.calcite.sql.SqlLiteral JdbcOdbcDataType() throws ParseException- Throws:
ParseException
-
CollectionsTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec CollectionsTypeName(org.apache.calcite.sql.SqlTypeNameSpec elementTypeName) throws ParseExceptionParse a collection type name, the input element type name may also be a collection type.- Throws:
ParseException
-
NullableOptDefaultTrue
public final boolean NullableOptDefaultTrue() throws ParseExceptionParse a nullable option, default is true.- Throws:
ParseException
-
NullableOptDefaultFalse
public final boolean NullableOptDefaultFalse() throws ParseExceptionParse a nullable option, default is false.- Throws:
ParseException
-
NotNullOpt
public final boolean NotNullOpt() throws ParseExceptionParses NOT NULL and returns false, or parses nothing and returns true.- Throws:
ParseException
-
AddFieldNameTypes
public final void AddFieldNameTypes(List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes) throws ParseException
Parse a "name1 type1 [NULL | NOT NULL], name2 type2 [NULL | NOT NULL] ..." list, the field type default is not nullable.- Throws:
ParseException
-
AddFieldNameType
public final void AddFieldNameType(List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes) throws ParseException
- Throws:
ParseException
-
RowTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec RowTypeName() throws ParseExceptionParse Row type with format: Row(name1 type1, name2 type2). Every field type can have suffix of `NULL` or `NOT NULL` to indicate if this type is nullable. i.e. Row(f0 int not null, f1 varchar null).- Throws:
ParseException
-
CharacterTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec CharacterTypeName(org.apache.calcite.sql.parser.Span s) throws ParseExceptionParse character types: char, varchar.- Throws:
ParseException
-
DateTimeTypeName
public final org.apache.calcite.sql.SqlTypeNameSpec DateTimeTypeName() throws ParseExceptionParse datetime types: date, time, timestamp.- Throws:
ParseException
-
PrecisionOpt
public final int PrecisionOpt() throws ParseException- Throws:
ParseException
-
TimeZoneOpt
public final boolean TimeZoneOpt() throws ParseExceptionParse a time zone suffix for DateTime types. According to SQL-2011, "with time zone" and "without time zone" belong to standard SQL but we only implement the "without time zone".We also support "with local time zone".
- Returns:
- true if this is "with local time zone".
- Throws:
ParseException
-
CursorExpression
public final org.apache.calcite.sql.SqlNode CursorExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseExceptionParses a CURSOR(query) expression. The parser allows these anywhere, but the validator restricts them to appear only as arguments to table functions.- Throws:
ParseException
-
BuiltinFunctionCall
public final org.apache.calcite.sql.SqlNode BuiltinFunctionCall() throws ParseExceptionParses a call to a builtin function with special syntax.- Throws:
ParseException
-
JsonRepresentation
public final org.apache.calcite.sql.SqlJsonEncoding JsonRepresentation() throws ParseException- Throws:
ParseException
-
JsonInputClause
public final void JsonInputClause() throws ParseException- Throws:
ParseException
-
JsonReturningClause
public final org.apache.calcite.sql.SqlDataTypeSpec JsonReturningClause() throws ParseException- Throws:
ParseException
-
JsonOutputClause
public final org.apache.calcite.sql.SqlDataTypeSpec JsonOutputClause() throws ParseException- Throws:
ParseException
-
JsonPathSpec
public final org.apache.calcite.sql.SqlNode JsonPathSpec() throws ParseException- Throws:
ParseException
-
JsonApiCommonSyntax
public final List<org.apache.calcite.sql.SqlNode> JsonApiCommonSyntax() throws ParseException
- Throws:
ParseException
-
JsonExistsErrorBehavior
public final org.apache.calcite.sql.SqlJsonExistsErrorBehavior JsonExistsErrorBehavior() throws ParseException- Throws:
ParseException
-
JsonExistsFunctionCall
public final org.apache.calcite.sql.SqlCall JsonExistsFunctionCall() throws ParseException- Throws:
ParseException
-
JsonValueEmptyOrErrorBehavior
public final List<org.apache.calcite.sql.SqlNode> JsonValueEmptyOrErrorBehavior() throws ParseException
- Throws:
ParseException
-
JsonValueFunctionCall
public final org.apache.calcite.sql.SqlCall JsonValueFunctionCall() throws ParseException- Throws:
ParseException
-
JsonQueryEmptyOrErrorBehavior
public final List<org.apache.calcite.sql.SqlNode> JsonQueryEmptyOrErrorBehavior() throws ParseException
- Throws:
ParseException
-
JsonQueryWrapperBehavior
public final org.apache.calcite.sql.SqlNode JsonQueryWrapperBehavior() throws ParseException- Throws:
ParseException
-
JsonQueryFunctionCall
public final org.apache.calcite.sql.SqlCall JsonQueryFunctionCall() throws ParseException- Throws:
ParseException
-
JsonName
public final org.apache.calcite.sql.SqlNode JsonName() throws ParseException- Throws:
ParseException
-
JsonNameAndValue
public final List<org.apache.calcite.sql.SqlNode> JsonNameAndValue() throws ParseException
- Throws:
ParseException
-
JsonConstructorNullClause
public final org.apache.calcite.sql.SqlNode JsonConstructorNullClause() throws ParseException- Throws:
ParseException
-
JsonObjectFunctionCall
public final org.apache.calcite.sql.SqlCall JsonObjectFunctionCall() throws ParseException- Throws:
ParseException
-
JsonObjectAggFunctionCall
public final org.apache.calcite.sql.SqlCall JsonObjectAggFunctionCall() throws ParseException- Throws:
ParseException
-
JsonArrayFunctionCall
public final org.apache.calcite.sql.SqlCall JsonArrayFunctionCall() throws ParseException- Throws:
ParseException
-
JsonArrayAggOrderByClause
public final org.apache.calcite.sql.SqlNodeList JsonArrayAggOrderByClause() throws ParseException- Throws:
ParseException
-
JsonArrayAggFunctionCall
public final org.apache.calcite.sql.SqlCall JsonArrayAggFunctionCall() throws ParseException- Throws:
ParseException
-
DateDiffFunctionCall
public final org.apache.calcite.sql.SqlCall DateDiffFunctionCall() throws ParseExceptionParses a call to BigQuery's DATE_DIFF.- Throws:
ParseException
-
TimestampAddFunctionCall
public final org.apache.calcite.sql.SqlCall TimestampAddFunctionCall() throws ParseExceptionParses a call to TIMESTAMPADD.- Throws:
ParseException
-
TimestampDiffFunctionCall
public final org.apache.calcite.sql.SqlCall TimestampDiffFunctionCall() throws ParseExceptionParses a call to TIMESTAMPDIFF.- Throws:
ParseException
-
TimestampDiff3FunctionCall
public final org.apache.calcite.sql.SqlCall TimestampDiff3FunctionCall() throws ParseExceptionParses a call to BigQuery's TIMESTAMP_DIFF.The difference between TIMESTAMPDIFF and TIMESTAMP_DIFF is the ordering of the parameters and the arrangement of the subtraction. TIMESTAMPDIFF uses (unit, timestamp1, timestamp2) with (t2 - t1), while TIMESTAMP_DIFF uses (timestamp1, timestamp2, unit) with (t1 - t2).
- Throws:
ParseException
-
DatetimeDiffFunctionCall
public final org.apache.calcite.sql.SqlCall DatetimeDiffFunctionCall() throws ParseExceptionParses BigQuery's built-in DATETIME_DIFF() function.- Throws:
ParseException
-
DateTruncFunctionCall
public final org.apache.calcite.sql.SqlCall DateTruncFunctionCall() throws ParseExceptionParses a call to DATE_TRUNC.- Throws:
ParseException
-
TimestampTruncFunctionCall
public final org.apache.calcite.sql.SqlCall TimestampTruncFunctionCall() throws ParseExceptionParses a call to TIMESTAMP_TRUNC.- Throws:
ParseException
-
TimeDiffFunctionCall
public final org.apache.calcite.sql.SqlCall TimeDiffFunctionCall() throws ParseExceptionParses a call to BigQuery's TIME_DIFF.- Throws:
ParseException
-
TimeTruncFunctionCall
public final org.apache.calcite.sql.SqlCall TimeTruncFunctionCall() throws ParseExceptionParses a call to TIME_TRUNC.- Throws:
ParseException
-
GroupByWindowingCall
public final org.apache.calcite.sql.SqlCall GroupByWindowingCall() throws ParseExceptionParses a call to a grouping function inside the GROUP BY clause, for exampleTUMBLE(rowtime, INTERVAL '1' MINUTE).- Throws:
ParseException
-
MatchRecognizeFunctionCall
public final org.apache.calcite.sql.SqlCall MatchRecognizeFunctionCall() throws ParseException- Throws:
ParseException
-
MatchRecognizeCallWithModifier
public final org.apache.calcite.sql.SqlCall MatchRecognizeCallWithModifier() throws ParseException- Throws:
ParseException
-
MatchRecognizeNavigationLogical
public final org.apache.calcite.sql.SqlCall MatchRecognizeNavigationLogical() throws ParseException- Throws:
ParseException
-
MatchRecognizeNavigationPhysical
public final org.apache.calcite.sql.SqlCall MatchRecognizeNavigationPhysical() throws ParseException- Throws:
ParseException
-
withinDistinct
public final org.apache.calcite.sql.SqlCall withinDistinct(org.apache.calcite.sql.SqlNode arg) throws ParseException- Throws:
ParseException
-
withinGroup
public final org.apache.calcite.sql.SqlCall withinGroup(org.apache.calcite.sql.SqlNode arg) throws ParseException- Throws:
ParseException
-
NullTreatment
public final org.apache.calcite.util.Pair<org.apache.calcite.sql.parser.SqlParserPos,org.apache.calcite.sql.SqlOperator> NullTreatment() throws ParseException- Throws:
ParseException
-
nullTreatment
public final org.apache.calcite.sql.SqlCall nullTreatment(org.apache.calcite.sql.SqlCall arg) throws ParseException- Throws:
ParseException
-
NamedFunctionCall
public final org.apache.calcite.sql.SqlNode NamedFunctionCall() throws ParseExceptionParses a call to a named function (could be a builtin with regular syntax, or else a UDF).NOTE: every UDF has two names: an invocation name and a specific name. Normally, function calls are resolved via overload resolution and invocation names. The SPECIFIC prefix allows overload resolution to be bypassed. Note that usage of the SPECIFIC prefix in queries is non-standard; it is used internally by Farrago, e.g. in stored view definitions to permanently bind references to a particular function after the overload resolution performed by view creation.
TODO jvs 25-Mar-2005: Once we have SQL-Flagger support, flag SPECIFIC as non-standard.
- Throws:
ParseException
-
NamedCall
public final org.apache.calcite.sql.SqlCall NamedCall() throws ParseException- Throws:
ParseException
-
StandardFloorCeilOptions
public final org.apache.calcite.sql.SqlNode StandardFloorCeilOptions(org.apache.calcite.sql.parser.Span s, boolean floorFlag) throws ParseException- Throws:
ParseException
-
NonReservedJdbcFunctionName
public final String NonReservedJdbcFunctionName() throws ParseException
Parses the name of a JDBC function that is a token but is not reserved.- Throws:
ParseException
-
FunctionName
public final org.apache.calcite.sql.SqlIdentifier FunctionName() throws ParseExceptionParses the name of a function (either a compound identifier or a reserved word which can be used as a function name).- Throws:
ParseException
-
ReservedFunctionName
public final org.apache.calcite.sql.SqlIdentifier ReservedFunctionName() throws ParseExceptionParses a reserved word which is used as the name of a function.- Throws:
ParseException
-
ContextVariable
public final org.apache.calcite.sql.SqlIdentifier ContextVariable() throws ParseException- Throws:
ParseException
-
JdbcFunctionCall
public final org.apache.calcite.sql.SqlNode JdbcFunctionCall() throws ParseExceptionParses a function call expression with JDBC syntax.- Throws:
ParseException
-
BinaryQueryOperator
public final org.apache.calcite.sql.SqlBinaryOperator BinaryQueryOperator() throws ParseExceptionParses a binary query operator like UNION.- Throws:
ParseException
-
BinaryMultisetOperator
public final org.apache.calcite.sql.SqlBinaryOperator BinaryMultisetOperator() throws ParseExceptionParses a binary multiset operator.- Throws:
ParseException
-
BinaryRowOperator
public final org.apache.calcite.sql.SqlBinaryOperator BinaryRowOperator() throws ParseExceptionParses a binary row operator like AND.- Throws:
ParseException
-
PrefixRowOperator
public final org.apache.calcite.sql.SqlPrefixOperator PrefixRowOperator() throws ParseExceptionParses a prefix row operator like NOT.- Throws:
ParseException
-
PostfixRowOperator
public final org.apache.calcite.sql.SqlPostfixOperator PostfixRowOperator() throws ParseExceptionParses a postfix row operator like IS NOT NULL.- Throws:
ParseException
-
NonReservedKeyWord
public final String NonReservedKeyWord() throws ParseException
Parses a non-reserved keyword for use as an identifier.The method is broken up into several sub-methods; without this decomposition, parsers such as Babel with more than ~1,000 non-reserved keywords would generate such deeply nested 'if' statements that javac would fail with a
StackOverflowError.The list is generated from the FMPP config data. To add or remove keywords, modify config.fmpp. For parsers except Babel, make sure that keywords are not reserved by the SQL standard.
- Throws:
ParseException- See Also:
SQL:2003 Part 2 Section 5.2
-
NonReservedKeyWord0of3
public final void NonReservedKeyWord0of3() throws ParseException- Throws:
ParseException- See Also:
NonReservedKeyWord()
-
NonReservedKeyWord1of3
public final void NonReservedKeyWord1of3() throws ParseException- Throws:
ParseException- See Also:
NonReservedKeyWord()
-
NonReservedKeyWord2of3
public final void NonReservedKeyWord2of3() throws ParseException- Throws:
ParseException- See Also:
NonReservedKeyWord()
-
UnusedExtension
public final void UnusedExtension() throws ParseExceptionDefines a production which can never be accepted by the parser. In effect, it tells the parser, "If you got here, you've gone too far." It is used as the default production for parser extension points; derived parsers replace it with a real production when they want to implement a particular extension point.- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
-
ReInit
public void ReInit(InputStream stream, String encoding)
-
ReInit
public void ReInit(Reader stream)
- Specified by:
ReInitin classorg.apache.calcite.sql.parser.SqlAbstractParserImpl
-
ReInit
public void ReInit(FlinkSqlParserImplTokenManager tm)
-
getNextToken
public final Token getNextToken()
-
getToken
public final Token getToken(int index)
-
generateParseException
public ParseException generateParseException()
-
enable_tracing
public final void enable_tracing()
-
disable_tracing
public final void disable_tracing()
-
-