public class MIN extends AggregateBase<IV> implements INeedsMaterialization
Note: MIN (and MAX) are defined in terms of the ORDER_BY semantics for
SPARQL. Therefore, this must handle comparisons when the value is not an IV,
e.g., using the IVComparator.
AggregateBase.AnnotationsINeedsMaterialization.RequirementEMPTY_LITERAL, ZERODEFAULT_INITIAL_CAPACITY| Constructor and Description |
|---|
MIN(boolean distinct,
IValueExpression... expr) |
MIN(BOp[] args,
Map<String,Object> annotations) |
MIN(MIN op) |
| Modifier and Type | Method and Description |
|---|---|
IV |
done()
Return the final value.
|
IV |
get(IBindingSet bindingSet)
Return the current value of the aggregate (this has a side-effect on the
internal state of the
IAggregate operator). |
INeedsMaterialization.Requirement |
getRequirement()
Note:
MIN only works on pretty much anything and uses the same
semantics as CompareBOp (it is essentially the transitive closure
of LT over the column projection of the inner expression). |
void |
reset()
Reset the aggregate's internal state.
|
isDistinct, isWildcard_clearProperty, _setProperty__replaceArg, _set, annotations, annotationsCopy, annotationsEqual, annotationsRef, argIterator, args, argsCopy, arity, clearAnnotations, clearProperty, deepCopy, deepCopy, get, getProperty, setArg, setProperty, setUnboundProperty, toArray, toArrayannotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString, toString, toStringfinalize, getClass, notify, notifyAll, wait, wait, waittoStringannotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toStringgetPropertypublic MIN(MIN op)
public MIN(boolean distinct, IValueExpression... expr)
public IV get(IBindingSet bindingSet)
AggregateBaseIAggregate 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 IAggregate.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 IAggregate.reset().
Operation is not implemented by this class and must be overridden if the
AggregateBase is to be directly evaluated. However, note that the
computation of aggregate functions is often based on hard coded
recognition of the appropriate function code.
Note: DISTINCT is merely carried as a marker on COUNT (and the other
aggregate functions). The application of DISTINCT to the inner expression
to form a column projection is handled by the driving evaluation logic
rather than by AggregateBase.get(IBindingSet).
get in interface IAggregate<IV>get in interface IValueExpression<IV>get in class AggregateBase<IV>bindingSet - The binding set.public void reset()
IAggregatereset in interface IAggregate<IV>public IV done()
IAggregatedone in interface IAggregate<IV>public INeedsMaterialization.Requirement getRequirement()
MIN only works on pretty much anything and uses the same
semantics as CompareBOp (it is essentially the transitive closure
of LT over the column projection of the inner expression). This probably
means that we always need to materialize something unless it is an inline
numeric IV.
FIXME MikeP: What is the right return value here?getRequirement in interface INeedsMaterializationCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.