#include <ResampleQBox.h>
Inherits QBox.
Protected Member Functions | |
void | setupImpl () throw (AuroraException) |
void | initImpl () throw (AuroraException) |
void | runImpl (QBoxInvocation &) throw (AuroraException) |
AURORA_DECLARE_QBOX (ResampleQBox,"resample") |
|
|
|
Reimplemented from QBox.
|
|
Reimplemented from QBox.
|
|
Need at least one agg function ExprContext ctxt; ctxt.setTupleDescription(getInputDescription(0)); s = param("aggregate-function",PARAM_NON_EMPTY); if (s == "") Throw(AuroraTypingException,"Aggregate box must have an 'aggregate-function' defined"); _resample_function = Aggregate::parse(s,ctxt); Set the output stream description, based on the function (see MapQBox.C for some discussion on how to do this) vector<TupleDescription::Field> fields; OUTPUT TYPE IS : order-on agg-function-return-types ORDER-ON field fields.push_back(TupleDescription::Field("orderedon", (_left_field_att->getReturnTypes())[0], _left_order_att_size)); AGGREGATE RETURN TYPES for (int i = 0; i < _resample_function->numOutputFields(); ++i) { string name("agg[0]." + to_string(i)); TupleDescription::Field f_field = _resample_function->getOutputField(i); TupleDescription::Field my_field(name, f_field.getType(), f_field.getSize(), f_field.getOffset()); fields.push_back(my_field); } Implements QBox.
|