| Modifier and Type | Class and Description |
|---|---|
| private class | Select.
Lazy execution for a group sorted query. |
| private class | Select.
Lazy execution for a flat query. |
| private abstract class | Select.
Lazy execution for this select. |
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private Expression | condition
WHERE condition. |
| private double | |
| private Expression[] | distinctExpressions
|
| private int[] | |
| private final ArrayList | |
| private ForUpdate | |
| private ArrayList | |
| private int[] | |
| pack-priv boolean[] | groupByExpression
Whether a column in the expression list is part of a group-by. |
| pack-priv SelectGroups | groupData
Grouped data for aggregates. |
| pack-priv int[] | groupIndex
The indexes of the group-by columns. |
| private Expression | having
HAVING condition. |
| private int | |
| private int | |
| private boolean | |
| private boolean | isExplicitTable
Whether this SELECT is an explicit table (TABLE tableName). |
| pack-priv boolean | isGroupQuery
This flag is set when SELECT statement contains (non-window) aggregate functions, GROUP BY clause or HAVING clause. |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private Select | parentSelect
Parent select for selects in table filters. |
| private Expression | qualify
QUALIFY condition. |
| private int | |
| private final ArrayList | |
| pack-priv TableFilter | topTableFilter
The main (top) table filter. |
| private HashMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private int | addExpandedColumn(TableFilter filter, int index, HashMap<Column, ExpressionColumn> except, String schema, String alias, Column c)
|
| public void | addGlobalCondition(Parameter
the parameter param, int the column index (0 meaning the first column) columnId, int the comparison type comparisonType)Implements abstract org. Add a condition to the query. |
| private static Expression | |
| public void | addTableFilter(TableFilter
the table to add filter, boolean if the table can be the first table in the query plan isTop)Add a table to the query. |
| public boolean | |
| public boolean | allowGlobalConditions()
Implements abstract org. Check whether adding condition to the query is allowed. |
| private Value[] | |
| private static boolean | |
| pack-priv Value[] | Returns: the rowthe key values keyValues, int the number of columns columnCount)Create a row with the current values, for queries with group-sort. |
| private LocalResult | |
| private void | |
| private void | |
| private int | expandColumnList(TableFilter filter, int index, boolean forAlias, HashMap<Column, ExpressionColumn> except)
|
| public void | fireBeforeSelectTriggers()
Implements abstract org. Call the before triggers on all tables. |
| private void | |
| public Expression | |
| public double | getCost()
Implements abstract org. Calculate the cost to execute this query. |
| private static void | getFilterSQL(StringBuilder builder, String sql, Expression[] exprList, Expression condition, int conditionIndex, int sqlFlags)
|
| private static void | |
| public ForUpdate | |
| public ArrayList | |
| public SelectGroups | Returns: the grouped datais this a window function window)Get the group data if there is currently a group-by active. |
| private Index | |
| public Expression | |
| public Expression | getIfSingleRow()
Overrides org. If this query is determined as a single-row query, returns a replacement expression. |
| private List | Returns: possible index-sorting operations, ornull if unavailableReturns possible index-sorting operations (better first) if they exist. |
| public Select | |
| private static boolean | |
| public StringBuilder | getPlanSQL(StringBuilder
string builder builder, int formatting flags sqlFlags)Overrides org. Appends the SQL statement with the execution plan. |
| public Expression | |
| public SortOrder | |
| public HashSet | getTables()
Implements abstract org. Get all tables that are involved in this query. |
| public ArrayList | |
| public TableFilter | |
| public Window | |
| public void | |
| private void | |
| public boolean | |
| public boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| public boolean | isConstantQuery()
Overrides org. Check if this query will always return the same value and has no side effects. |
| public boolean | isEverything(ExpressionVisitor
the visitor visitor)Implements abstract org. Check if this expression and all sub-expressions can fulfill a criteria. |
| public boolean | |
| private boolean | |
| public boolean | Returns: true if window stage of group window query is performedChecks if window stage of group window query is performed. |
| private boolean | |
| private boolean | |
| public boolean | Returns: true if a direct lookup is possibleCheck if this is an aggregate query with direct lookup, for example a query of the type SELECT COUNT(*) FROM TEST or SELECT MAX(ID) FROM TEST. |
| public boolean | |
| public boolean | Returns: whether this query contains window functionsChecks if this query contains window functions. |
| public void | mapColumns(ColumnResolver
the resolver resolver, int the subquery level (0 is the top level query, 1 is the first
subquery level) level, boolean whether this method was called from the outer query outer)Implements abstract org. Map the columns to the given column resolver. |
| private void | |
| private int | mergeGroupByExpressions(Database db, int index, ArrayList<String> expressionSQL, boolean scanPrevious)
|
| private void | |
| public void | |
| public void | |
| private double | |
| private void | processGroupResult(int columnCount, LocalResult result, long offset, boolean quickOffset, boolean withHaving)
|
| private void | queryDistinct(ResultTarget result, long offset, long limitRows, boolean withTies, boolean quickOffset)
|
| private LazyResult | queryFlat(int columnCount, ResultTarget result, long offset, long limitRows, boolean withTies, Select.
|
| private void | |
| private LazyResult | |
| private void | |
| private void | |
| private void | |
| protected ResultInterface | queryWithoutCache(long
the limit as specified in the JDBC method call maxRows, ResultTarget the target to write results to target)Implements abstract org. Execute the query without checking the cache. |
| private void | readWithLimit(ResultTarget result, long limitRows, boolean withTies, Select.
|
| private Value[] | Returns: the same or the truncated rowthe complete row row, int the number of columns to keep columnCount)Removes HAVING and QUALIFY columns from the row. |
| public void | |
| public void | |
| public void | setEvaluatable(TableFilter
the table filter tableFilter, boolean the new value b)Implements abstract org. Change the evaluatable flag. |
| private void | |
| public void | |
| public void | |
| public void | setForUpdate(ForUpdate
the new FOR UPDATE clause b)Implements abstract org. Set the FOR UPDATE clause. |
| public void | |
| pack-priv void | |
| public void | setGroupQuery()
Set when SELECT statement contains (non-window) aggregate functions, GROUP BY clause or HAVING clause. |
| public void | |
| public void | |
| public void | |
| public void | |
| private static void | |
| pack-priv void | updateAgg(int
number of columns columnCount, int see STAGE_RESET/STAGE_GROUP/STAGE_WINDOW in DataAnalysisOperation stage)Update any aggregate expressions with the query stage. |
| public void | updateAggregate(SessionLocal
the session s, int select stage stage)Implements abstract org. Update all aggregate function values. |