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

[feature] Add ArrayExpression.head #5790

Merged
merged 1 commit into from Apr 5, 2019
Merged

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.

None yet

3 participants