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

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)

This comment has been minimized.

Copy link
@patrick-schultz

patrick-schultz Jul 10, 2019

Collaborator

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

This comment has been minimized.

Copy link
@tpoterba

tpoterba Jul 11, 2019

Author Collaborator

hmm. Yeah, probably.

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

This comment has been minimized.

Copy link
@patrick-schultz

patrick-schultz Jul 10, 2019

Collaborator

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.

This comment has been minimized.

Copy link
@tpoterba

tpoterba Jul 11, 2019

Author Collaborator

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

tpoterba added some commits Jul 11, 2019

@danking danking merged commit 3fc2ef1 into hail-is:master Jul 11, 2019

1 check passed

ci-test success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.