|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.oj.rex.OJRexImplementorTableImpl.OJBasicAggImplementor org.eigenbase.oj.rex.OJRexImplementorTableImpl.OJMinMaxAggImplementor
public static class OJRexImplementorTableImpl.OJMinMaxAggImplementor
Constructor Summary | |
---|---|
OJRexImplementorTableImpl.OJMinMaxAggImplementor()
|
Method Summary | |
---|---|
boolean |
canMerge()
Returns whether this aggregation can merge together two accumulators. |
void |
implementNext(JavaRelImplementor implementor,
JavaRel rel,
Expression accumulator,
AggregateCall call)
Generates (into the current statement list, gleaned by calling
implementor 's JavaRelImplementor.getStatementList() method) the
piece of code which gets called each time an extra row is seen. |
Expression |
implementResult(JavaRelImplementor implementor,
Expression accumulator,
AggregateCall call)
Generates the expression which gets called when a total is complete. |
Expression |
implementStart(JavaRelImplementor implementor,
JavaRel rel,
AggregateCall call)
Generates the expression which gets called when a new total is created. |
Methods inherited from class org.eigenbase.oj.rex.OJRexImplementorTableImpl.OJBasicAggImplementor |
---|
implementMerge, implementStartAndNext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OJRexImplementorTableImpl.OJMinMaxAggImplementor()
Method Detail |
---|
public boolean canMerge()
OJAggImplementor
For example, COUNT
can (you just add the accumulators);
AVG
and MEDIAN
cannot.
canMerge
in interface OJAggImplementor
canMerge
in class OJRexImplementorTableImpl.OJBasicAggImplementor
public void implementNext(JavaRelImplementor implementor, JavaRel rel, Expression accumulator, AggregateCall call)
OJAggImplementor
implementor
's JavaRelImplementor.getStatementList()
method) the
piece of code which gets called each time an extra row is seen. For
sum(x)
, this looks like
((org.eigenbase.runtime.Holder.int_Holder) accumulator).value +=
x
.
implementor
- a callback object which knows how to generate thingsrel
- the relational expression which is generating this codeaccumulator
- the expression which holds the totalcall
- the ordinals of the fields of the child row which are
arguments to this aggregationpublic Expression implementResult(JavaRelImplementor implementor, Expression accumulator, AggregateCall call)
OJAggImplementor
sum(x)
, this looks like
((saffron.runtime.Holder.int_Holder) accumulator).value
.
public Expression implementStart(JavaRelImplementor implementor, JavaRel rel, AggregateCall call)
OJAggImplementor
sum(x)
, this looks like new
saffron.runtime.Holder.int_Holder(0)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |