317brian commented on code in PR #15455:
URL: https://github.com/apache/druid/pull/15455#discussion_r1411072730
##########
docs/querying/filters.md:
##########
@@ -450,6 +450,43 @@ Note that it is often more optimal to use a like filter
instead of a regex for s
{ "type": "regex", "dimension": "someColumn", "pattern": ^50.* }
```
+## Array contains element filter
+
+The `arrayContainsElement` filter is for checking if an `ARRAY` contains a
specific element, but can match against any type of column with scalar columns
being treated as single element arrays.
Review Comment:
Includes Abhishek's suggestions:
```suggestion
The `arrayContainsElement` filter checks if an `ARRAY` contains a specific
element but can also match against any type of column. When matching against
scalar columns, scalar columns are treated as single-element arrays.
```
##########
docs/querying/filters.md:
##########
@@ -450,6 +450,43 @@ Note that it is often more optimal to use a like filter
instead of a regex for s
{ "type": "regex", "dimension": "someColumn", "pattern": ^50.* }
```
+## Array contains element filter
+
+The `arrayContainsElement` filter is for checking if an `ARRAY` contains a
specific element, but can match against any type of column with scalar columns
being treated as single element arrays.
+
+| Property | Description | Required |
+| -------- | ----------- | -------- |
+| `type` | Must be "arrayContainsElement".| Yes |
+| `column` | Input column or virtual column name to filter. | Yes |
+| `elementMatchValueType` | String specifying the type of element value to
match. For example `STRING`, `LONG`, `DOUBLE`, `FLOAT`, `ARRAY<STRING>`,
`ARRAY<LONG>`, or any other Druid type. The `elementMatchValueType` determines
how Druid interprets the `elementMatchValue` to assist in converting to the
type of elements contained in the matched `column`. | Yes |
+| `elementMatchValue` | Array element value to match, including null. | Yes |
Review Comment:
The original wording is mostly ok imo, but the explicit can be null is
helpful.
```suggestion
| `elementMatchValue` | Array element value to match. This value can be
null. | Yes |
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]