| Modifier and Type | Field and Description |
|---|---|
| protected final Expression[] | args
The arguments. |
| protected final boolean | distinct
is this a DISTINCT aggregate |
| protected Expression | filterCondition
FILTER condition for aggregate |
| protected TypeInfo | type
The type of the result. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | aggregateFastPartition(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn, boolean grouped)
|
| private void | aggregateFastPartitionInReverse(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn, boolean grouped)
|
| private void | aggregateWholePartition(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn)
|
| protected StringBuilder | appendTailConditions(StringBuilder
string builder builder, int formatting flags sqlFlags, boolean whether synthetic ORDER BY clause should be generated when it
is missing forceOrderBy)Overrides org. Used to create SQL for the OVER and FILTER clauses. |
| private static boolean | |
| public Expression | |
| protected void | getOrderedResultLoop(SessionLocal
the session session, HashMap<Integer, Value> the map to append result to result, ArrayList<Value[]> ordered data ordered, int the index of row id value rowIdColumn)Implements abstract org. Returns result of this window function or window aggregate. |
| public Expression | getSubexpression(int
0-based index index)Overrides org. Returns subexpression with specified index. |
| public int | getSubexpressionCount()
Overrides org. Returns count of subexpressions. |
| public TypeInfo | getType()
Implements abstract org. Implements org. Returns the data type. |
| public final boolean | isAggregate()
Implements abstract org. Checks whether this expression is an aggregate function. |
| public void | mapColumnsAnalysis(ColumnResolver
the column resolver resolver, int the subquery nesting level level, int one of the Expression MAP_IN_* values innerState)Overrides org. Map the columns of the resolver to expression columns. |
| public Expression | optimize(SessionLocal
the session session)Overrides org. Try to optimize the expression. |
| private int | |
| public void | setEvaluatable(TableFilter
the table filter tableFilter, boolean true if the table filter can return value b)Overrides org. Tell the expression columns whether the table filter can return values now. |
| public void | |
| protected void | updateAggregate(SessionLocal
the database session session, SelectGroups data for the aggregate group groupData, int row id of group groupRowId)Implements abstract org. Update a row of an aggregate. |
| protected abstract void | updateAggregate(SessionLocal
the session session, Object aggregate data aggregateData)Updates an aggregate value. |
| protected abstract void | updateFromExpressions(SessionLocal
the session session, Object aggregate data aggregateData, Value[] values of expressions array)Updates the provided aggregate data from the remembered expressions. |
| protected void | updateGroupAggregates(SessionLocal
the session session, int select stage stage)Overrides org. Invoked when processing group stage of grouped window queries to update arguments of this aggregate. |
| args | back to summary |
|---|---|
| protected final Expression[] args The arguments. | |
| distinct | back to summary |
|---|---|
| protected final boolean distinct is this a DISTINCT aggregate | |
| filterCondition | back to summary |
|---|---|
| protected Expression filterCondition FILTER condition for aggregate | |
| type | back to summary |
|---|---|
| protected TypeInfo type The type of the result. | |
| AbstractAggregate | back to summary |
|---|---|
| pack-priv AbstractAggregate(Select select, Expression[] args, boolean distinct) | |
| aggregateFastPartition | back to summary |
|---|---|
| private void aggregateFastPartition(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn, boolean grouped) | |
| aggregateFastPartitionInReverse | back to summary |
|---|---|
| private void aggregateFastPartitionInReverse(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn, boolean grouped) | |
| aggregateWholePartition | back to summary |
|---|---|
| private void aggregateWholePartition(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn) | |
| appendTailConditions | back to summary |
|---|---|
| protected StringBuilder appendTailConditions(StringBuilder builder, int sqlFlags, boolean forceOrderBy) Overrides org. Doc from org. Used to create SQL for the OVER and FILTER clauses.
| |
| checkVariableBounds | back to summary |
|---|---|
| private static boolean checkVariableBounds(WindowFrame frame, ArrayList<Value[]> ordered) | |
| getFilterCondition | back to summary |
|---|---|
| public Expression getFilterCondition() Returns the FILTER condition.
| |
| getOrderedResultLoop | back to summary |
|---|---|
| protected void getOrderedResultLoop(SessionLocal session, HashMap<Integer, Value> result, ArrayList<Value[]> ordered, int rowIdColumn) Implements abstract org. Doc from org. Returns result of this window function or window aggregate. This method may not be called on window aggregate without window order clause. | |
| getSubexpression | back to summary |
|---|---|
| public Expression getSubexpression(int index) Overrides org. Doc from org. Returns subexpression with specified index.
| |
| getSubexpressionCount | back to summary |
|---|---|
| public int getSubexpressionCount() Overrides org. Doc from org. Returns count of subexpressions.
| |
| getType | back to summary |
|---|---|
| public TypeInfo getType() Implements abstract org. Implements org. Doc from org. Returns the data type. The data type may be unknown before the optimization phase. | |
| isAggregate | back to summary |
|---|---|
| public final boolean isAggregate() Implements abstract org. Doc from org. Checks whether this expression is an aggregate function.
| |
| mapColumnsAnalysis | back to summary |
|---|---|
| public void mapColumnsAnalysis(ColumnResolver resolver, int level, int innerState) Overrides org. Doc from org. Map the columns of the resolver to expression columns.
| |
| optimize | back to summary |
|---|---|
| public Expression optimize(SessionLocal session) Overrides org. Doc from org. Try to optimize the expression.
| |
| processGroup | back to summary |
|---|---|
| private int processGroup(HashMap<Integer, Value> result, Value r, ArrayList<Value[]> ordered, int rowIdColumn, int i, int size, boolean grouped) | |
| setEvaluatable | back to summary |
|---|---|
| public void setEvaluatable(TableFilter tableFilter, boolean b) Overrides org. Doc from org. Tell the expression columns whether the table filter can return values now. This is used when optimizing the query.
| |
| setFilterCondition | back to summary |
|---|---|
| public void setFilterCondition(Expression filterCondition) Sets the FILTER condition.
| |
| updateAggregate | back to summary |
|---|---|
| protected void updateAggregate(SessionLocal session, SelectGroups groupData, int groupRowId) Implements abstract org. Doc from org. Update a row of an aggregate.
| |
| updateAggregate | back to summary |
|---|---|
| protected abstract void updateAggregate(SessionLocal session, Object aggregateData) Updates an aggregate value.
| |
| updateFromExpressions | back to summary |
|---|---|
| protected abstract void updateFromExpressions(SessionLocal session, Object aggregateData, Value[] array) Updates the provided aggregate data from the remembered expressions.
| |
| updateGroupAggregates | back to summary |
|---|---|
| protected void updateGroupAggregates(SessionLocal session, int stage) Overrides org. Doc from org. Invoked when processing group stage of grouped window queries to update arguments of this aggregate.
| |