Search in sources :

Example 6 with ExpressionNode

use of com.yahoo.searchlib.expression.ExpressionNode in project vespa by vespa-engine.

the class Group method onSerialize.

@Override
protected void onSerialize(Serializer buf) {
    super.onSerialize(buf);
    serializeOptional(buf, id);
    buf.putDouble(null, rank);
    int sz = orderByIdx.size();
    buf.putInt(null, sz);
    for (Integer index : orderByIdx) {
        buf.putInt(null, index);
    }
    int numResults = aggregationResults.size();
    buf.putInt(null, numResults);
    for (AggregationResult a : aggregationResults) {
        serializeOptional(buf, a);
    }
    int numExpressionResults = orderByExp.size();
    buf.putInt(null, numExpressionResults);
    for (ExpressionNode e : orderByExp) {
        serializeOptional(buf, e);
    }
    int numGroups = children.size();
    buf.putInt(null, numGroups);
    for (Group g : children) {
        g.serializeWithId(buf);
    }
    buf.putInt(null, tag);
}
Also used : ExpressionNode(com.yahoo.searchlib.expression.ExpressionNode)

Aggregations

ExpressionNode (com.yahoo.searchlib.expression.ExpressionNode)6 GroupingExpression (com.yahoo.search.grouping.request.GroupingExpression)1 AddFunctionNode (com.yahoo.searchlib.expression.AddFunctionNode)1 MultiArgFunctionNode (com.yahoo.searchlib.expression.MultiArgFunctionNode)1 NegateFunctionNode (com.yahoo.searchlib.expression.NegateFunctionNode)1