| Package | Description |
|---|---|
| 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.type |
SQL type system.
|
| org.apache.calcite.sql.validate |
SQL validation.
|
| org.apache.calcite.sql2rel |
Translates a SQL parse tree to relational expression.
|
| Modifier and Type | Method and Description |
|---|---|
SqlValidatorScope |
SqlCallBinding.getScope()
Returns the scope of the call.
|
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
SqlAsOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlInternalOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlBinaryOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Derives the type of a call to this operator.
|
RelDataType |
SqlFunction.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlJdbcFunctionCall.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlOverOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
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.
|
protected String |
SqlCall.getCallSignature(SqlValidator validator,
SqlValidatorScope scope)
Returns a string describing the actual argument types of a call, e.g.
|
SqlMonotonicity |
SqlAsOperator.getMonotonicity(SqlCall call,
SqlValidatorScope scope) |
SqlMonotonicity |
SqlBinaryOperator.getMonotonicity(SqlCall call,
SqlValidatorScope scope) |
SqlMonotonicity |
SqlPrefixOperator.getMonotonicity(SqlCall call,
SqlValidatorScope scope) |
SqlMonotonicity |
SqlOperator.getMonotonicity(SqlCall call,
SqlValidatorScope scope)
Returns whether this operator is monotonic.
|
SqlMonotonicity |
SqlDataTypeSpec.getMonotonicity(SqlValidatorScope scope) |
SqlMonotonicity |
SqlDynamicParam.getMonotonicity(SqlValidatorScope scope) |
SqlMonotonicity |
SqlCall.getMonotonicity(SqlValidatorScope scope) |
SqlMonotonicity |
SqlIdentifier.getMonotonicity(SqlValidatorScope scope) |
SqlMonotonicity |
SqlNode.getMonotonicity(SqlValidatorScope scope)
Returns whether expression is always ascending, descending or constant.
|
SqlMonotonicity |
SqlLiteral.getMonotonicity(SqlValidatorScope scope) |
protected void |
SqlOperator.preValidateCall(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Receives notification that validation of a call to this operator is
beginning.
|
void |
SqlMerge.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlWith.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlDataTypeSpec.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlDynamicParam.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlInsert.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlDelete.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlCall.validate(SqlValidator validator,
SqlValidatorScope scope)
Validates this call.
|
void |
SqlIdentifier.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlIntervalQualifier.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlNodeList.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlUpdate.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlSelect.validate(SqlValidator validator,
SqlValidatorScope scope) |
abstract void |
SqlNode.validate(SqlValidator validator,
SqlValidatorScope scope)
Validates this node.
|
void |
SqlSetOption.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlWindow.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlLiteral.validate(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlAsOperator.validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope) |
void |
SqlSetOperator.validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope) |
void |
SqlOperator.validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope)
Validates a call to this operator.
|
void |
SqlFunction.validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope) |
void |
SqlAggFunction.validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope) |
void |
SqlOverOperator.validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope) |
void |
SqlIdentifier.validateExpr(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlNodeList.validateExpr(SqlValidator validator,
SqlValidatorScope scope) |
void |
SqlNode.validateExpr(SqlValidator validator,
SqlValidatorScope scope)
Validates this node in an expression context.
|
RelDataType |
SqlOperator.validateOperands(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Validates the operands of a call, inferring the return type in the
process.
|
| Constructor and Description |
|---|
SqlCallBinding(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Creates a call binding.
|
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
SqlAdvisorValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Calls the parent class method and mask Farrago exception thrown.
|
SqlNode |
SqlAdvisorValidator.expand(SqlNode expr,
SqlValidatorScope scope) |
protected void |
SqlAdvisorValidator.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope) |
void |
SqlAdvisorValidator.validateIdentifier(SqlIdentifier id,
SqlValidatorScope scope)
Registers the identifier and its scope into a map keyed by ParserPostion.
|
protected void |
SqlAdvisorValidator.validateOver(SqlCall call,
SqlValidatorScope scope) |
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataType> |
SqlTypeUtil.deriveAndCollectTypes(SqlValidator validator,
SqlValidatorScope scope,
List<SqlNode> operands)
Iterates over all operands, derives their types, and collects them into
a list.
|
static RelDataType |
SqlTypeUtil.makeNullableIfOperandsAre(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call,
RelDataType type)
Recreates a given RelDataType with nullability iff any of the operands
of a call are nullable.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
AggregatingScope
An extension to the
SqlValidatorScope interface which indicates that
the scope is aggregating. |
| Modifier and Type | Class and Description |
|---|---|
class |
AggregatingSelectScope
Scope for resolving identifiers within a SELECT statement that has a
GROUP BY clause.
|
class |
DelegatingScope
A scope which delegates all requests to its parent scope.
|
class |
JoinScope
The name-resolution context for expression inside a JOIN clause.
|
class |
ListScope
Abstract base for a scope which is defined by a list of child namespaces and
which inherits from a parent scope.
|
class |
OrderByScope
Represents the name-resolution context for expressions in an ORDER BY clause.
|
class |
OverScope
The name-resolution scope of a OVER clause.
|
class |
ParameterScope
A scope which contains nothing besides a few parameters.
|
class |
SelectScope
The name-resolution scope of a SELECT clause.
|
| Modifier and Type | Field and Description |
|---|---|
protected SqlValidatorScope |
DelegatingScope.parent
Parent scope.
|
SqlValidatorScope |
SqlValidatorImpl.IdInfo.scope |
| Modifier and Type | Field and Description |
|---|---|
protected Map<SqlNode,SqlValidatorScope> |
SqlValidatorImpl.scopes
Maps
query node objects to the SqlValidatorScope
scope created from them}. |
| Modifier and Type | Method and Description |
|---|---|
SqlValidatorScope |
SqlValidatorImpl.getCursorScope(SqlSelect select) |
SqlValidatorScope |
SqlValidatorImpl.getEmptyScope() |
SqlValidatorScope |
SqlValidatorImpl.getFromScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getFromScope(SqlSelect select)
Returns a scope containing the objects visible from the FROM clause of a
query.
|
SqlValidatorScope |
SqlValidatorImpl.getGroupScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getGroupScope(SqlSelect select)
Returns a scope containing the objects visible from the GROUP BY clause
of a query.
|
SqlValidatorScope |
SqlValidatorImpl.getHavingScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getHavingScope(SqlSelect select)
Returns a scope containing the objects visible from the HAVING clause of
a query.
|
SqlValidatorScope |
SqlValidatorImpl.getJoinScope(SqlNode node) |
SqlValidatorScope |
SqlValidator.getJoinScope(SqlNode node)
Returns a scope containing the objects visible from the ON and USING
sections of a JOIN clause.
|
SqlValidatorScope |
SqlValidatorScope.getOperandScope(SqlCall call)
Returns the scope within which operands to a call are to be validated.
|
SqlValidatorScope |
DelegatingScope.getOperandScope(SqlCall call) |
SqlValidatorScope |
ParameterScope.getOperandScope(SqlCall call) |
SqlValidatorScope |
AggregatingSelectScope.getOperandScope(SqlCall call) |
SqlValidatorScope |
SqlValidatorImpl.getOrderScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getOrderScope(SqlSelect select)
Returns the scope that expressions in the SELECT and HAVING clause of
this query should use.
|
SqlValidatorScope |
SqlValidatorImpl.getOverScope(SqlNode node) |
SqlValidatorScope |
SqlValidator.getOverScope(SqlNode node)
Returns the scope of an OVER or VALUES node.
|
SqlValidatorScope |
DelegatingScope.getParent()
Returns the parent scope of this
DelegatingScope. |
SqlValidatorScope |
TableConstructorNamespace.getScope()
Returns the scope.
|
protected SqlValidatorScope |
SqlScopedShuttle.getScope()
Returns the current scope.
|
SqlValidatorScope |
CollectNamespace.getScope() |
SqlValidatorScope |
SqlValidatorImpl.getSelectScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getSelectScope(SqlSelect select)
Returns the appropriate scope for validating a particular clause of a
SELECT statement.
|
SqlValidatorScope |
JoinScope.getUsingScope()
Returns the scope which is used for resolving USING clause.
|
SqlValidatorScope |
SqlValidatorImpl.getWhereScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getWhereScope(SqlSelect select)
Returns the scope that expressions in the WHERE and GROUP BY clause of
this query should use.
|
SqlValidatorScope |
SqlValidatorImpl.getWithScope(SqlNode withItem) |
SqlValidatorScope |
SqlValidator.getWithScope(SqlNode withItem) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
SqlValidatorImpl.addToSelectList(List<SqlNode> list,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> fieldList,
SqlNode exp,
SqlValidatorScope scope,
boolean includeSystemVars)
Adds an expression to a select list, ensuring that its alias does not
clash with any existing expressions on the list.
|
static void |
SqlValidatorUtil.analyzeGroupItem(SqlValidatorScope scope,
List<SqlNode> groupExprs,
Map<Integer,Integer> groupExprProjection,
com.google.common.collect.ImmutableList.Builder<com.google.common.collect.ImmutableList<ImmutableBitSet>> topBuilder,
SqlNode groupExpr)
Analyzes an expression in a GROUP BY clause.
|
static SqlNodeList |
SqlValidatorUtil.DeepCopier.copy(SqlValidatorScope scope,
SqlNodeList list)
Copies a list of nodes.
|
static SqlQualified |
SqlQualified.create(SqlValidatorScope scope,
int prefixLength,
SqlValidatorNamespace namespace,
SqlIdentifier identifier) |
void |
SqlValidatorImpl.declareCursor(SqlSelect select,
SqlValidatorScope parentScope) |
void |
SqlValidator.declareCursor(SqlSelect select,
SqlValidatorScope scope)
Declares a SELECT expression as a cursor.
|
RelDataType |
SqlValidatorImpl.deriveConstructorType(SqlValidatorScope scope,
SqlCall call,
SqlFunction unresolvedConstructor,
SqlFunction resolvedConstructor,
List<RelDataType> argTypes) |
RelDataType |
SqlValidator.deriveConstructorType(SqlValidatorScope scope,
SqlCall call,
SqlFunction unresolvedConstructor,
SqlFunction resolvedConstructor,
List<RelDataType> argTypes)
Derives the type of a constructor.
|
RelDataType |
SqlValidatorImpl.deriveType(SqlValidatorScope scope,
SqlNode expr) |
RelDataType |
SqlValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Derives the type of a node in a given scope.
|
SqlNode |
SqlValidatorImpl.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlValidator.expand(SqlNode expr,
SqlValidatorScope scope)
Expands an expression.
|
static AggregatingSelectScope |
SqlValidatorUtil.getEnclosingAggregateSelectScope(SqlValidatorScope scope) |
static SelectScope |
SqlValidatorUtil.getEnclosingSelectScope(SqlValidatorScope scope) |
protected SqlWindow |
SqlValidatorImpl.getWindowByName(SqlIdentifier id,
SqlValidatorScope scope) |
protected void |
SqlValidatorImpl.inferUnknownTypes(RelDataType inferredType,
SqlValidatorScope scope,
SqlNode node) |
static SqlValidatorNamespace |
SqlValidatorUtil.lookup(SqlValidatorScope scope,
List<String> names)
Resolves a multi-part identifier such as "SCHEMA.EMP.EMPNO" to a
namespace.
|
void |
SqlValidatorImpl.lookupNameCompletionHints(SqlValidatorScope scope,
List<String> names,
SqlParserPos pos,
Collection<SqlMoniker> hintList)
Populates a list of all the valid alternatives for an identifier.
|
protected void |
SqlValidatorImpl.registerNamespace(SqlValidatorScope usingScope,
String alias,
SqlValidatorNamespace ns,
boolean forceNullable)
Registers a new namespace, and adds it as a child of its parent scope.
|
SqlValidatorNamespace |
SqlValidatorScope.resolve(List<String> names,
SqlValidatorScope[] ancestorOut,
int[] offsetOut)
Looks up a node with a given name.
|
SqlValidatorNamespace |
DelegatingScope.resolve(List<String> names,
SqlValidatorScope[] ancestorOut,
int[] offsetOut) |
SqlValidatorNamespace |
ListScope.resolve(List<String> names,
SqlValidatorScope[] ancestorOut,
int[] offsetOut) |
SqlValidatorNamespace |
ParameterScope.resolve(List<String> names,
SqlValidatorScope[] ancestorOut,
int[] offsetOut) |
SqlWindow |
SqlValidatorImpl.resolveWindow(SqlNode windowOrRef,
SqlValidatorScope scope,
boolean populateBounds) |
SqlWindow |
SqlValidator.resolveWindow(SqlNode windowOrRef,
SqlValidatorScope scope,
boolean populateBounds)
Converts a window specification or window name into a fully-resolved
window specification.
|
void |
SqlValidatorImpl.validateAggregateParams(SqlCall aggFunction,
SqlValidatorScope scope) |
void |
SqlValidator.validateAggregateParams(SqlCall aggFunction,
SqlValidatorScope scope)
Validates parameters for aggregate function.
|
void |
SqlValidatorImpl.validateCall(SqlCall call,
SqlValidatorScope scope) |
void |
SqlValidator.validateCall(SqlCall call,
SqlValidatorScope scope)
Validates a call to an operator.
|
protected void |
SqlValidatorImpl.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope)
Validates the FROM clause of a query, or (recursively) a child node of
the FROM clause: AS, OVER, JOIN, VALUES, or subquery.
|
void |
SqlValidatorImpl.validateIdentifier(SqlIdentifier id,
SqlValidatorScope scope) |
void |
SqlValidator.validateIdentifier(SqlIdentifier id,
SqlValidatorScope scope)
Resolves an identifier to a fully-qualified name.
|
protected void |
SqlValidatorImpl.validateJoin(SqlJoin join,
SqlValidatorScope scope) |
protected void |
SqlValidatorImpl.validateOver(SqlCall call,
SqlValidatorScope scope) |
void |
SqlValidatorImpl.validateQuery(SqlNode node,
SqlValidatorScope scope) |
void |
SqlValidator.validateQuery(SqlNode node,
SqlValidatorScope scope)
Checks that a query is valid.
|
protected void |
SqlValidatorImpl.validateValues(SqlCall node,
RelDataType targetRowType,
SqlValidatorScope scope)
Validates a VALUES clause.
|
protected void |
SqlValidatorImpl.validateWhereOrOn(SqlValidatorScope scope,
SqlNode condition,
String keyword) |
void |
SqlValidatorImpl.validateWindow(SqlNode windowOrId,
SqlValidatorScope scope,
SqlCall call) |
void |
SqlValidator.validateWindow(SqlNode windowOrId,
SqlValidatorScope scope,
SqlCall call)
Validates the right-hand side of an OVER expression.
|
void |
SqlValidatorImpl.validateWith(SqlWith with,
SqlValidatorScope scope) |
void |
SqlValidator.validateWith(SqlWith with,
SqlValidatorScope scope) |
| Constructor and Description |
|---|
ListScope(SqlValidatorScope parent) |
SqlScopedShuttle(SqlValidatorScope initialScope) |
SqlValidatorImpl.DmlNamespace(SqlValidatorImpl validator,
SqlNode id,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
SqlValidatorImpl.IdInfo(SqlValidatorScope scope,
SqlIdentifier id) |
| Modifier and Type | Field and Description |
|---|---|
SqlValidatorScope |
SqlToRelConverter.Blackboard.scope
Collection of
RelNode objects which correspond to a SELECT
statement. |
| Modifier and Type | Method and Description |
|---|---|
protected SqlToRelConverter.Blackboard |
SqlToRelConverter.createBlackboard(SqlValidatorScope scope,
Map<String,RexNode> nameToNodeMap)
Factory method for creating translation workspace.
|
| Constructor and Description |
|---|
SqlToRelConverter.Blackboard(SqlValidatorScope scope,
Map<String,RexNode> nameToNodeMap)
Creates a Blackboard.
|
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.