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

[query] support importing empty JSON objects #14202

Merged
merged 4 commits into from Feb 3, 2024
Merged

[query] support importing empty JSON objects #14202

merged 4 commits into from Feb 3, 2024

Conversation

danking
Copy link
Collaborator

@danking danking commented Jan 26, 2024

@patrick-schultz I'm not sure if this makes sense or not, but I observed it while working on something else. It seems weird but acceptable to import an empty dictionary as any struct. Does this seem reasonable to you? How have we avoided this bug for so long?

I'm not familiar enough with this code to know how to simply reproduce the bug and add a corresponding test. Thoughts?

@patrick-schultz I'm not sure if this makes sense or not, but I observed it while working on something else. It seems weird but acceptable to import an empty dictionary as any struct. Does this seem reasonable to you? How have we avoided this bug for so long?

I'm not familiar enough with this code to know how to simply reproduce the bug and add a corresponding test. Thoughts?
Copy link
Collaborator

@patrick-schultz patrick-schultz left a comment

Choose a reason for hiding this comment

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

Looks right to me, good catch

Copy link
Collaborator

@patrick-schultz patrick-schultz left a comment

Choose a reason for hiding this comment

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

Ah right, tests. Looks like this is tested here. We're not testing cases where some fields aren't in the json object, only setting some to null.

@danking danking merged commit 0b92923 into main Feb 3, 2024
8 checks passed
@daniel-goldstein daniel-goldstein deleted the danking-patch-14 branch April 12, 2024 15:43
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.

None yet

2 participants