Search in sources :

Example 11 with CountDistinct

use of com.yahoo.bullet.query.aggregations.CountDistinct in project bullet-core by yahoo.

the class QueryUtils method makeCountDistinctQuery.

public static Query makeCountDistinctQuery(List<String> fields, String name) {
    CountDistinct countDistinct = new CountDistinct(fields, name);
    Query query = new Query(new Projection(), null, countDistinct, null, new Window(), null);
    query.configure(new BulletConfig());
    return query;
}
Also used : CountDistinct(com.yahoo.bullet.query.aggregations.CountDistinct) BulletConfig(com.yahoo.bullet.common.BulletConfig)

Aggregations

BulletConfig (com.yahoo.bullet.common.BulletConfig)11 CountDistinct (com.yahoo.bullet.query.aggregations.CountDistinct)11 Test (org.testng.annotations.Test)9 TestHelpers.addMetadata (com.yahoo.bullet.TestHelpers.addMetadata)8 KMVSketch (com.yahoo.bullet.querying.aggregations.sketches.KMVSketch)8 BulletRecord (com.yahoo.bullet.record.BulletRecord)8 Clip (com.yahoo.bullet.result.Clip)8 Concept (com.yahoo.bullet.result.Meta.Concept)8 RecordBox (com.yahoo.bullet.result.RecordBox)8 Family (com.yahoo.sketches.Family)8 ResizeFactor (com.yahoo.sketches.ResizeFactor)8 Arrays.asList (java.util.Arrays.asList)8 Collections (java.util.Collections)8 List (java.util.List)8 Map (java.util.Map)8 IntStream (java.util.stream.IntStream)8 Pair (org.apache.commons.lang3.tuple.Pair)8 Assert (org.testng.Assert)8 BulletConfigTest (com.yahoo.bullet.common.BulletConfigTest)1 Projection (com.yahoo.bullet.query.Projection)1