Search in sources :

Example 61 with Clip

use of com.yahoo.bullet.result.Clip in project bullet-core by yahoo.

the class TopK method getResult.

@Override
public Clip getResult() {
    Clip result = super.getResult();
    result.getRecords().forEach(this::splitFields);
    return result;
}
Also used : Clip(com.yahoo.bullet.result.Clip)

Example 62 with Clip

use of com.yahoo.bullet.result.Clip in project bullet-core by yahoo.

the class TupleSketch method getResult.

@Override
public Clip getResult(String metaKey, Map<String, String> conceptKeys) {
    merge();
    Clip result = super.getResult(metaKey, conceptKeys);
    result.add(getRecords());
    return result;
}
Also used : Clip(com.yahoo.bullet.result.Clip)

Example 63 with Clip

use of com.yahoo.bullet.result.Clip in project bullet-core by yahoo.

the class Querier method finish.

/**
 * Terminate the query and return the final result.
 *
 * @return The final non-null {@link Clip} representing the final result.
 */
public Clip finish() {
    Clip result = getResult();
    addFinishTime(result.getMeta());
    return result;
}
Also used : Clip(com.yahoo.bullet.result.Clip)

Example 64 with Clip

use of com.yahoo.bullet.result.Clip in project bullet-core by yahoo.

the class Querier method getResult.

/**
 * Gets the resulting {@link Clip} of the results so far.
 *
 * @return A non-null {@link Clip} representing the aggregated result.
 */
@Override
public Clip getResult() {
    Clip result;
    try {
        incrementRate();
        result = window.getResult();
        result.add(getResultMetadata());
    } catch (RuntimeException e) {
        log.error("Unable to get serialized data for query {}", this);
        result = Clip.of(getErrorMeta(e));
    }
    return result;
}
Also used : Clip(com.yahoo.bullet.result.Clip)

Example 65 with Clip

use of com.yahoo.bullet.result.Clip in project bullet-core by yahoo.

the class CountDistinct method getResult.

@Override
public Clip getResult() {
    Clip result = super.getResult();
    renameInPlace(result.getRecords());
    return result;
}
Also used : Clip(com.yahoo.bullet.result.Clip)

Aggregations

Clip (com.yahoo.bullet.result.Clip)66 Test (org.testng.annotations.Test)55 BulletRecord (com.yahoo.bullet.record.BulletRecord)48 Map (java.util.Map)43 List (java.util.List)33 IntStream (java.util.stream.IntStream)33 Assert (org.testng.Assert)33 BulletConfig (com.yahoo.bullet.common.BulletConfig)32 HashMap (java.util.HashMap)30 BulletError (com.yahoo.bullet.common.BulletError)29 TestHelpers.addMetadata (com.yahoo.bullet.TestHelpers.addMetadata)28 Aggregation (com.yahoo.bullet.parsing.Aggregation)28 AggregationUtils.makeAttributes (com.yahoo.bullet.parsing.AggregationUtils.makeAttributes)28 Concept (com.yahoo.bullet.result.Meta.Concept)28 RecordBox (com.yahoo.bullet.result.RecordBox)28 Family (com.yahoo.sketches.Family)28 Arrays.asList (java.util.Arrays.asList)28 Optional (java.util.Optional)28 Pair (org.apache.commons.lang3.tuple.Pair)28 HashSet (java.util.HashSet)23