protected class SqlToRelConverter.AggConverter extends Object implements org.apache.calcite.sql.util.SqlVisitor<Void>
Consider the expression
SELECT deptno, SUM(2 * sal) FROM emp GROUP BY deptno
Then:
Modifier and Type | Field and Description |
---|---|
@Nullable org.apache.calcite.sql.validate.AggregatingSelectScope |
aggregatingSelectScope |
Constructor and Description |
---|
AggConverter(SqlToRelConverter.Blackboard bb,
org.apache.calcite.sql.SqlSelect select)
Creates an AggConverter.
|
Modifier and Type | Method and Description |
---|---|
int |
addGroupExpr(org.apache.calcite.sql.SqlNode expr) |
List<org.apache.calcite.rel.core.AggregateCall> |
getAggCalls() |
List<org.apache.calcite.util.Pair<org.apache.calcite.rex.RexNode,String>> |
getPreExprs() |
org.apache.calcite.rel.type.RelDataTypeFactory |
getTypeFactory() |
@Nullable org.apache.calcite.rex.RexNode |
lookupAggregates(org.apache.calcite.sql.SqlCall call) |
int |
lookupGroupExpr(org.apache.calcite.sql.SqlNode expr)
If an expression is structurally identical to one of the group-by expressions, returns a
reference to the expression, otherwise returns null.
|
Void |
visit(org.apache.calcite.sql.SqlCall call) |
Void |
visit(org.apache.calcite.sql.SqlDataTypeSpec type) |
Void |
visit(org.apache.calcite.sql.SqlDynamicParam param) |
Void |
visit(org.apache.calcite.sql.SqlIdentifier id) |
Void |
visit(org.apache.calcite.sql.SqlIntervalQualifier intervalQualifier) |
Void |
visit(org.apache.calcite.sql.SqlLiteral lit) |
Void |
visit(org.apache.calcite.sql.SqlNodeList nodeList) |
public final @Nullable org.apache.calcite.sql.validate.AggregatingSelectScope aggregatingSelectScope
public AggConverter(SqlToRelConverter.Blackboard bb, org.apache.calcite.sql.SqlSelect select)
The select
parameter provides enough context to name aggregate calls
which are top-level select list items.
bb
- Blackboardselect
- Query being translated; provides context to givepublic int addGroupExpr(org.apache.calcite.sql.SqlNode expr)
public Void visit(org.apache.calcite.sql.SqlIdentifier id)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public Void visit(org.apache.calcite.sql.SqlNodeList nodeList)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public Void visit(org.apache.calcite.sql.SqlLiteral lit)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public Void visit(org.apache.calcite.sql.SqlDataTypeSpec type)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public Void visit(org.apache.calcite.sql.SqlDynamicParam param)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public Void visit(org.apache.calcite.sql.SqlIntervalQualifier intervalQualifier)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public Void visit(org.apache.calcite.sql.SqlCall call)
visit
in interface org.apache.calcite.sql.util.SqlVisitor<Void>
public int lookupGroupExpr(org.apache.calcite.sql.SqlNode expr)
public @Nullable org.apache.calcite.rex.RexNode lookupAggregates(org.apache.calcite.sql.SqlCall call)
public List<org.apache.calcite.util.Pair<org.apache.calcite.rex.RexNode,String>> getPreExprs()
public List<org.apache.calcite.rel.core.AggregateCall> getAggCalls()
public org.apache.calcite.rel.type.RelDataTypeFactory getTypeFactory()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.