maha icon indicating copy to clipboard operation
maha copied to clipboard

implement NotBetween filter operation for Druid

Open ishan8 opened this issue 4 years ago • 1 comments

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Context We have a usecase where we want to check whether a metric is outside a certain range. We can't currently do this with Or filters because filters are stored in a map between the field name and the filter, so we can't have two filters on the same field. Adding this NotBetween filter as a workaround instead of more invasive changes to the query generator.

Using this filter would generate the following having clause:

"type": "or",
"havingSpecs": [{
  "type": "greaterThan",
  "aggregation": "Uniques",
  "value": 1000
}, {
  "type": "lessThan",
  "aggregation": "Uniques",
  "value": 1
}]

ishan8 avatar Apr 29 '20 17:04 ishan8

Generally, we like to keep this kind of functionality implemented across all query generators. It is not specific to one engine.

patelh avatar May 04 '20 17:05 patelh