Package org.apache.calcite.sql.validate
Class GroupByScope
- java.lang.Object
-
- org.apache.calcite.sql.validate.DelegatingScope
-
- org.apache.calcite.sql.validate.GroupByScope
-
- All Implemented Interfaces:
SqlValidatorScope
public class GroupByScope extends DelegatingScope
Represents the name-resolution context for expressions in an GROUP BY clause.In some dialects of SQL, the GROUP BY clause can reference column aliases in the SELECT clause. For example, the query
SELECT empno AS x
FROM emp
GROUP BY xis valid.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.sql.validate.SqlValidatorScope
SqlValidatorScope.EmptyPath, SqlValidatorScope.Path, SqlValidatorScope.Resolve, SqlValidatorScope.Resolved, SqlValidatorScope.ResolvedImpl, SqlValidatorScope.Step
-
-
Field Summary
Fields Modifier and Type Field Description private SqlNodeList
groupByList
private SqlSelect
select
-
Fields inherited from class org.apache.calcite.sql.validate.DelegatingScope
parent, validator
-
-
Constructor Summary
Constructors Constructor Description GroupByScope(SqlValidatorScope parent, SqlNodeList groupByList, SqlSelect select)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlNode
getNode()
Returns the root node of this scope.void
validateExpr(SqlNode expr)
Performs any scope-specific validation of an expression.-
Methods inherited from class org.apache.calcite.sql.validate.DelegatingScope
addChild, addColumnNames, findAliases, findAllColumnNames, findQualifyingTableName, findQualifyingTableNames, fullyQualify, getMonotonicity, getOperandScope, getOrderList, getParent, getTableNamespace, getValidator, lookupWindow, nullifyType, resolve, resolveColumn, resolveInNamespace, resolveTable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.sql.validate.SqlValidatorScope
isWithin
-
-
-
-
Field Detail
-
groupByList
private final SqlNodeList groupByList
-
select
private final SqlSelect select
-
-
Constructor Detail
-
GroupByScope
GroupByScope(SqlValidatorScope parent, SqlNodeList groupByList, SqlSelect select)
-
-
Method Detail
-
getNode
public SqlNode getNode()
Description copied from interface:SqlValidatorScope
Returns the root node of this scope. Never null.
-
validateExpr
public void validateExpr(SqlNode expr)
Description copied from interface:SqlValidatorScope
Performs any scope-specific validation of an expression. For example, an aggregating scope requires that expressions are valid aggregations. The expression has already been validated.- Specified by:
validateExpr
in interfaceSqlValidatorScope
- Overrides:
validateExpr
in classDelegatingScope
-
-