public class JavaAggregate extends AbstractAggregate
args, distinct, filterCondition, typeover, overOrderBySort, select, STAGE_GROUP, STAGE_RESET, STAGE_WINDOWAUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESESADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| Constructor and Description |
|---|
JavaAggregate(UserAggregate userAggregate,
Expression[] args,
Select select,
boolean distinct) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
createAggregateData()
Create aggregate data object specific to the subclass.
|
Value |
getAggregatedValue(SessionLocal session,
java.lang.Object aggregateData)
Returns aggregated value.
|
int |
getCost()
Estimate the cost to process the expression.
|
protected int |
getNumExpressions()
Returns the number of expressions, excluding OVER clause.
|
java.lang.StringBuilder |
getUnenclosedSQL(java.lang.StringBuilder builder,
int sqlFlags)
Get the SQL statement of this expression.
|
boolean |
isEverything(ExpressionVisitor visitor)
Check if this expression and all sub-expressions can fulfill a criteria.
|
Expression |
optimize(SessionLocal session)
Try to optimize the expression.
|
protected void |
rememberExpressions(SessionLocal session,
Value[] array)
Stores current values of expressions into the specified array.
|
protected void |
updateAggregate(SessionLocal session,
java.lang.Object aggregateData)
Updates an aggregate value.
|
protected void |
updateFromExpressions(SessionLocal session,
java.lang.Object aggregateData,
Value[] array)
Updates the provided aggregate data from the remembered expressions.
|
protected void |
updateGroupAggregates(SessionLocal session,
int stage)
Invoked when processing group stage of grouped window queries to update
arguments of this aggregate.
|
appendTailConditions, getOrderedResultLoop, getSubexpression, getSubexpressionCount, getType, isAggregate, mapColumnsAnalysis, setEvaluatable, setFilterCondition, updateAggregatecreateOrder, getGroupData, getOverOrderBySort, getValue, getWindowData, mapColumns, setOverCondition, updateAggregate, updateOrderedAggregateaddFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getColumnNameForView, getEnclosedSQL, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getSQL, getSQL, getSQL, getSQL, getTableAlias, getTableName, getWhenSQL, getWhenValue, isConstant, isIdentity, isNullConstant, isValueSet, isWhenConditionOperand, needParentheses, optimizeCondition, toString, writeExpressions, writeExpressionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic JavaAggregate(UserAggregate userAggregate, Expression[] args, Select select, boolean distinct)
public int getCost()
ExpressiongetCost in class Expressionpublic java.lang.StringBuilder getUnenclosedSQL(java.lang.StringBuilder builder,
int sqlFlags)
ExpressiongetUnenclosedSQL in class Expressionbuilder - string buildersqlFlags - formatting flagspublic boolean isEverything(ExpressionVisitor visitor)
ExpressionisEverything in class DataAnalysisOperationvisitor - the visitorpublic Expression optimize(SessionLocal session)
Expressionoptimize in class AbstractAggregatesession - the sessionpublic Value getAggregatedValue(SessionLocal session, java.lang.Object aggregateData)
DataAnalysisOperationgetAggregatedValue in class DataAnalysisOperationsession - the sessionaggregateData - the aggregate dataprotected void updateAggregate(SessionLocal session, java.lang.Object aggregateData)
AbstractAggregateupdateAggregate in class AbstractAggregatesession - the sessionaggregateData - aggregate dataprotected void updateGroupAggregates(SessionLocal session, int stage)
DataAnalysisOperationupdateGroupAggregates in class AbstractAggregatesession - the sessionstage - select stageprotected int getNumExpressions()
DataAnalysisOperationgetNumExpressions in class DataAnalysisOperationprotected void rememberExpressions(SessionLocal session, Value[] array)
DataAnalysisOperationrememberExpressions in class DataAnalysisOperationsession - the sessionarray - array to store values of expressionsprotected void updateFromExpressions(SessionLocal session, java.lang.Object aggregateData, Value[] array)
AbstractAggregateupdateFromExpressions in class AbstractAggregatesession - the sessionaggregateData - aggregate dataarray - values of expressionsprotected java.lang.Object createAggregateData()
DataAnalysisOperationcreateAggregateData in class DataAnalysisOperation