Druid Query Processing Model #35
Unanswered
Shakthieshwari
asked this question in
Query
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team,
We have 1 query, Does Druid Query Processing Model supports Bound Filter type. Please check below the exact Bound Filter Druid Query we are looking for
{ "queryType": "scan", "dataSource": { "type": "table", "name": "sl-project" }, "intervals": { "type": "intervals", "intervals": [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ] }, "virtualColumns": [], "resultFormat": "compactedList", "batchSize": 20480, "limit": 101, "order": "none", "filter": { "type": "and", "fields": [ **{ "type": "bound", "dimension": "tasks_count", "lower": "5", "upper": null, "lowerStrict": false, "upperStrict": false, "extractionFn": null, "ordering": { "type": "numeric" } }**, { "type": "bound", "dimension": "project_evidence_count", "lower": "1", "upper": null, "lowerStrict": false, "upperStrict": false, "extractionFn": null, "ordering": { "type": "numeric" } }, { "type": "not", "field": { "type": "expression", "expression": "\"private_program\"" } } ] }, "columns": [ "project_evidence_count", "project_id", "task_evidence_count", "tasks_count" ], "legacy": false, "context": { "sqlOuterLimit": 101, "sqlQueryId": "54aed10c-2e28-4e9e-8100-34dbf6371fed" }, "descending": false, "granularity": { "type": "all" } }
We are basically trying to do comparison like greater/lesser/between than or equal to a value. In druid this can be applied on Bound Type Filter for a column.
We checked the Druid Query Processing Model Classes, It looks like bound type filter is not supported.
class DruidQueryModel(queryType: String, dataSource: String, intervals: String, granularity: Option[String] = {}, aggregations: Option[List[Aggregation]] = {}, dimensions: Option[List[DruidDimension]] = {}, filters: Option[List[DruidFilter]] = {}, having: Option[DruidHavingFilter] = {}, postAggregation: Option[List[PostAggregation]] = {}, columns: Option[List[String]] = {}, sqlDimensions: Option[List[DruidSQLDimension]] = {}, sqlQueryStr: Option[String] = {}, threshold: Option[Long] = {}, metric: Option[String] = {}, descending: Option[String] = {}, intervalSlider: Int = {})
class DruidFilter(type: String, dimension: String, value: Option[AnyRef], values: Option[List[AnyRef]] = {})
Hence, @anandp504 @sowmya-dixit Please let us know if our understanding is correct and this needs to be taken as part of enhancement only ?
Cc- @Ashwiniev95 @aks30 @kiranharidas187 @vijiurs
Thank you
Beta Was this translation helpful? Give feedback.
All reactions