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
Contributor

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
Contributor

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?

Copy link
Contributor Author

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

@tpoterba
Copy link
Contributor Author

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

@danking danking merged commit f46ce14 into hail-is:master Jun 26, 2019
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