Skip to content

Conversation

@tpoterba
Copy link
Contributor

@tpoterba tpoterba commented Apr 4, 2019

No description provided.

None
"""
# FIXME: this should generate short-circuiting IR when that is possible
return hl.rbind(self, lambda x: hl.case().when(x.length() > 0, x[0]).or_missing())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason not to just hl.or_missing(hl.len(x) > 0, x[0])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like that function, I find it confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both will build the same IR

@danking danking merged commit fe01498 into hail-is:master Apr 5, 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.

3 participants