public class RequestQueryGranularityResolver extends Object implements BiFunction<DataApiRequest,TemplateDruidQuery,Granularity>
Constructor and Description |
---|
RequestQueryGranularityResolver() |
Modifier and Type | Method and Description |
---|---|
Granularity |
apply(DataApiRequest request,
TemplateDruidQuery templateDruidQuery) |
Granularity |
resolveAcceptingGrain(DataApiRequest apiRequest,
TemplateDruidQuery query)
Get the a granularity which must be satisfied by any answering table granularity for this request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen
public Granularity resolveAcceptingGrain(DataApiRequest apiRequest, TemplateDruidQuery query)
If a query has a time grain constraint, it will be returned as a granularity with the request time zone applied. If the query has no constraint, the request grain will be returned as a granularity.
apiRequest
- DataApiRequest from the user which may specify a coarsest satisfying grainquery
- Query which may apply a coarsest satisfying grainpublic Granularity apply(DataApiRequest request, TemplateDruidQuery templateDruidQuery)
apply
in interface BiFunction<DataApiRequest,TemplateDruidQuery,Granularity>
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.