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

Array Datatype API and Operations #851

Closed
cpcloud opened this issue Jun 16, 2016 · 1 comment
Closed

Array Datatype API and Operations #851

cpcloud opened this issue Jun 16, 2016 · 1 comment
Assignees
Labels
expressions Issues or PRs related to the expression API refactor Issues or PRs related to refactoring the codebase ux User experience related issues
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Jun 16, 2016

We should enable basic operations on ARRAY<T> types after #848 is merged.

  • array.length(): number of elements in each array in a column
  • array[start:stop] and array[index], i.e., __getitem__: element selection
  • array.collect: collecting scalar values into an GROUP BY
  • array.contains(element): is element in array
  • array.concat(*arrays): concatenate array with *arrays
  • array.find(element): returns the index of the first occurrence of element and -1 if it's not found

Most of the work that needs to be done here is in the type system.

@wesm I've done a lot of this work, but in retrospect I think renaming Array-the-column to Field is a better in the long term to disambiguate it from Array-the-element-type. Otherwise we get things like ArrayArray (as opposed to ArrayField).

xref #782

@cpcloud cpcloud changed the title Array Datatype API Array Datatype API and Operations Jun 16, 2016
@wesm
Copy link
Member

wesm commented Jun 16, 2016

Yeah, I think either Field or Column is a reasonable renaming -- one question is that there are FooTypeValue for scalar values so I am not sure the best way to connote a collection (maybe Column). I don't believe users will be impacted by this "API" change, since the class names were never explicitly part of the API.

@cpcloud cpcloud added expressions Issues or PRs related to the expression API refactor Issues or PRs related to refactoring the codebase ux User experience related issues labels Oct 30, 2016
@cpcloud cpcloud self-assigned this Oct 30, 2016
@cpcloud cpcloud added this to the 0.11 milestone Oct 30, 2016
@wesm wesm closed this as completed in 9b7fe37 Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expressions Issues or PRs related to the expression API refactor Issues or PRs related to refactoring the codebase ux User experience related issues
Projects
None yet
Development

No branches or pull requests

2 participants