-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
2.1.8.3
What's Wrong?
When I was using version 2.1.8, I encountered a situation where the json_contains function returned incorrect results.
Here is my test cases:
- SELECT JSON_CONTAINS('{}', '{"key": "key1", "value": "value1"}');
--- return: 1 - SELECT JSON_CONTAINS('{"2":"2","1":"1","3":"3"}', '{"key": "value"}');
--- return: 1 - SELECT * FROM table WHERE JSON_CONTAINS('["1","2","3"]', '"1"') and JSON_CONTAINS('["1","2","3"]', '"2"') limit 100;
--- return: [HY000][1105] errCode = 2, detailMessage = Unexpected exception: Not support comparison between JSONB literals
I found a similar issue, but I'm not sure if it's the same problem: #53291.
I would like to confirm if this is the same problem? If so, is there any plan to fix version 2.1.x ?
What You Expected?
- SELECT JSON_CONTAINS('{}', '{"key": "key1", "value": "value1"}');
--- return: 0 - SELECT JSON_CONTAINS('{"2":"2","1":"1","3":"3"}', '{"key": "value"}');
--- return: 0 - SELECT * FROM table WHERE JSON_CONTAINS('["1","2","3"]', '"1"') and JSON_CONTAINS('["1","2","3"]', '"2"') limit 100;
--- return: successfully executed and returned data
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels