suhassumukh opened a new issue #11813:
URL: https://github.com/apache/druid/issues/11813
This query -
```sql
select * from foo where dim is null or dim='a'
```
is translated to (just the `filter` part)-
```json
"filter": {
"type": "in",
"dimension": "dim",
"values": [
null,
"a"
]
}
```
which looks good.
However, the translation for this query -
```sql
select * from foo where not (dim is null or dim = 'a')
```
is -
```json
"filter": {
"type": "not",
"field": {
"type": "selector",
"dimension": "dim",
"value": "a",
"extractionFn": null
}
}
```
The `null` condition is lost in the translation and rows with `dim=null` are
returned. This is not the expected outcome.
The expected query plan is thus,
```json
"filter": {
"type": "not",
"field": {
"type": "in",
"dimension": "dim",
"values": [
null,
"a"
]
}
}
```
Affected Version(s):
Apache Druid 0.19.0
--
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]