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

[hail] Simplify nested insert fields #6456

Merged
merged 3 commits into from Jun 26, 2019

Conversation

@tpoterba
Copy link
Collaborator

@tpoterba tpoterba commented Jun 24, 2019

No description provided.

@@ -254,6 +254,30 @@ object Simplify {

case InsertFields(struct, Seq(), _) => struct

case Let(x, InsertFields(insertedChild, insFields, ord1), InsertFields(Ref(x2, _), fields, ord2)) if x2 == x && {
Copy link
Collaborator

@danking danking Jun 25, 2019

Choose a reason for hiding this comment

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

I really want tests that would be bad to rewrite and check that we get the expected value. Is it hard to add that?

Loading

Copy link
Collaborator Author

@tpoterba tpoterba Jun 25, 2019

Choose a reason for hiding this comment

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

will give it a go, yeah

Loading

@tpoterba tpoterba force-pushed the simplify-nested-inserts branch from 089492c to 9421f05 Jun 26, 2019
@tpoterba
Copy link
Collaborator Author

@tpoterba tpoterba commented Jun 26, 2019

added tests and narrowed the match. I had a bug that generated invalid IR if the insertedChild here wasn't a ref.

Loading

@danking danking merged commit f46ce14 into hail-is:master Jun 26, 2019
1 check passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants