| Package | Description |
|---|---|
| org.apache.calcite.rel.rel2sql |
Translates a relational expression to SQL parse tree.
|
| 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.validate |
SQL validation.
|
| org.apache.calcite.sql2rel |
Translates a SQL parse tree to relational expression.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) SqlSelect |
SqlImplementor.Builder.select |
| Modifier and Type | Method and Description |
|---|---|
SqlSelect |
SqlImplementor.Result.asSelect()
Converts a non-query node into a SELECT node.
|
SqlSelect |
SqlImplementor.Result.subSelect() |
(package private) SqlSelect |
SqlImplementor.wrapSelect(SqlNode node)
Wraps a node in a SELECT statement that has no clauses:
"SELECT ...
|
| Constructor and Description |
|---|
Builder(RelNode rel,
List<SqlImplementor.Clause> clauses,
SqlSelect select,
SqlImplementor.Context context,
Map<String,RelDataType> aliases) |
| Modifier and Type | Field and Description |
|---|---|
(package private) SqlSelect |
SqlUpdate.sourceSelect |
(package private) SqlSelect |
SqlMerge.sourceSelect |
(package private) SqlSelect |
SqlDelete.sourceSelect |
| Modifier and Type | Method and Description |
|---|---|
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. |
SqlSelect |
SqlUpdate.getSourceSelect()
Gets the source SELECT expression for the data to be updated.
|
SqlSelect |
SqlMerge.getSourceSelect()
Gets the source SELECT expression for the data to be updated/inserted.
|
SqlSelect |
SqlDelete.getSourceSelect()
Gets the source SELECT expression for the data to be deleted.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlNode |
SqlUtil.getFromNode(SqlSelect query,
int ordinal)
Returns the
nth (0-based) input to a join expression. |
void |
SqlInsert.setSource(SqlSelect source) |
void |
SqlUpdate.setSourceSelect(SqlSelect sourceSelect) |
void |
SqlMerge.setSourceSelect(SqlSelect sourceSelect) |
void |
SqlDelete.setSourceSelect(SqlSelect sourceSelect) |
| Constructor and Description |
|---|
SqlDelete(SqlParserPos pos,
SqlNode targetTable,
SqlNode condition,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlMerge(SqlParserPos pos,
SqlNode targetTable,
SqlNode condition,
SqlNode source,
SqlUpdate updateCall,
SqlInsert insertCall,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlUpdate(SqlParserPos pos,
SqlNode targetTable,
SqlNodeList targetColumnList,
SqlNodeList sourceExpressionList,
SqlNode condition,
SqlSelect sourceSelect,
SqlIdentifier alias) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlAdvisorValidator.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
protected void |
SqlAdvisorValidator.validateHavingClause(SqlSelect select)
Calls the parent class method and masks Farrago exception thrown.
|
boolean |
SqlAdvisorValidator.validateModality(SqlSelect select,
SqlModality modality,
boolean fail) |
protected void |
SqlAdvisorValidator.validateWhereClause(SqlSelect select)
Calls the parent class method and masks Farrago exception thrown.
|
| Modifier and Type | Field and Description |
|---|---|
private SqlSelect |
SelectScope.select |
private SqlSelect |
OrderByScope.select |
private SqlSelect |
AggregatingSelectScope.select |
private SqlSelect |
SelectNamespace.select |
private SqlSelect |
SqlValidatorImpl.OrderExpressionExpander.select |
(package private) SqlSelect |
SqlValidatorImpl.ExtendedExpander.select |
private SqlSelect |
GroupByScope.select |
| Modifier and Type | Field and Description |
|---|---|
Map<Integer,SqlSelect> |
SqlValidatorImpl.FunctionParamInfo.cursorPosToSelectMap
Maps a cursor (based on its position relative to other cursor
parameters within a function call) to the SELECT associated with the
cursor.
|
private Map<SqlSelect,SqlValidatorScope> |
SqlValidatorImpl.cursorScopes
Maps a
SqlSelect node that is the argument to a CURSOR
constructor to the scope of the result of that select node |
private Map<SqlSelect,SqlValidatorScope> |
SqlValidatorImpl.groupByScopes
Maps a
SqlSelect node to the scope used by its GROUP BY clause. |
private Map<SqlSelect,SqlValidatorScope> |
SqlValidatorImpl.orderScopes
Maps a
SqlSelect node to the scope used by its ORDER BY clause. |
private Map<SqlSelect,SqlValidatorScope> |
SqlValidatorImpl.selectScopes
Maps a
SqlSelect node to the scope used by its SELECT and HAVING
clauses. |
private Map<SqlSelect,SqlValidatorScope> |
SqlValidatorImpl.whereScopes
Maps a
SqlSelect node to the scope used by its WHERE and HAVING
clauses. |
| Modifier and Type | Method and Description |
|---|---|
protected SqlSelect |
SqlValidatorImpl.createSourceSelectForDelete(SqlDelete call)
Creates the SELECT statement that putatively feeds rows into a DELETE
statement to be deleted.
|
protected SqlSelect |
SqlValidatorImpl.createSourceSelectForUpdate(SqlUpdate call)
Creates the SELECT statement that putatively feeds rows into an UPDATE
statement to be updated.
|
private SqlSelect |
SqlValidatorImpl.getInnerSelect(SqlNode node) |
SqlSelect |
SelectScope.getNode() |
SqlSelect |
SelectNamespace.getNode() |
| Modifier and Type | Method and Description |
|---|---|
private void |
SqlValidatorImpl.checkRollUpInGroupBy(SqlSelect select) |
private void |
SqlValidatorImpl.checkRollUpInOrderBy(SqlSelect select) |
private void |
SqlValidatorImpl.checkRollUpInSelectList(SqlSelect select) |
private void |
SqlValidatorImpl.checkRollUpInWindowDecl(SqlSelect select) |
protected SelectNamespace |
SqlValidatorImpl.createSelectNamespace(SqlSelect select,
SqlNode enclosingNode)
Creates a namespace for a
SELECT node. |
void |
SqlValidator.declareCursor(SqlSelect select,
SqlValidatorScope scope)
Declares a SELECT expression as a cursor.
|
void |
SqlValidatorImpl.declareCursor(SqlSelect select,
SqlValidatorScope parentScope) |
SqlNode |
SqlValidatorImpl.expandGroupByOrHavingExpr(SqlNode expr,
SqlValidatorScope scope,
SqlSelect select,
boolean havingExpression) |
SqlNode |
SqlValidator.expandOrderExpr(SqlSelect select,
SqlNode orderExpr)
Expands an expression in the ORDER BY clause into an expression with the
same semantics as expressions in the SELECT clause.
|
SqlNode |
SqlValidatorImpl.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
private boolean |
SqlValidatorImpl.expandSelectItem(SqlNode selectItem,
SqlSelect select,
RelDataType targetType,
List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars)
If
selectItem is "*" or "TABLE.*", expands it and returns
true; otherwise writes the unexpanded item. |
SqlNodeList |
SqlValidator.expandStar(SqlNodeList selectList,
SqlSelect query,
boolean includeSystemVars)
Returns a list of expressions, with every occurrence of "*" or
"TABLE.*" expanded.
|
SqlNodeList |
SqlValidatorImpl.expandStar(SqlNodeList selectList,
SqlSelect select,
boolean includeSystemVars) |
private SqlNode |
SqlValidatorImpl.getAgg(SqlSelect select)
If there is at least one call to an aggregate function, returns the
first.
|
protected SqlNode |
SqlValidatorImpl.getAggregate(SqlSelect select)
Returns the parse tree node (GROUP BY, HAVING, or an aggregate function
call) that causes
select to be an aggregate query, or null if it
is not an aggregate query. |
SqlValidatorScope |
SqlValidatorImpl.getCursorScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getFromScope(SqlSelect select)
Returns a scope containing the objects visible from the FROM clause of a
query.
|
SqlValidatorScope |
SqlValidatorImpl.getFromScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getGroupScope(SqlSelect select)
Returns a scope containing the objects visible from the GROUP BY clause
of a query.
|
SqlValidatorScope |
SqlValidatorImpl.getGroupScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getHavingScope(SqlSelect select)
Returns a scope containing the objects visible from the HAVING clause of
a query.
|
SqlValidatorScope |
SqlValidatorImpl.getHavingScope(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.getOrderScope(SqlSelect select) |
SelectScope |
SqlValidator.getRawSelectScope(SqlSelect select)
Returns the scope for resolving the SELECT, GROUP BY and HAVING clauses.
|
SelectScope |
SqlValidatorImpl.getRawSelectScope(SqlSelect select) |
SqlValidatorScope |
SqlValidator.getSelectScope(SqlSelect select)
Returns the appropriate scope for validating a particular clause of a
SELECT statement.
|
SqlValidatorScope |
SqlValidatorImpl.getSelectScope(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.getWhereScope(SqlSelect select) |
private void |
SqlValidatorImpl.handleScalarSubQuery(SqlSelect parentSelect,
SqlSelect selectItem,
List<SqlNode> expandedSelectItems,
Set<String> aliasList,
List<Map.Entry<String,RelDataType>> fieldList)
Processes SubQuery found in Select list.
|
boolean |
SqlValidator.isAggregate(SqlSelect select)
Returns whether a SELECT statement is an aggregation.
|
boolean |
SqlValidatorImpl.isAggregate(SqlSelect select) |
(package private) void |
SqlValidatorImpl.lookupSelectHints(SqlSelect select,
SqlParserPos pos,
Collection<SqlMoniker> hintList)
Looks up completion hints for a syntactically correct select SQL that has
been parsed into an expression tree.
|
private void |
SqlValidatorImpl.validateGroupByItem(SqlSelect select,
SqlNode groupByItem)
Validates an item in the GROUP BY clause of a SELECT statement.
|
protected void |
SqlValidatorImpl.validateGroupClause(SqlSelect select)
Validates the GROUP BY clause of a SELECT statement.
|
protected void |
SqlValidatorImpl.validateHavingClause(SqlSelect select) |
boolean |
SqlValidator.validateModality(SqlSelect select,
SqlModality modality,
boolean fail)
Validates that a query is capable of producing a return of given modality
(relational or streaming).
|
boolean |
SqlValidatorImpl.validateModality(SqlSelect select,
SqlModality modality,
boolean fail) |
private void |
SqlValidatorImpl.validateOrderItem(SqlSelect select,
SqlNode orderItem)
Validates an item in the ORDER BY clause of a SELECT statement.
|
protected void |
SqlValidatorImpl.validateOrderList(SqlSelect select)
Validates the ORDER BY clause of a SELECT statement.
|
protected void |
SqlValidatorImpl.validateSelect(SqlSelect select,
RelDataType targetRowType)
Validates a SELECT statement.
|
protected RelDataType |
SqlValidatorImpl.validateSelectList(SqlNodeList selectItems,
SqlSelect select,
RelDataType targetRowType) |
protected void |
SqlValidatorImpl.validateWhereClause(SqlSelect select) |
protected void |
SqlValidatorImpl.validateWindowClause(SqlSelect select) |
| Constructor and Description |
|---|
AggregatingSelectScope(SqlValidatorScope selectScope,
SqlSelect select,
boolean distinct)
Creates an AggregatingSelectScope
|
ExtendedExpander(SqlValidatorImpl validator,
SqlValidatorScope scope,
SqlSelect select,
SqlNode root,
boolean havingExpr) |
GroupByScope(SqlValidatorScope parent,
SqlNodeList groupByList,
SqlSelect select) |
OrderByScope(SqlValidatorScope parent,
SqlNodeList orderList,
SqlSelect select) |
OrderExpressionExpander(SqlSelect select,
SqlNode root) |
SelectNamespace(SqlValidatorImpl validator,
SqlSelect select,
SqlNode enclosingNode)
Creates a SelectNamespace.
|
SelectScope(SqlValidatorScope parent,
SqlValidatorScope winParent,
SqlSelect select)
Creates a scope corresponding to a SELECT clause.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
SqlToRelConverter.convertAgg(SqlToRelConverter.Blackboard bb,
SqlSelect select,
List<SqlNode> orderExprList)
Converts the SELECT, GROUP BY and HAVING clauses of an aggregate query.
|
protected void |
SqlToRelConverter.convertOrder(SqlSelect select,
SqlToRelConverter.Blackboard bb,
RelCollation collation,
List<SqlNode> orderExprList,
SqlNode offset,
SqlNode fetch)
Converts a query's ORDER BY clause, if any.
|
protected RelFieldCollation |
SqlToRelConverter.convertOrderItem(SqlSelect select,
SqlNode orderItem,
List<SqlNode> extraExprs,
RelFieldCollation.Direction direction,
RelFieldCollation.NullDirection nullDirection) |
RelNode |
SqlToRelConverter.convertSelect(SqlSelect select,
boolean top)
Converts a SELECT statement's parse tree into a relational expression.
|
protected void |
SqlToRelConverter.convertSelectImpl(SqlToRelConverter.Blackboard bb,
SqlSelect select)
Implementation of
SqlToRelConverter.convertSelect(SqlSelect, boolean);
derived class may override. |
private void |
SqlToRelConverter.convertSelectList(SqlToRelConverter.Blackboard bb,
SqlSelect select,
List<SqlNode> orderList) |
protected void |
SqlToRelConverter.extraSelectItems(SqlToRelConverter.Blackboard bb,
SqlSelect select,
List<RexNode> exprList,
List<String> nameList,
Collection<String> aliasList,
List<SqlMonotonicity> columnMonotonicityList)
Adds extra select items.
|
protected void |
SqlToRelConverter.gatherOrderExprs(SqlToRelConverter.Blackboard bb,
SqlSelect select,
SqlNodeList orderList,
List<SqlNode> extraOrderExprs,
List<RelFieldCollation> collationList)
Creates a list of collations required to implement the ORDER BY clause,
if there is one.
|
| Constructor and Description |
|---|
AggConverter(SqlToRelConverter.Blackboard bb,
SqlSelect select)
Creates an AggConverter.
|
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.