|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.sql.validate.DelegatingScope
org.eigenbase.sql.validate.AggregatingSelectScope
public class AggregatingSelectScope
Scope for resolving identifers within a SELECT statement which has a GROUP BY clause.
The same set of identifiers are in scope, but it won't allow access to identifiers or expressions which are not group-expressions.
| Field Summary | |
|---|---|
private boolean |
distinct
|
private List<SqlNode> |
groupExprList
|
private SqlSelect |
select
|
| Fields inherited from class org.eigenbase.sql.validate.DelegatingScope |
|---|
parent, validator |
| Constructor Summary | |
|---|---|
AggregatingSelectScope(SqlValidatorScope selectScope,
SqlSelect select,
boolean distinct)
|
|
| Method Summary | |
|---|---|
boolean |
checkAggregateExpr(SqlNode expr,
boolean deep)
Checks whether an expression is constant within the GROUP BY clause. |
private List<SqlNode> |
getGroupExprs()
Returns the expressions that are in the GROUP BY clause (or the SELECT DISTINCT clause, if distinct) and that can therefore be referenced without being wrapped in aggregate functions. |
SqlNode |
getNode()
Returns the root node of this scope. |
SqlValidatorScope |
getOperandScope(SqlCall call)
Returns the scope within which operands to a call are to be validated. |
void |
validateExpr(SqlNode expr)
Performs any scope-specific validation of an expression. |
| Methods inherited from class org.eigenbase.sql.validate.DelegatingScope |
|---|
addChild, addColumnNames, findAliases, findAllColumnNames, findQualifyingTableName, fullyQualify, getMonotonicity, getOrderList, getParent, getValidator, lookupWindow, resolve, resolveColumn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eigenbase.sql.validate.SqlValidatorScope |
|---|
addChild, findAliases, findAllColumnNames, findQualifyingTableName, fullyQualify, getMonotonicity, getOrderList, getValidator, lookupWindow, resolve, resolveColumn |
| Field Detail |
|---|
private final SqlSelect select
private final boolean distinct
private final List<SqlNode> groupExprList
| Constructor Detail |
|---|
AggregatingSelectScope(SqlValidatorScope selectScope,
SqlSelect select,
boolean distinct)
| Method Detail |
|---|
private List<SqlNode> getGroupExprs()
The expressions are fully-qualified, and any "*" in select clauses are expanded.
public SqlNode getNode()
SqlValidatorScope
getNode in interface SqlValidatorScopepublic SqlValidatorScope getOperandScope(SqlCall call)
SqlValidatorScope
getOperandScope in interface SqlValidatorScopegetOperandScope in class DelegatingScopecall - Call
public boolean checkAggregateExpr(SqlNode expr,
boolean deep)
AggregatingScope
checkAggregateExpr in interface AggregatingScopepublic void validateExpr(SqlNode expr)
SqlValidatorScope
validateExpr in interface SqlValidatorScopevalidateExpr in class DelegatingScope
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||