Search in sources :

Example 1 with IntegerBucketResultNodeVector

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

the class ExpressionConverter method toBucketList.

private ResultNodeVector toBucketList(PredefinedFunction fnc) {
    ResultNodeVector ret = null;
    for (int i = 0, len = fnc.getNumBuckets(); i < len; ++i) {
        BucketResultNode bucket = toBucket(fnc.getBucket(i));
        if (ret == null) {
            if (bucket instanceof FloatBucketResultNode) {
                ret = new FloatBucketResultNodeVector();
            } else if (bucket instanceof IntegerBucketResultNode) {
                ret = new IntegerBucketResultNodeVector();
            } else if (bucket instanceof RawBucketResultNode) {
                ret = new RawBucketResultNodeVector();
            } else {
                ret = new StringBucketResultNodeVector();
            }
        }
        ret.add(bucket);
    }
    return ret;
}
Also used : FloatBucketResultNode(com.yahoo.searchlib.expression.FloatBucketResultNode) FloatBucketResultNodeVector(com.yahoo.searchlib.expression.FloatBucketResultNodeVector) IntegerBucketResultNodeVector(com.yahoo.searchlib.expression.IntegerBucketResultNodeVector) FloatBucketResultNodeVector(com.yahoo.searchlib.expression.FloatBucketResultNodeVector) ResultNodeVector(com.yahoo.searchlib.expression.ResultNodeVector) StringBucketResultNodeVector(com.yahoo.searchlib.expression.StringBucketResultNodeVector) RawBucketResultNodeVector(com.yahoo.searchlib.expression.RawBucketResultNodeVector) IntegerBucketResultNode(com.yahoo.searchlib.expression.IntegerBucketResultNode) BucketResultNode(com.yahoo.searchlib.expression.BucketResultNode) FloatBucketResultNode(com.yahoo.searchlib.expression.FloatBucketResultNode) RawBucketResultNode(com.yahoo.searchlib.expression.RawBucketResultNode) StringBucketResultNode(com.yahoo.searchlib.expression.StringBucketResultNode) IntegerBucketResultNode(com.yahoo.searchlib.expression.IntegerBucketResultNode) StringBucketResultNodeVector(com.yahoo.searchlib.expression.StringBucketResultNodeVector) IntegerBucketResultNodeVector(com.yahoo.searchlib.expression.IntegerBucketResultNodeVector) RawBucketResultNode(com.yahoo.searchlib.expression.RawBucketResultNode) RawBucketResultNodeVector(com.yahoo.searchlib.expression.RawBucketResultNodeVector)

Aggregations

BucketResultNode (com.yahoo.searchlib.expression.BucketResultNode)1 FloatBucketResultNode (com.yahoo.searchlib.expression.FloatBucketResultNode)1 FloatBucketResultNodeVector (com.yahoo.searchlib.expression.FloatBucketResultNodeVector)1 IntegerBucketResultNode (com.yahoo.searchlib.expression.IntegerBucketResultNode)1 IntegerBucketResultNodeVector (com.yahoo.searchlib.expression.IntegerBucketResultNodeVector)1 RawBucketResultNode (com.yahoo.searchlib.expression.RawBucketResultNode)1 RawBucketResultNodeVector (com.yahoo.searchlib.expression.RawBucketResultNodeVector)1 ResultNodeVector (com.yahoo.searchlib.expression.ResultNodeVector)1 StringBucketResultNode (com.yahoo.searchlib.expression.StringBucketResultNode)1 StringBucketResultNodeVector (com.yahoo.searchlib.expression.StringBucketResultNodeVector)1