public interface IAggregate<E> extends IValueExpression<E>
BOp.Annotations
Modifier and Type | Method and Description |
---|---|
E |
done()
Return the final value.
|
E |
get(IBindingSet bset)
Return the current value of the aggregate (this has a side-effect on the
internal state of the
IAggregate operator). |
boolean |
isDistinct()
true if the aggregate is to be applied to the distinct
solutions within the group. |
boolean |
isWildcard()
Return
true iff the IValueExpression is the special
variable * (but note that this is only allowed for COUNT). |
void |
reset()
Reset the aggregate's internal state.
|
toString
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString
getProperty
boolean isDistinct()
true
if the aggregate is to be applied to the distinct
solutions within the group. E.g.,
COUNT(DISTINCT x)
COUNT(DISTINCT *)or
SUM(DISTINCT x)
boolean isWildcard()
true
iff the IValueExpression
is the special
variable *
(but note that this is only allowed for COUNT).void reset()
E get(IBindingSet bset)
IAggregate
operator). Functions which can
not produce an intermediate result, such as AVERAGE, MAY return
null
.
Note: If evaluation of the IAggregate
throws an error, then that
error must be "sticky" and reported out by done()
as well. This
contract is relied on to correctly propagate errors within a group when
using incremental (pipelined) evaluation of IAggregate
s. The
error state is cleared by reset()
.
get
in interface IValueExpression<E>
bset
- The binding set.E done()
RuntimeException
- If evaluation of get(IBindingSet)
threw an
error, then that error is "sticky" and the first such error
encountered will be thrown out of done()
as well.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.