blob: 78a2db1f80289af445307fc0d50f26c0255abb0c [file] [log] [blame]
package edu.uci.ics.asterix.runtime.aggregates.collections;
import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.om.types.AOrderedListType;
import edu.uci.ics.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
import edu.uci.ics.hyracks.algebricks.runtime.base.IAggregateFunctionFactory;
import edu.uci.ics.hyracks.algebricks.runtime.base.IEvaluatorFactory;
public class ListifyAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "listify", 1,
true);
private AOrderedListType oltype;
public void reset(AOrderedListType orderedListType) {
this.oltype = orderedListType;
}
@Override
public FunctionIdentifier getIdentifier() {
return FID;
}
@Override
public IAggregateFunctionFactory createAggregateFunctionFactory(final IEvaluatorFactory[] args)
throws AlgebricksException {
return new ListifyAggregateFunctionEvalFactory(args, oltype);
}
}