sql icon indicating copy to clipboard operation
sql copied to clipboard

[BUG] `IS NULL` returns wrong results for text fields

Open Yury-Fridlyand opened this issue 2 years ago • 0 comments

How can one reproduce the bug? Steps to reproduce the behavior:

  1. 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
  1. 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

Yury-Fridlyand avatar Jun 24 '22 17:06 Yury-Fridlyand