You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/08/04 00:00:30 UTC
[GitHub] [druid] abhishekrb19 opened a new issue, #12856: SQL queries don't return rows with null values when null and non-null filter predicates are present
abhishekrb19 opened a new issue, #12856:
URL: https://github.com/apache/druid/issues/12856
SQL queries don't return rows with null values when null and non-null predicates over a dimension are specified in the where clause. For example, the following query only returns rows with `X = 0`:
```sql
SELECT X, __time
FROM my_data
WHERE (X IS NULL OR X = 0)
```
However, if I remove the `X = 0` predicate, Druid _does_ return rows with null as expected. Combining null and non-null predicates over the same dimension seems to be the issue.
Further looking into the query plan, I see this:
```json
{
"type": "in",
"dimension": "X",
"values": [
null,
"0"
]
}
```
I think `null` values aren't compatible with `in` and should be treated differently?
This issue is found in Druid 0.20.1.
/cc: @clintropolis
--
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: commits-unsubscribe@druid.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] gianm commented on issue #12856: SQL queries don't return rows with null values when null and non-null filter predicates are present
Posted by GitBox <gi...@apache.org>.
gianm commented on issue #12856:
URL: https://github.com/apache/druid/issues/12856#issuecomment-1208322293
Fixed in #12863. Thanks for the report!
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] gianm commented on issue #12856: SQL queries don't return rows with null values when null and non-null filter predicates are present
Posted by GitBox <gi...@apache.org>.
gianm commented on issue #12856:
URL: https://github.com/apache/druid/issues/12856#issuecomment-1204651866
Chatted a bit about this on [Slack](https://druid.apache.org/community/join-slack?v=1). The problem is with the native `in` filter: it needs to implement `applyNull` in the DruidLongPredicate, DruidFloatPredicate, and DruidDoublePredicate. It's getting the default impl, which never matches null.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] gianm closed issue #12856: SQL queries don't return rows with null values when null and non-null filter predicates are present
Posted by GitBox <gi...@apache.org>.
gianm closed issue #12856: SQL queries don't return rows with null values when null and non-null filter predicates are present
URL: https://github.com/apache/druid/issues/12856
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org