| Package | Description |
|---|---|
| org.apache.calcite.adapter.jdbc |
Query provider based on a JDBC data source.
|
| org.apache.calcite.sql |
Provides a SQL parser and object model.
|
| org.apache.calcite.sql.advise |
Provides hints and corrections for editing SQL statements.
|
| org.apache.calcite.sql.fun |
Defines the set of standard SQL row-level functions and
operators.
|
| org.apache.calcite.sql.parser |
Provides a SQL parser.
|
| org.apache.calcite.sql.parser.impl |
Contains generated code for the
Calcite SQL parser. |
| org.apache.calcite.sql.type |
SQL type system.
|
| org.apache.calcite.sql.validate |
SQL validation.
|
| Modifier and Type | Field and Description |
|---|---|
static SqlParserPos |
JdbcImplementor.POS |
| Modifier and Type | Field and Description |
|---|---|
protected SqlParserPos |
SqlNode.pos |
| Modifier and Type | Method and Description |
|---|---|
SqlParserPos |
SqlIdentifier.getComponentParserPosition(int i)
Returns the position of the
ith component of a compound
identifier, or the position of the whole identifier if that information
is not present. |
SqlParserPos |
SqlNode.getParserPosition() |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlDataTypeSpec.clone(SqlParserPos pos) |
SqlNode |
SqlDynamicParam.clone(SqlParserPos pos) |
SqlNode |
SqlCharStringLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlNumericLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlCall.clone(SqlParserPos pos) |
SqlNode |
SqlIdentifier.clone(SqlParserPos pos) |
SqlNode |
SqlIntervalQualifier.clone(SqlParserPos pos) |
SqlNodeList |
SqlNodeList.clone(SqlParserPos pos) |
SqlNode |
SqlTimeLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlDateLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlIntervalLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlTimestampLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlNode.clone(SqlParserPos pos)
Clones a SqlNode with a different position.
|
SqlNode |
SqlLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlBinaryStringLiteral.clone(SqlParserPos pos) |
static SqlWindow |
SqlWindow.create(SqlIdentifier declName,
SqlIdentifier refName,
SqlNodeList partitionList,
SqlNodeList orderList,
SqlLiteral isRows,
SqlNode lowerBound,
SqlNode upperBound,
SqlLiteral allowPartial,
SqlParserPos pos) |
static SqlNumericLiteral |
SqlLiteral.createApproxNumeric(String s,
SqlParserPos pos) |
static SqlBinaryStringLiteral |
SqlLiteral.createBinaryString(byte[] bytes,
SqlParserPos pos)
Creates a literal like X'ABAB' from an array of bytes.
|
static SqlBinaryStringLiteral |
SqlLiteral.createBinaryString(String s,
SqlParserPos pos)
Creates a literal like X'ABAB'.
|
static SqlLiteral |
SqlLiteral.createBoolean(boolean b,
SqlParserPos pos)
Creates a boolean literal.
|
SqlCall |
SqlOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands)
Creates a call to this operand with an array of operands.
|
SqlCall |
SqlJdbcFunctionCall.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlJoin.SqlJoinOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlSelectOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlSelect |
SqlSelectOperator.createCall(SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode fromClause,
SqlNode whereClause,
SqlNodeList groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNodeList orderBy,
SqlNode offset,
SqlNode fetch,
SqlParserPos pos)
Creates a call to the
SELECT operator. |
SqlCall |
SqlOperator.createCall(SqlParserPos pos,
List<? extends SqlNode> operandList)
Creates a call to this operand with a list of operands.
|
SqlCall |
SqlOperator.createCall(SqlParserPos pos,
SqlNode... operands)
Creates a call to this operand with an array of operands.
|
static SqlCharStringLiteral |
SqlLiteral.createCharString(String s,
SqlParserPos pos)
Creates a string literal in the system character set.
|
static SqlCharStringLiteral |
SqlLiteral.createCharString(String s,
String charSet,
SqlParserPos pos)
Creates a string literal, with optional character-set.
|
static SqlNode |
SqlWindow.createCurrentRow(SqlParserPos pos) |
static SqlDateLiteral |
SqlLiteral.createDate(Calendar calendar,
SqlParserPos pos) |
static SqlNumericLiteral |
SqlLiteral.createExactNumeric(String s,
SqlParserPos pos) |
static SqlNode |
SqlWindow.createFollowing(SqlNode e,
SqlParserPos pos) |
static SqlIntervalLiteral |
SqlLiteral.createInterval(int sign,
String intervalStr,
SqlIntervalQualifier intervalQualifier,
SqlParserPos pos)
Creates an interval literal.
|
static SqlNumericLiteral |
SqlLiteral.createNegative(SqlNumericLiteral num,
SqlParserPos pos) |
static SqlLiteral |
SqlLiteral.createNull(SqlParserPos pos)
Creates a NULL literal.
|
static SqlNode |
SqlWindow.createPreceding(SqlNode e,
SqlParserPos pos) |
static SqlLiteral |
SqlLiteral.createSample(SqlSampleSpec sampleSpec,
SqlParserPos pos)
Creates a literal which represents a sample specification.
|
static SqlLiteral |
SqlLiteral.createSymbol(SqlLiteral.SqlSymbol o,
SqlParserPos pos)
Creates a literal which represents a parser symbol, for example the
TRAILING keyword in the call Trim(TRAILING 'x' FROM
'Hello world!'). |
static SqlTimeLiteral |
SqlLiteral.createTime(Calendar calendar,
int precision,
SqlParserPos pos) |
static SqlTimestampLiteral |
SqlLiteral.createTimestamp(Calendar calendar,
int precision,
SqlParserPos pos) |
static SqlNode |
SqlWindow.createUnboundedFollowing(SqlParserPos pos) |
static SqlNode |
SqlWindow.createUnboundedPreceding(SqlParserPos pos) |
static SqlLiteral |
SqlLiteral.createUnknown(SqlParserPos pos) |
int[] |
SqlIntervalQualifier.evaluateIntervalLiteral(String value,
SqlParserPos pos,
RelDataTypeSystem typeSystem)
Validates an INTERVAL literal according to the rules specified by the
interval qualifier.
|
void |
SqlCall.findValidOptions(SqlValidator validator,
SqlValidatorScope scope,
SqlParserPos pos,
Collection<SqlMoniker> hintList) |
void |
SqlNode.findValidOptions(SqlValidator validator,
SqlValidatorScope scope,
SqlParserPos pos,
Collection<SqlMoniker> hintList)
Lists all the valid alternatives for this node if the parse position of
the node matches that of pos.
|
static CalciteContextException |
SqlUtil.newContextException(SqlParserPos pos,
Resources.ExInst<?> e)
Wraps an exception with context.
|
static CalciteException |
SqlUtil.newContextException(SqlParserPos pos,
Resources.ExInst<?> e,
String inputText)
Wraps an exception with context.
|
SqlIdentifier |
SqlIdentifier.plus(String name,
SqlParserPos pos)
Creates an identifier that consists of this identifier plus a name segment.
|
SqlLiteral |
SemiJoinType.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this
condition type keyword at a particular position in the parsed
text.
|
SqlLiteral |
SqlInsertKeyword.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this keyword
at a particular position in the parsed text.
|
SqlLiteral |
SqlSelectKeyword.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this keyword
at a particular position in the parsed text.
|
SqlLiteral |
SqlExplain.Depth.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this symbol
at a particular position in the parsed text.
|
SqlLiteral |
SqlExplainLevel.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this symbol at
a particular position in the parsed text.
|
SqlLiteral |
JoinConditionType.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this join
type at a particular position in the parsed text.
|
SqlLiteral |
JoinType.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this
condition type keyword at a particular position in the parsed
text.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SqlIdentifier.setNames(List<String> names,
List<SqlParserPos> poses)
Modifies the components of this identifier and their positions.
|
| Constructor and Description |
|---|
SqlBasicCall(SqlOperator operator,
SqlNode[] operands,
SqlParserPos pos) |
SqlBasicCall(SqlOperator operator,
SqlNode[] operands,
SqlParserPos pos,
boolean expanded,
SqlLiteral functionQualifier) |
SqlBinaryStringLiteral(BitString val,
SqlParserPos pos) |
SqlCall(SqlParserPos pos) |
SqlCharStringLiteral(NlsString val,
SqlParserPos pos) |
SqlDataTypeSpec(SqlIdentifier typeName,
int precision,
int scale,
String charSetName,
TimeZone timeZone,
SqlParserPos pos)
Creates a type specification representing a regular, non-collection type.
|
SqlDataTypeSpec(SqlIdentifier collectionsTypeName,
SqlIdentifier typeName,
int precision,
int scale,
String charSetName,
SqlParserPos pos)
Creates a type specification representing a collection type.
|
SqlDataTypeSpec(SqlIdentifier collectionsTypeName,
SqlIdentifier typeName,
int precision,
int scale,
String charSetName,
TimeZone timeZone,
Boolean nullable,
SqlParserPos pos)
Creates a type specification.
|
SqlDelete(SqlParserPos pos,
SqlNode targetTable,
SqlNode condition,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlDynamicParam(int index,
SqlParserPos pos) |
SqlExplain(SqlParserPos pos,
SqlNode explicandum,
SqlLiteral detailLevel,
SqlLiteral depth,
SqlLiteral asXml,
int dynamicParameterCount) |
SqlIdentifier(List<String> names,
SqlCollation collation,
SqlParserPos pos,
List<SqlParserPos> componentPositions)
Creates a compound identifier, for example
foo.bar. |
SqlIdentifier(List<String> names,
SqlParserPos pos) |
SqlIdentifier(String name,
SqlCollation collation,
SqlParserPos pos)
Creates a simple identifier, for example
foo, with a
collation. |
SqlIdentifier(String name,
SqlParserPos pos)
Creates a simple identifier, for example
foo. |
SqlInsert(SqlParserPos pos,
SqlNodeList keywords,
SqlNode targetTable,
SqlNode source,
SqlNodeList columnList) |
SqlIntervalLiteral(int sign,
String intervalStr,
SqlIntervalQualifier intervalQualifier,
SqlTypeName sqlTypeName,
SqlParserPos pos) |
SqlIntervalQualifier(TimeUnit startUnit,
int startPrecision,
TimeUnit endUnit,
int fractionalSecondPrecision,
SqlParserPos pos) |
SqlIntervalQualifier(TimeUnit startUnit,
TimeUnit endUnit,
SqlParserPos pos) |
SqlJoin(SqlParserPos pos,
SqlNode left,
SqlLiteral natural,
SqlLiteral joinType,
SqlNode right,
SqlLiteral conditionType,
SqlNode condition) |
SqlLiteral(Object value,
SqlTypeName typeName,
SqlParserPos pos)
Creates a
SqlLiteral. |
SqlMerge(SqlParserPos pos,
SqlNode targetTable,
SqlNode condition,
SqlNode source,
SqlUpdate updateCall,
SqlInsert insertCall,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlNodeList(Collection<? extends SqlNode> collection,
SqlParserPos pos)
Creates a
SqlNodeList containing the nodes in
list. |
SqlNodeList(SqlParserPos pos)
Creates an empty
SqlNodeList. |
SqlNumericLiteral(BigDecimal value,
Integer prec,
Integer scale,
boolean isExact,
SqlParserPos pos) |
SqlOrderBy(SqlParserPos pos,
SqlNode query,
SqlNodeList orderList,
SqlNode offset,
SqlNode fetch) |
SqlSelect(SqlParserPos pos,
SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode from,
SqlNode where,
SqlNodeList groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNodeList orderBy,
SqlNode offset,
SqlNode fetch) |
SqlSetOption(SqlParserPos pos,
String scope,
String name,
SqlNode value)
Creates a node.
|
SqlTimestampLiteral(Calendar cal,
int precision,
boolean hasTimeZone,
SqlParserPos pos) |
SqlTimestampLiteral(Calendar cal,
int precision,
boolean hasTimeZone,
String format,
SqlParserPos pos) |
SqlUpdate(SqlParserPos pos,
SqlNode targetTable,
SqlNodeList targetColumnList,
SqlNodeList sourceExpressionList,
SqlNode condition,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlWindow(SqlParserPos pos,
SqlIdentifier declName,
SqlIdentifier refName,
SqlNodeList partitionList,
SqlNodeList orderList,
SqlLiteral isRows,
SqlNode lowerBound,
SqlNode upperBound,
SqlLiteral allowPartial)
Creates a window.
|
SqlWith(SqlParserPos pos,
SqlNodeList withList,
SqlNode body) |
SqlWithItem(SqlParserPos pos,
SqlIdentifier name,
SqlNodeList columnList,
SqlNode query) |
| Constructor and Description |
|---|
SqlIdentifier(List<String> names,
SqlCollation collation,
SqlParserPos pos,
List<SqlParserPos> componentPositions)
Creates a compound identifier, for example
foo.bar. |
| Modifier and Type | Method and Description |
|---|---|
List<SqlMoniker> |
SqlAdvisor.getCompletionHints(String sql,
SqlParserPos pos)
Gets completion hints for a syntactically correct sql statement with dummy
SqlIdentifier
|
| Constructor and Description |
|---|
SqlAdvisor.ValidateErrorInfo(SqlParserPos pos,
String errorMsg)
Creates a new ValidateErrorInfo with a SqlParserPos and an error
string.
|
| Modifier and Type | Method and Description |
|---|---|
SqlCall |
SqlCaseOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlTrimFunction.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
static SqlCase |
SqlCase.createSwitched(SqlParserPos pos,
SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
SqlNode elseClause)
Creates a call to the switched form of the case operator, viz:
CASE value |
SqlLiteral |
SqlTrimFunction.Flag.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this flag
at a particular position in the parsed text.
|
| Constructor and Description |
|---|
SqlCase(SqlParserPos pos,
SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
SqlNode elseExpr)
Creates a SqlCase expression.
|
| Modifier and Type | Field and Description |
|---|---|
SqlParserPos |
SqlParserUtil.StringAndPos.pos |
static SqlParserPos |
SqlParserPos.ZERO
SqlParserPos representing line one, character one.
|
| Modifier and Type | Method and Description |
|---|---|
SqlParserPos |
SqlParserUtil.ToTreeListItem.getPos() |
SqlParserPos |
SqlParseException.getPos()
Returns the position where this error occurred.
|
SqlParserPos |
SqlParserPos.plus(SqlParserPos pos)
Combines this parser position with another to create a
position that spans from the first point in the first to the last point
in the other.
|
SqlParserPos |
SqlParserPos.plusAll(Collection<SqlNode> nodeList)
Combines this parser position with a list of positions.
|
SqlParserPos |
SqlParserPos.plusAll(SqlNode[] nodes)
Combines this parser position with an array of positions to create a
position that spans from the first point in the first to the last point
in the other.
|
static SqlParserPos |
SqlParserPos.sum(Iterable<SqlParserPos> poses)
Combines an array of parser positions to create a position which spans
from the beginning of the first to the end of the last.
|
static SqlParserPos |
SqlParserPos.sum(List<? extends SqlNode> nodes)
Combines the parser positions of a list of nodes to create a position
which spans from the beginning of the first to the end of the last.
|
static SqlParserPos |
SqlParserPos.sum(SqlNode[] nodes)
Combines the parser positions of an array of nodes to create a position
which spans from the beginning of the first to the end of the last.
|
| Modifier and Type | Method and Description |
|---|---|
protected SqlCall |
SqlAbstractParserImpl.createCall(SqlIdentifier funName,
SqlParserPos pos,
SqlFunctionCategory funcType,
SqlLiteral functionQualifier,
SqlNode[] operands)
Creates a call.
|
boolean |
SqlParserPos.overlaps(SqlParserPos pos) |
SqlParserPos |
SqlParserPos.plus(SqlParserPos pos)
Combines this parser position with another to create a
position that spans from the first point in the first to the last point
in the other.
|
boolean |
SqlParserPos.startsAt(SqlParserPos pos) |
| Modifier and Type | Method and Description |
|---|---|
static SqlParserPos |
SqlParserPos.sum(Iterable<SqlParserPos> poses)
Combines an array of parser positions to create a position which spans
from the beginning of the first to the end of the last.
|
| Constructor and Description |
|---|
SqlParseException(String message,
SqlParserPos pos,
int[][] expectedTokenSequences,
String[] tokenImages,
Throwable parserException)
Creates a SqlParseException.
|
SqlParserUtil.ToTreeListItem(SqlOperator op,
SqlParserPos pos) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlParserImpl.ExplicitTable(SqlParserPos pos)
Parses an explicit TABLE t reference.
|
SqlNodeList |
SqlParserImpl.ExpressionCommaList(SqlParserPos pos,
SqlAbstractParserImpl.ExprContext exprContext)
Parses a list of expressions separated by commas.
|
SqlNode |
SqlParserImpl.FloorCeilOptions(SqlParserPos pos,
boolean floorFlag) |
SqlNodeList |
SqlParserImpl.RowConstructorList(SqlParserPos pos)
Parses one or more rows in a VALUES expression.
|
SqlNode |
SqlParserImpl.StandardFloorCeilOptions(SqlParserPos pos,
boolean floorFlag) |
SqlNode |
SqlParserImpl.TableFunctionCall(SqlParserPos pos) |
| Modifier and Type | Method and Description |
|---|---|
SqlLiteral |
SqlTypeName.createLiteral(Object o,
SqlParserPos pos) |
| Modifier and Type | Method and Description |
|---|---|
List<SqlMoniker> |
SqlValidatorImpl.lookupHints(SqlNode topNode,
SqlParserPos pos) |
List<SqlMoniker> |
SqlValidatorWithHints.lookupHints(SqlNode topNode,
SqlParserPos pos)
Looks up completion hints for a syntactically correct SQL statement that
has been parsed into an expression tree.
|
void |
SqlValidatorImpl.lookupNameCompletionHints(SqlValidatorScope scope,
List<String> names,
SqlParserPos pos,
Collection<SqlMoniker> hintList)
Populates a list of all the valid alternatives for an identifier.
|
SqlMoniker |
SqlValidatorImpl.lookupQualifiedName(SqlNode topNode,
SqlParserPos pos) |
SqlMoniker |
SqlValidatorWithHints.lookupQualifiedName(SqlNode topNode,
SqlParserPos pos)
Looks up the fully qualified name for a
SqlIdentifier at a given
Parser Position in a parsed expression tree Note: call this only after
SqlValidator.validate(org.apache.calcite.sql.SqlNode) has been called. |
protected void |
SqlValidatorImpl.validateFeature(Feature feature,
SqlParserPos context)
Validates that a particular feature is enabled.
|
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.