-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
File-based CDK: fix schemas merge for nullable object types #37619
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
To clarify, would it just make that if the second schema has a field and it's type is null, that null type won't be added to the existing schema's type? Why would second schema's field type be null only? |
@natikgadzhi that field with
This is what I found during investigation of https://github.com/airbytehq/oncall/issues/4948 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roman-yermilov-gl the code change looks good, but can you explain how this solves the problem in the ticket? I think a code comment with this info would be helpful too.
@clnoll the user is facing an issue when running the record 1: Because of that, the schema could not be merged due to this logic, so I decided to not pass fields with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@askarpets, sorry I tagged Roman instead of you!
Thanks for the explanation, it makes sense to me. Can you please add a comment to the code about this bug?
Added, thanks for the review @clnoll! |
What
Fix for https://github.com/airbytehq/oncall/issues/4948
How
Skip choosing wider type if a key is present in
schema1
andschema2
, but has a type ofnull
inschema2
Review guide
schema_helpers.py
test_schema_helpers.py
User Impact
No
Can this PR be safely reverted and rolled back?