-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Right now QueryExecutors are opaque, the signature of execute is essentially
CompletionStage<MetricsQueryResponse> execute(String serializedQuery)
If we want to support additional query features such as arithmetic, a single logical query will likely map to several KairosDB queries in which case the ArithmeticQueryExecutor
would want to
- decompose their query and then
- pass it into the downstream executor.
To avoid the overhead of creating the query and then serializing it to conform to the interface, clients should be able to pass structured queries directly to the executors. The signature currently does not allow for passing in a structured query and so we would need to expose that, perhaps using a generic:
interface QueryExecutor<T> { // T - RequestType
CompletionStage<MetricsQueryResponse> executeRaw(final String serializedQuery);
CompletionStage<MetricsQueryResponse> execute(final T request);
}
Executors can opt-out of this behavior by implementing QueryExecutor<Void>
.
Metadata
Metadata
Assignees
Labels
No labels