public interface IGroupByState
Modifier and Type | Method and Description |
---|---|
LinkedHashSet<IVariable<?>> |
getColumnVars()
Variables for which we will need column projections.
|
IValueExpression<?>[] |
getGroupByClause()
The ordered array of value expressions which define the basis for
aggregating solutions into groups.
|
LinkedHashSet<IVariable<?>> |
getGroupByVars()
Top-level variables in the GROUP_BY clause in the order in which they
were declared.
|
IConstraint[] |
getHavingClause()
Optional constraints applied to the aggregated solutions.
|
IValueExpression<?>[] |
getSelectClause()
The value expressions to be projected out of the SELECT clause.
|
LinkedHashSet<IVariable<?>> |
getSelectVars()
Top-level variables in the SELECT clause in the order in which they were
declared.
|
boolean |
isAnyDistinct()
true iff any aggregate functions will be applied to the
DISTINCT values arising from their inner value expression in either the
SELECT or HAVING clause. |
boolean |
isNestedAggregates()
true if any aggregate expression nests another aggregate
expression. |
boolean |
isSelectDependency()
true iff any aggregate expression uses a reference to
another aggregate expression in the select clause. |
boolean |
isSimpleHaving()
true if none of the value expressions in the optional HAVING
clause use IAggregate functions. |
IValueExpression<?>[] getGroupByClause()
LinkedHashSet<IVariable<?>> getGroupByVars()
IValueExpression<?>[] getSelectClause()
LinkedHashSet<IVariable<?>> getSelectVars()
IConstraint[] getHavingClause()
LinkedHashSet<IVariable<?>> getColumnVars()
SELECT SUM(DISTINCT ?x), SUM(?y)
, this would report
{?x,?y}
. The variables will be reported in the order they
were encountered during a left-to-right scan of the SELECT expressions
followed by a left-to-right scan of the HAVING constraints.boolean isAnyDistinct()
true
iff any aggregate functions will be applied to the
DISTINCT values arising from their inner value expression in either the
SELECT or HAVING clause. When false
certain optimizations
are possible.boolean isSelectDependency()
true
iff any aggregate expression uses a reference to
another aggregate expression in the select clause. When
false
certain optimizations are possible (parallel
evaluation of the aggregates across the column projections).boolean isNestedAggregates()
true
if any aggregate expression nests another aggregate
expression. For example:
SUM(?x+AVG(?x))is a nested aggregation expression but:
SUM(?x+1)and
1+SUM(?x)+AVG(?x)are not nested aggregation expressions. When
false
certain
optimizations may be possible.boolean isSimpleHaving()
true
if none of the value expressions in the optional HAVING
clause use IAggregate
functions. When true
certain
optimizations are possible.
For example, the following query does not use an IAggregate
function in the HAVING clause. Instead, it references an aggregate
defined in the SELECT clause.
SELECT SUM(?y) as ?x GROUP BY ?z HAVING ?x > 10As a degenerate case, this is also
true
when there is no
HAVING clause.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.