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

Add test covering filtering based on map value #1476

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@
"timestamp": 0
}
]
},
{
"name": "Json Map filter",
"statements": [
"CREATE STREAM TEST (ID bigint, THING MAP<VARCHAR, VARCHAR>) WITH (kafka_topic='test_topic', value_format='JSON');",
"CREATE STREAM S1 as SELECT ID FROM TEST WHERE THING['status']='false';"
],
"inputs": [
{"topic": "test_topic", "key": 0, "timestamp": 0, "value": "{\"id\":1,\"thing\":{\"other\":11,\"status\":false}}"},
{"topic": "test_topic", "key": 0, "timestamp": 0, "value": "{\"id\":2,\"thing\":{\"other\":12,\"status\":true}}"},
{"topic": "test_topic", "key": 0, "timestamp": 0, "value": "{\"id\":3,\"thing\":{\"other\":13,\"status\":true}}"},
{"topic": "test_topic", "key": 0, "timestamp": 0, "value": "{\"id\":4,\"thing\":{\"other\":13,\"status\":\"false\"}}"}
],
"outputs": [
{"topic": "S1", "key": 0, "timestamp": 0, "value": "{\"ID\":1}"},
{"topic": "S1", "key": 0, "timestamp": 0, "value": "{\"ID\":4}"}
]
}
]
}