sql
sql copied to clipboard
[BUG] `IS NULL` returns wrong results for text fields
How can one reproduce the bug? Steps to reproduce the behavior:
- Import test data set (run from root of SQL plugin repo)
curl -s -XPOST localhost:9200/beer.stackexchange/_bulk -H 'Content-Type: application/x-ndjson' --data-binary @integ-test/src/test/resources/beer.stackexchange.json
- Execute query like
select Id, Body from beer.stackexchange where Body is null LIMIT 5;
What is the expected behavior?
Result set should contain only lines where Body
has null
value
Actual result
Result set contains lines non-empty Body
.
What is your host/environment?
Tested on 7cbb121cb3ad144a5e6d5b9acb9ae8e6da01688e
(current main/HEAD
).
OpenSearch 2.0