Update filters.md (#14917)

This commit is contained in:
benkrug 2023-08-28 15:29:00 -07:00 committed by GitHub
parent d6565f46b0
commit 8885805bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 12 deletions

View File

@ -80,19 +80,19 @@ Druid's SQL planner uses the equality filter by default instead of selector filt
### Example: equivalent of `WHERE someColumn = 'hello'`
```json
{ "type": "equality", "column": "someColumn", "matchValueType": "STRING", "matchValue": "hello" }
{ "type": "equals", "column": "someColumn", "matchValueType": "STRING", "matchValue": "hello" }
```
### Example: equivalent of `WHERE someNumericColumn = 1.23`
```json
{ "type": "equality", "column": "someNumericColumn", "matchValueType": "DOUBLE", "matchValue": 1.23 }
{ "type": "equals", "column": "someNumericColumn", "matchValueType": "DOUBLE", "matchValue": 1.23 }
```
### Example: equivalent of `WHERE someArrayColumn = ARRAY[1, 2, 3]`
```json
{ "type": "equality", "column": "someArrayColumn", "matchValueType": "ARRAY<LONG>", "matchValue": [1, 2, 3] }
{ "type": "equals", "column": "someArrayColumn", "matchValueType": "ARRAY<LONG>", "matchValue": [1, 2, 3] }
```
@ -160,8 +160,8 @@ Note that the column comparison filter converts all values to strings prior to c
{
"type": "and",
"fields": [
{ "type": "equality", "column": "someColumn", "matchValue": "a", "matchValueType": "STRING" },
{ "type": "equality", "column": "otherColumn", "matchValue": 1234, "matchValueType": "LONG" },
{ "type": "equals", "column": "someColumn", "matchValue": "a", "matchValueType": "STRING" },
{ "type": "equals", "column": "otherColumn", "matchValue": 1234, "matchValueType": "LONG" },
{ "type": "null", "column": "anotherColumn" }
]
}
@ -180,8 +180,8 @@ Note that the column comparison filter converts all values to strings prior to c
{
"type": "or",
"fields": [
{ "type": "equality", "column": "someColumn", "matchValue": "a", "matchValueType": "STRING" },
{ "type": "equality", "column": "otherColumn", "matchValue": 1234, "matchValueType": "LONG" },
{ "type": "equals", "column": "someColumn", "matchValue": "a", "matchValueType": "STRING" },
{ "type": "equals", "column": "otherColumn", "matchValue": 1234, "matchValueType": "LONG" },
{ "type": "null", "column": "anotherColumn" }
]
}
@ -709,7 +709,7 @@ All filters return true if any one of the dimension values is satisfies the filt
Given a multi-value STRING row with values `['a', 'b', 'c']`, a filter such as
```json
{ "type": "equality", "column": "someMultiValueColumn", "matchValueType": "STRING", "matchValue": "b" }
{ "type": "equals", "column": "someMultiValueColumn", "matchValueType": "STRING", "matchValue": "b" }
```
will successfully match the entire row. This can produce sometimes unintuitive behavior when coupled with the implicit UNNEST functionality of Druid [GroupBy](./groupbyquery.md) and [TopN](./topnquery.md) queries.
@ -724,13 +724,13 @@ Given a multi-value STRING row with values `['a', 'b', 'c']`, and filter such as
"type": "and",
"fields": [
{
"type": "equality",
"type": "equals",
"column": "someMultiValueColumn",
"matchValueType": "STRING",
"matchValue": "a"
},
{
"type": "equality",
"type": "equals",
"column": "someMultiValueColumn",
"matchValueType": "STRING",
"matchValue": "b"
@ -754,7 +754,7 @@ the "regex" filter) the numeric column values will be converted to strings durin
```json
{
"type": "equality",
"type": "equals",
"dimension": "myFloatColumn",
"matchValueType": "FLOAT",
"value": 10.1
@ -811,7 +811,7 @@ If you want to interpret the timestamp with a specific format, timezone, or loca
```json
{
"type": "equality",
"type": "equals",
"dimension": "__time",
"matchValueType": "LONG",
"value": 124457387532