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

Handle nested lists of nested objects #154

Merged
merged 2 commits into from
Aug 11, 2023
Merged

Conversation

mikeknep
Copy link
Contributor

Fixes a bug where relational JSON could not recompose lists of nested objects. See unit test for example. I've also filed a backlog ticket to improve how we handle the edge case documented in the second unit test.

This diff is pretty noisy because I wanted to add some comments / refactors / naming improvements to help explain what's going on and reduce the amount of time spent just figuring out what's going on next time we have to visit this. The actual fix was shockingly trivial, I will call it out inline.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Contributor

@mckornfield mckornfield left a comment

Choose a reason for hiding this comment

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

some questions/ nitty comments

src/gretel_trainer/relational/json.py Show resolved Hide resolved
src/gretel_trainer/relational/json.py Outdated Show resolved Hide resolved
src/gretel_trainer/relational/json.py Show resolved Hide resolved
src/gretel_trainer/relational/json.py Outdated Show resolved Hide resolved
tests/relational/test_relational_data_with_json.py Outdated Show resolved Hide resolved
src/gretel_trainer/relational/json.py Outdated Show resolved Hide resolved
Copy link
Contributor

@benmccown benmccown left a comment

Choose a reason for hiding this comment

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

Interested in some of the answers to Matt's questions, but otherwise LGTM.

Copy link
Contributor

@pimlock pimlock left a comment

Choose a reason for hiding this comment

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

LGTM with one suggestion for potential simplification.

src/gretel_trainer/relational/json.py Outdated Show resolved Hide resolved
@mikeknep mikeknep merged commit 2456fec into main Aug 11, 2023
@mikeknep mikeknep deleted the json-nested-object-lists branch August 11, 2023 13:51
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

5 participants