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

BigArray/ByteArray improvements #5420

Closed
hhoffstaette opened this issue Mar 13, 2014 · 3 comments
Closed

BigArray/ByteArray improvements #5420

hhoffstaette opened this issue Mar 13, 2014 · 3 comments

Comments

@hhoffstaette
Copy link

We could use some extensions to BigArray/ByteArray:

  • copy() - similar to System.arrayCopy()
  • equals()/hashCode()

The latter is mostly driven by PagedBytesReference which currently materializes the pages into one big byte[], which is unnecessary.

@jpountz Suggestions where and how to add equals/hashCode?

@jpountz
Copy link
Contributor

jpountz commented Mar 13, 2014

I think it would make sense to have these methods implemented as helper methods in BigArrays (quite similarly to java.util.Arrays for simple byte[] arrays)?

@s1monw
Copy link
Contributor

s1monw commented Mar 13, 2014

+1 to add helper methods like BytesRef.deepcopy() do make sure it's an actual copy and shallowCopy etc

@hhoffstaette
Copy link
Author

As mentioned in the PR #5435 we reduced the scope of this issue to equals/hashCode for now.

@hhoffstaette hhoffstaette removed their assignment Mar 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants