Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream WHERE excludes rows with null value #5634

Open
big-andy-coates opened this issue Jun 17, 2020 · 0 comments
Open

stream WHERE excludes rows with null value #5634

big-andy-coates opened this issue Jun 17, 2020 · 0 comments

Comments

@big-andy-coates
Copy link
Contributor

The following QTT test should pass:

{
      "name": "filtered stream row with null value",
      "statements": [
        "CREATE STREAM INPUT (ID INT KEY, NAME STRING) WITH (kafka_topic='test_topic', value_format='JSON');",
        "CREATE STREAM OUTPUT AS SELECT * FROM INPUT WHERE NAME IS NULL;"
      ],
      "inputs": [
        {"topic": "test_topic", "key": 1, "value": null},
        {"topic": "test_topic", "key": 2, "value": {"NAME": null}},
        {"topic": "test_topic", "key": 3, "value": {"NAME": "bob"}}
      ],
      "outputs": [
        {"topic": "OUTPUT", "key": 1, "value": null},
        {"topic": "OUTPUT", "key": 2, "value": {"NAME": null}}
      ]
    }

Because the value of NAME in the first row should be null, i.e. it has no value. Yet this row is filtered out. This is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants