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] Fix upcast logic, improve IR generated by unfilter_entries #6598

Merged
merged 3 commits into from Jul 11, 2019

Conversation

@tpoterba
Copy link
Collaborator

@tpoterba tpoterba commented Jul 10, 2019

No description provided.

cnsq match {
case NA(_) => If(cond, NA(altr.typ), altr)
case Die(msg, _) => If(cond, Die(msg, altr.typ), altr)
case Literal(_, value) => If(cond, Literal(altr.typ, value), altr)
Copy link
Collaborator

@patrick-schultz patrick-schultz Jul 10, 2019

Choose a reason for hiding this comment

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

Should this check that Literal(altr.typ, value) is well-typed?

Loading

Copy link
Collaborator Author

@tpoterba tpoterba Jul 11, 2019

Choose a reason for hiding this comment

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

hmm. Yeah, probably.

Loading

val t = unifyType.getOrElse(cnsq.typ.deepOptional())
If(cond,
PruneDeadFields.upcast(cnsq, t),
PruneDeadFields.upcast(altr, t))
Copy link
Collaborator

@patrick-schultz patrick-schultz Jul 10, 2019

Choose a reason for hiding this comment

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

Instead of adding the special cases above, could we fix this just by modifying upcast? For example, make upcast(NA(_), t) = NA(t). That feels more correct.

Loading

Copy link
Collaborator Author

@tpoterba tpoterba Jul 11, 2019

Choose a reason for hiding this comment

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

I don't think this works (we talked about this right)

Loading

@danking danking merged commit 3fc2ef1 into hail-is:master Jul 11, 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

3 participants