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
Collaborator

@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

@konradjk konradjk Apr 4, 2019

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

Copy link
Collaborator Author

@tpoterba tpoterba Apr 4, 2019

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

Copy link
Collaborator Author

@tpoterba tpoterba Apr 4, 2019

both will build the same IR

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