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

Conversation

Projects
None yet
3 participants
@tpoterba
Copy link
Collaborator

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())

This comment has been minimized.

Copy link
@konradjk

konradjk Apr 4, 2019

Collaborator

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

This comment has been minimized.

Copy link
@tpoterba

tpoterba Apr 4, 2019

Author Collaborator

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

This comment has been minimized.

Copy link
@tpoterba

tpoterba Apr 4, 2019

Author Collaborator

both will build the same IR

@danking danking merged commit fe01498 into hail-is:master Apr 5, 2019

1 check passed

hail-ci-0-1 successful build
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.