public interface Aggregate extends Function, AutoCloseable
A Function
which computes an aggregated value over a
group
of solutions
during query execution.
Aggregates
Modifier and Type | Method and Description |
---|---|
void |
close()
Disposes of the internal state.
|
Aggregate |
copy()
Create a deep copy of the object which does not share any references with the original.
|
com.complexible.stardog.plan.filter.expr.ValueOrError |
evaluate(com.complexible.stardog.plan.filter.ValueSolution theValueSolution)
The return value of evaluating an Aggregate is not necessarily the aggregated value, and can even be null.
|
com.complexible.stardog.plan.filter.expr.ValueOrError |
get()
Get the aggregated value
|
com.complexible.stardog.plan.filter.Expression |
getArg()
Get the argument expression
|
default boolean |
isAppropriateDataType(Datatype theDataType) |
boolean |
isDistinct()
Return whether or not the Aggregate has a distinct modifier applied to it
|
default boolean |
isFixedSizeAggregate() |
void |
reset()
Resets the internal state of the aggregate so it can start over.
|
getName, getNames, initialize
com.complexible.stardog.plan.filter.expr.ValueOrError evaluate(com.complexible.stardog.plan.filter.ValueSolution theValueSolution)
Avg
, rather than something like a running total
or a value from the group
. In these instances, it is not worth computing the aggregated
value since it's not used until the entire group is processed and retrieved via get()
.
Some aggregates may choose to return the current aggregated value here, but null will often be the return value of this method for aggregates.
evaluate
in interface com.complexible.stardog.plan.filter.Expression
com.complexible.stardog.plan.filter.expr.ValueOrError get()
boolean isDistinct()
default boolean isFixedSizeAggregate()
default boolean isAppropriateDataType(Datatype theDataType)
theDataType
- - dataType;Aggregate copy()
com.complexible.stardog.plan.filter.Expression getArg()
void reset()
void close()
close
in interface AutoCloseable
Copyright © 2010-2016 Stardog Union. All Rights Reserved.