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

fix json_contains error handling #779

Merged
merged 7 commits into from
Feb 1, 2022
Merged

Conversation

jennifersp
Copy link
Contributor

MathiasGr and others added 5 commits December 28, 2021 10:35
It was broken because the jsonpath library fails whenever the given object is not a slice or a map. Structs must thus be converted to map[string]interface{} JSON representation prior to jsonpath.Lookup being called.
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for taking this!

sql/expression/function/json_contains.go Outdated Show resolved Hide resolved
@jennifersp jennifersp merged commit d131b34 into main Feb 1, 2022
@jennifersp jennifersp deleted the jennifer/fix-json-extract branch February 1, 2022 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants