|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAggregate<E>
An aggregate operator, such as SUM, COUNT, MIN, MAX, etc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.bigdata.bop.BOp |
|---|
BOp.Annotations |
| Field Summary |
|---|
| Fields inherited from interface com.bigdata.bop.BOp |
|---|
NOANNS, NOARGS |
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface com.bigdata.bop.BOp |
|---|
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString |
| Methods inherited from interface cutthecrap.utils.striterators.IPropertySet |
|---|
getProperty |
| Method Detail |
|---|
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 IAggregates. 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||