Class StormParserImpl

java.lang.Object
org.apache.calcite.sql.parser.SqlAbstractParserImpl
org.apache.storm.sql.parser.impl.StormParserImpl
All Implemented Interfaces:
StormParserImplConstants

public class StormParserImpl extends org.apache.calcite.sql.parser.SqlAbstractParserImpl implements StormParserImplConstants
SQL parser, generated from Parser.jj by JavaCC.

The public wrapper for this parser is SqlParser.

  • Field Details

    • FACTORY

      public static final org.apache.calcite.sql.parser.SqlParserImplFactory FACTORY
      SqlParserImplFactory implementation for creating parser.
    • token_source

      public StormParserImplTokenManager token_source
      Generated Token Manager.
    • token

      public Token token
      Current token.
    • jj_nt

      public Token jj_nt
      Next token.
  • Constructor Details

    • StormParserImpl

      public StormParserImpl(InputStream stream)
      Constructor with InputStream.
    • StormParserImpl

      public StormParserImpl(InputStream stream, String encoding)
      Constructor with InputStream and supplied encoding
    • StormParserImpl

      public StormParserImpl(Reader stream)
      Constructor.
    • StormParserImpl

      public StormParserImpl(StormParserImplTokenManager tm)
      Constructor with generated Token Manager.
  • Method Details

    • normalizeException

      public org.apache.calcite.sql.parser.SqlParseException normalizeException(Throwable ex)
      Specified by:
      normalizeException in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • getMetadata

      public org.apache.calcite.sql.parser.SqlAbstractParserImpl.Metadata getMetadata()
      Specified by:
      getMetadata in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • setTabSize

      public void setTabSize(int tabSize)
      Specified by:
      setTabSize in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • switchTo

      public void switchTo(String stateName)
      Specified by:
      switchTo in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • setQuotedCasing

      public void setQuotedCasing(org.apache.calcite.avatica.util.Casing quotedCasing)
      Specified by:
      setQuotedCasing in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • setUnquotedCasing

      public void setUnquotedCasing(org.apache.calcite.avatica.util.Casing unquotedCasing)
      Specified by:
      setUnquotedCasing in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • setIdentifierMaxLength

      public void setIdentifierMaxLength(int identifierMaxLength)
      Specified by:
      setIdentifierMaxLength in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • setConformance

      public void setConformance(org.apache.calcite.sql.validate.SqlConformance conformance)
      Specified by:
      setConformance in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • parseSqlExpressionEof

      public org.apache.calcite.sql.SqlNode parseSqlExpressionEof() throws Exception
      Specified by:
      parseSqlExpressionEof in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
      Throws:
      Exception
    • parseSqlStmtEof

      public org.apache.calcite.sql.SqlNode parseSqlStmtEof() throws Exception
      Specified by:
      parseSqlStmtEof in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
      Throws:
      Exception
    • NonReservedKeyWord

      public final String NonReservedKeyWord() throws ParseException
      Throws:
      ParseException
    • ExtendedTableRef

      public final org.apache.calcite.sql.SqlNode ExtendedTableRef() throws ParseException
      Allows 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 ParseException
      Allows 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
    • ExtendedBuiltinFunctionCall

      public final org.apache.calcite.sql.SqlNode ExtendedBuiltinFunctionCall() 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:
      getPos in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
      Throws:
      ParseException
    • OrderedQueryOrExpr

      public final org.apache.calcite.sql.SqlNode OrderedQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Parses either a row expression or a query expression with an optional ORDER BY.

      Postgres syntax for limit:

          [ LIMIT { count | ALL } ]
          [ OFFSET start ]

      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
    • LeafQuery

      public final org.apache.calcite.sql.SqlNode LeafQuery(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Parses 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 ParseException
      Parses a parenthesized query or single row expression.
      Throws:
      ParseException
    • ParenthesizedQueryOrCommaList

      public final org.apache.calcite.sql.SqlNodeList ParenthesizedQueryOrCommaList(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Parses 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 ParseException
      As ParenthesizedQueryOrCommaList, but allows DEFAULT in place of any of the expressions. For example, (x, DEFAULT, null, DEFAULT).
      Throws:
      ParseException
    • FunctionParameterList

      public final List 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
    • Arg0

      public final void Arg0(List list, org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Throws:
      ParseException
    • Arg

      public final void Arg(List 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 ParseException
      Parses a query (SELECT, UNION, INTERSECT, EXCEPT, VALUES, TABLE) followed by the end-of-file symbol.
      Throws:
      ParseException
    • SqlStmt

      public final org.apache.calcite.sql.SqlNode SqlStmt() throws ParseException
      Parses an SQL statement.
      Throws:
      ParseException
    • SqlStmtEof

      public final org.apache.calcite.sql.SqlNode SqlStmtEof() throws ParseException
      Parses an SQL statement followed by the end-of-file symbol.
      Throws:
      ParseException
    • ColumnDefinitionList

      public final org.apache.calcite.sql.SqlNodeList ColumnDefinitionList() throws ParseException
      Throws:
      ParseException
    • SqlCreateTable

      public final org.apache.calcite.sql.SqlNode SqlCreateTable() throws ParseException
      CREATE EXTERNAL TABLE ( IF NOT EXISTS )? ( database_name '.' )? table_name ( '(' column_def ( ',' column_def )* ')' ( STORED AS INPUTFORMAT input_format_classname OUTPUTFORMAT output_format_classname )? LOCATION location_uri ( TBLPROPERTIES tbl_properties )? ( AS select_stmt )
      Throws:
      ParseException
    • SqlCreateFunction

      public final org.apache.calcite.sql.SqlNode SqlCreateFunction() throws ParseException
      CREATE FUNCTION functionname AS 'classname'
      Throws:
      ParseException
    • SqlSelect

      public final org.apache.calcite.sql.SqlSelect SqlSelect() throws ParseException
      Parses a leaf SELECT expression without ORDER BY.
      Throws:
      ParseException
    • SqlExplain

      public final org.apache.calcite.sql.SqlNode SqlExplain() throws ParseException
      Parses an EXPLAIN PLAN statement.
      Throws:
      ParseException
    • SqlQueryOrDml

      public final org.apache.calcite.sql.SqlNode SqlQueryOrDml() throws ParseException
      Parses 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 ParseException
      Parses WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION modifier for EXPLAIN PLAN.
      Throws:
      ParseException
    • ExplainDetailLevel

      public final org.apache.calcite.sql.SqlExplainLevel ExplainDetailLevel() throws ParseException
      Parses INCLUDING ALL ATTRIBUTES modifier for EXPLAIN PLAN.
      Throws:
      ParseException
    • SqlDescribe

      public final org.apache.calcite.sql.SqlNode SqlDescribe() throws ParseException
      Parses a DESCRIBE statement.
      Throws:
      ParseException
    • SqlProcedureCall

      public final org.apache.calcite.sql.SqlNode SqlProcedureCall() throws ParseException
      Parses 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
    • SqlInsert

      public final org.apache.calcite.sql.SqlNode SqlInsert() throws ParseException
      Parses an INSERT statement.
      Throws:
      ParseException
    • SqlDelete

      public final org.apache.calcite.sql.SqlNode SqlDelete() throws ParseException
      Parses a DELETE statement.
      Throws:
      ParseException
    • SqlUpdate

      public final org.apache.calcite.sql.SqlNode SqlUpdate() throws ParseException
      Parses an UPDATE statement.
      Throws:
      ParseException
    • SqlMerge

      public final org.apache.calcite.sql.SqlNode SqlMerge() throws ParseException
      Parses 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
    • SelectList

      public final List<org.apache.calcite.sql.SqlNode> SelectList() throws ParseException
      Parses the select list of a SELECT statement.
      Throws:
      ParseException
    • SelectItem

      public final org.apache.calcite.sql.SqlNode SelectItem() throws ParseException
      Parses one item in a select list.
      Throws:
      ParseException
    • SelectExpression

      public final org.apache.calcite.sql.SqlNode SelectExpression() throws ParseException
      Parses 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
    • JoinTable

      public final org.apache.calcite.sql.SqlNode JoinTable(org.apache.calcite.sql.SqlNode e) throws ParseException
      Matches "LEFT JOIN t ON ...", "RIGHT JOIN t USING ...", "JOIN t".
      Throws:
      ParseException
    • FromClause

      public final org.apache.calcite.sql.SqlNode FromClause() throws ParseException
      Parses 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
    • TableRef

      public final org.apache.calcite.sql.SqlNode TableRef() throws ParseException
      Parses a table reference in a FROM clause, not lateral unless LATERAL is explicitly specified.
      Throws:
      ParseException
    • TableRef2

      public final org.apache.calcite.sql.SqlNode TableRef2(boolean lateral) throws ParseException
      Parses a table reference in a FROM clause.
      Throws:
      ParseException
    • ExtendList

      public final org.apache.calcite.sql.SqlNodeList ExtendList() throws ParseException
      Throws:
      ParseException
    • ColumnType

      public final void ColumnType(List<org.apache.calcite.sql.SqlNode> list) throws ParseException
      Throws:
      ParseException
    • CompoundIdentifierType

      public final void CompoundIdentifierType(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
    • TableFunctionCall

      public final org.apache.calcite.sql.SqlNode TableFunctionCall(org.apache.calcite.sql.parser.SqlParserPos pos) throws ParseException
      Throws:
      ParseException
    • ExplicitTable

      public final org.apache.calcite.sql.SqlNode ExplicitTable(org.apache.calcite.sql.parser.SqlParserPos pos) throws ParseException
      Parses an explicit TABLE t reference.
      Throws:
      ParseException
    • TableConstructor

      public final org.apache.calcite.sql.SqlNode TableConstructor() throws ParseException
      Parses a VALUES leaf query expression.
      Throws:
      ParseException
    • RowConstructorList

      public final org.apache.calcite.sql.SqlNodeList RowConstructorList(org.apache.calcite.sql.parser.Span s) throws ParseException
      Parses one or more rows in a VALUES expression.
      Throws:
      ParseException
    • RowConstructor

      public final org.apache.calcite.sql.SqlNode RowConstructor() throws ParseException
      Parses a row constructor in the context of a VALUES expression.
      Throws:
      ParseException
    • WhereOpt

      public final org.apache.calcite.sql.SqlNode WhereOpt() throws ParseException
      Parses the optional WHERE clause for SELECT, DELETE, and UPDATE.
      Throws:
      ParseException
    • GroupByOpt

      public final org.apache.calcite.sql.SqlNodeList GroupByOpt() throws ParseException
      Parses the optional GROUP BY clause for SELECT.
      Throws:
      ParseException
    • GroupingElementList

      public final List<org.apache.calcite.sql.SqlNode> GroupingElementList() throws ParseException
      Throws:
      ParseException
    • GroupingElement

      public final org.apache.calcite.sql.SqlNode GroupingElement() 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 ParseException
      Parses a list of expressions separated by commas.
      Throws:
      ParseException
    • HavingOpt

      public final org.apache.calcite.sql.SqlNode HavingOpt() throws ParseException
      Parses the optional HAVING clause for SELECT.
      Throws:
      ParseException
    • WindowOpt

      public final org.apache.calcite.sql.SqlNodeList WindowOpt() throws ParseException
      Parses the optional WINDOW clause for SELECT
      Throws:
      ParseException
    • WindowSpecification

      public final org.apache.calcite.sql.SqlWindow WindowSpecification() throws ParseException
      Parses a window specification.
      Throws:
      ParseException
    • WindowRange

      public final org.apache.calcite.sql.SqlNode WindowRange() throws ParseException
      Throws:
      ParseException
    • OrderBy

      public final org.apache.calcite.sql.SqlNodeList OrderBy(boolean accept) throws ParseException
      Parses an ORDER BY clause.
      Throws:
      ParseException
    • OrderItem

      public final org.apache.calcite.sql.SqlNode OrderItem() throws ParseException
      Parses one list item in an ORDER BY clause.
      Throws:
      ParseException
    • MatchRecognizeOpt

      public final org.apache.calcite.sql.SqlMatchRecognize MatchRecognizeOpt(org.apache.calcite.sql.SqlNode tableRef) throws ParseException
      Parses 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
    • MeasureColumn

      public final org.apache.calcite.sql.SqlNode MeasureColumn() 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
    • SubsetDefinition

      public final org.apache.calcite.sql.SqlNode SubsetDefinition() 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 ParseException
      Parses 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 ParseException
      Parses either a row expression or a query expression without ORDER BY.
      Throws:
      ParseException
    • WithList

      public final org.apache.calcite.sql.SqlNodeList WithList() throws ParseException
      Throws:
      ParseException
    • WithItem

      public final org.apache.calcite.sql.SqlWithItem WithItem() throws ParseException
      Throws:
      ParseException
    • LeafQueryOrExpr

      public final org.apache.calcite.sql.SqlNode LeafQueryOrExpr(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Parses either a row expression, a leaf query expression, or a parenthesized expression of any kind.
      Throws:
      ParseException
    • Expression

      public final org.apache.calcite.sql.SqlNode Expression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Parses a row expression or a parenthesized expression of any kind.
      Throws:
      ParseException
    • Expression2b

      public final void Expression2b(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext, List<Object> list) 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 ParseException
      Parses 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 ParseException
      Parses 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 ParseException
      Parses a COLLATE clause
      Throws:
      ParseException
    • UnsignedNumericLiteralOrParam

      public final org.apache.calcite.sql.SqlNode UnsignedNumericLiteralOrParam() throws ParseException
      Numeric literal or parameter; used in LIMIT, OFFSET and FETCH clauses.
      Throws:
      ParseException
    • AtomicRowExpression

      public final org.apache.calcite.sql.SqlNode AtomicRowExpression() throws ParseException
      Parses 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 ParseException
      Parses "SET <NAME> = VALUE" or "RESET <NAME>", without a leading "ALTER <SCOPE>".
      Throws:
      ParseException
    • SqlAlter

      public final org.apache.calcite.sql.SqlAlter SqlAlter() throws ParseException
      Parses 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
    • Literal

      public final org.apache.calcite.sql.SqlNode Literal() throws ParseException
      Parses 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.
      Throws:
      ParseException
    • UnsignedNumericLiteral

      public final org.apache.calcite.sql.SqlNumericLiteral UnsignedNumericLiteral() throws ParseException
      Parses a unsigned numeric literal
      Throws:
      ParseException
    • NumericLiteral

      public final org.apache.calcite.sql.SqlLiteral NumericLiteral() throws ParseException
      Parses a numeric literal (can be signed)
      Throws:
      ParseException
    • SpecialLiteral

      public final org.apache.calcite.sql.SqlLiteral SpecialLiteral() throws ParseException
      Parse a special literal keyword
      Throws:
      ParseException
    • StringLiteral

      public final org.apache.calcite.sql.SqlNode StringLiteral() throws ParseException
      Parses 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)
    • DateTimeLiteral

      public final org.apache.calcite.sql.SqlLiteral DateTimeLiteral() throws ParseException
      Parses a date/time literal.
      Throws:
      ParseException
    • MultisetConstructor

      public final org.apache.calcite.sql.SqlNode MultisetConstructor() throws ParseException
      Parses a MULTISET constructor
      Throws:
      ParseException
    • ArrayConstructor

      public final org.apache.calcite.sql.SqlNode ArrayConstructor() throws ParseException
      Parses an ARRAY constructor
      Throws:
      ParseException
    • MapConstructor

      public final org.apache.calcite.sql.SqlNode MapConstructor() throws ParseException
      Parses a MAP constructor
      Throws:
      ParseException
    • PeriodConstructor

      public final org.apache.calcite.sql.SqlNode PeriodConstructor() throws ParseException
      Parses a PERIOD constructor
      Throws:
      ParseException
    • IntervalLiteral

      public final org.apache.calcite.sql.SqlLiteral IntervalLiteral() throws ParseException
      Parses an interval literal.
      Throws:
      ParseException
    • IntervalQualifier

      public final org.apache.calcite.sql.SqlIntervalQualifier IntervalQualifier() throws ParseException
      Throws:
      ParseException
    • TimeUnit

      public final org.apache.calcite.avatica.util.TimeUnit TimeUnit() throws ParseException
      Parses time unit for EXTRACT, CEIL and FLOOR functions.
      Throws:
      ParseException
    • TimestampInterval

      public final org.apache.calcite.avatica.util.TimeUnit TimestampInterval() throws ParseException
      Throws:
      ParseException
    • DynamicParam

      public final org.apache.calcite.sql.SqlDynamicParam DynamicParam() throws ParseException
      Parses a dynamic parameter marker.
      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 ParseException
      Parses a simple identifier as an SqlIdentifier.
      Throws:
      ParseException
    • SimpleIdentifierCommaList

      public final void SimpleIdentifierCommaList(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 ParseException
      List of simple identifiers in parentheses. The position extends from the open parenthesis to the close parenthesis.
      Throws:
      ParseException
    • CompoundIdentifier

      public final org.apache.calcite.sql.SqlIdentifier CompoundIdentifier() throws ParseException
      Parses a compound identifier.
      Throws:
      ParseException
    • CompoundIdentifierTypeCommaList

      public final void CompoundIdentifierTypeCommaList(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 ParseException
      List 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 ParseException
      Parses 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.SqlIdentifier TypeName() throws ParseException
      Throws:
      ParseException
    • SqlTypeName

      public final org.apache.calcite.sql.type.SqlTypeName SqlTypeName(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.SqlIdentifier CollectionsTypeName() throws ParseException
      Throws:
      ParseException
    • CursorExpression

      public final org.apache.calcite.sql.SqlNode CursorExpression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
      Parses 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 ParseException
      Parses a call to a builtin function with special syntax.
      Throws:
      ParseException
    • TimestampAddFunctionCall

      public final org.apache.calcite.sql.SqlCall TimestampAddFunctionCall() throws ParseException
      Parses a call to TIMESTAMPADD.
      Throws:
      ParseException
    • TimestampDiffFunctionCall

      public final org.apache.calcite.sql.SqlCall TimestampDiffFunctionCall() throws ParseException
      Parses a call to TIMESTAMPDIFF.
      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
    • NamedFunctionCall

      public final org.apache.calcite.sql.SqlNode NamedFunctionCall() throws ParseException
      Parses 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
    • 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 ParseException
      Parses 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 ParseException
      Parses 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 ParseException
      Parses a function call expression with JDBC syntax.
      Throws:
      ParseException
    • BinaryQueryOperator

      public final org.apache.calcite.sql.SqlBinaryOperator BinaryQueryOperator() throws ParseException
      Parses a binary query operator like UNION.
      Throws:
      ParseException
    • BinaryMultisetOperator

      public final org.apache.calcite.sql.SqlBinaryOperator BinaryMultisetOperator() throws ParseException
      Parses a binary multiset operator.
      Throws:
      ParseException
    • BinaryRowOperator

      public final org.apache.calcite.sql.SqlBinaryOperator BinaryRowOperator() throws ParseException
      Parses a binary row operator like AND.
      Throws:
      ParseException
    • PrefixRowOperator

      public final org.apache.calcite.sql.SqlPrefixOperator PrefixRowOperator() throws ParseException
      Parses a prefix row operator like NOT.
      Throws:
      ParseException
    • PostfixRowOperator

      public final org.apache.calcite.sql.SqlPostfixOperator PostfixRowOperator() throws ParseException
      Parses a postfix row operator like IS NOT NULL.
      Throws:
      ParseException
    • CommonNonReservedKeyWord

      public final String CommonNonReservedKeyWord() throws ParseException
      Parses a non-reserved keyword for use as an identifier. Specializations of this parser can use this as a base for implementing the NonReservedKeyWord() production.

      When adding keywords to this list, be sure that they are not reserved by the SQL:2003 standard (see productions for "non-reserved word" and "reserved word" in reference below).

      Throws:
      ParseException
      See Also:
      • SQL:2003 Part 2 Section 5.2
    • UnusedExtension

      public final void UnusedExtension() throws ParseException
      Defines 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)
      Reinitialise.
    • ReInit

      public void ReInit(InputStream stream, String encoding)
      Reinitialise.
    • ReInit

      public void ReInit(Reader stream)
      Reinitialise.
      Specified by:
      ReInit in class org.apache.calcite.sql.parser.SqlAbstractParserImpl
    • ReInit

      public void ReInit(StormParserImplTokenManager tm)
      Reinitialise.
    • getNextToken

      public final Token getNextToken()
      Get the next Token.
    • getToken

      public final Token getToken(int index)
      Get the specific Token.
    • generateParseException

      public ParseException generateParseException()
      Generate ParseException.
    • trace_enabled

      public final boolean trace_enabled()
      Trace enabled.
    • enable_tracing

      public final void enable_tracing()
      Enable tracing.
    • disable_tracing

      public final void disable_tracing()
      Disable tracing.