Package com.linkedin.venice.client.store
Interface ComputeAggregationRequestBuilder<K>
- All Superinterfaces:
ExecutableRequestBuilder<K,
ComputeAggregationResponse>
public interface ComputeAggregationRequestBuilder<K>
extends ExecutableRequestBuilder<K,ComputeAggregationResponse>
-
Method Summary
Modifier and TypeMethodDescriptioncountGroupByBucket
(Map<String, Predicate<T>> bucketNameToPredicate, String... fieldNames) Aggregation query where the content of specified fields are going to be grouped by buckets, with each bucket being defined by somePredicate
, and each matching occurrence incrementing a count for its associated bucket, after which the bucket names to counts are going to be returned.countGroupByValue
(int topK, String... fieldNames) Aggregation query where the content of specified fields are going to be grouped by their value, then the occurrence of each distinct value counted, after which the top K highest counts along with their associated values are going to be returned.Methods inherited from interface com.linkedin.venice.client.store.ExecutableRequestBuilder
execute
-
Method Details
-
countGroupByValue
Aggregation query where the content of specified fields are going to be grouped by their value, then the occurrence of each distinct value counted, after which the top K highest counts along with their associated values are going to be returned.- Parameters:
topK
- The max number of distinct values for which to return a count.fieldNames
- The names of fields for which to perform the facet counting.- Returns:
- The same builder instance, to chain additional operations onto.
-
countGroupByBucket
<T> ComputeAggregationRequestBuilder<K> countGroupByBucket(Map<String, Predicate<T>> bucketNameToPredicate, String... fieldNames) Aggregation query where the content of specified fields are going to be grouped by buckets, with each bucket being defined by somePredicate
, and each matching occurrence incrementing a count for its associated bucket, after which the bucket names to counts are going to be returned.- Type Parameters:
T
- The type of the fields to apply the bucket predicates to.- Parameters:
bucketNameToPredicate
- A map of predicate name ->Predicate
to define the buckets to group values by.fieldNames
- The names of fields for which to perform the facet counting.- Returns:
- The same builder instance, to chain additional operations onto.
-