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

Allow empty arrays as arguments #1154

Closed

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Sep 13, 2017

Closes #1153.

This PR fills out support for empty arrays as input arguments.

  1. ibis.literal([]) now returns an array of type array<any>. Before this PR it raises an exception.
  2. Cast array<any> to the required input type specified by the rule in the Node definition during argument validation.
    1. For example, a Node subclass accepting rules.array(dt.int64) will accept Literals of type dt.Array(dt.any)
  3. The previous point allows us to accept empty arrays as input arguments.

@cpcloud cpcloud self-assigned this Sep 13, 2017
@cpcloud cpcloud requested a review from wesm September 13, 2017 18:48
@cpcloud cpcloud added bug Incorrect behavior inside of ibis feature Features or general enhancements expressions Issues or PRs related to the expression API labels Sep 13, 2017
@cpcloud cpcloud added this to the 0.11.3 milestone Sep 13, 2017
@cpcloud
Copy link
Member Author

cpcloud commented Sep 13, 2017

@wesm can you review this when you get a chance?

@cpcloud
Copy link
Member Author

cpcloud commented Sep 13, 2017

Not sure why some of the pieces of the circle build are not showing up as completed, even though they did in fact finish: https://circleci.com/workflow-run/312939e9-2ba8-4b7f-b0e5-1bef91570bb1.

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

LGTM

@cpcloud cpcloud closed this in 2cbe4fc Sep 15, 2017
@cpcloud cpcloud deleted the empty-arrays-as-arguments branch September 15, 2017 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis expressions Issues or PRs related to the expression API feature Features or general enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants