Skip to content

Conversation

@tustvold
Copy link
Contributor

@tustvold tustvold commented May 17, 2021

Which issue does this PR close?

Closes #313.

Rationale for this change

See ticket, but in short it allows borrow lifetimes to correctly propagate without creating issues around stack-local temporaries

Are there any user-facing changes?

As currently formulated this is a breaking change, but it could easily be reworked to not be if preferred.

EDIT: I don't seem to have permission to add the breaking change label as instructed by the placeholder text

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

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

LGTM. Yeap, fully agree 👍

@tustvold tustvold force-pushed the dictionary-values-reference branch from d5cffcd to 6217913 Compare May 17, 2021 18:03
@tustvold
Copy link
Contributor Author

@jorgecarleitao Rebased to fix accidental formatting change, you were faster than anticipated :D

@alamb alamb added the arrow Changes to the arrow crate label May 17, 2021
@alamb
Copy link
Contributor

alamb commented May 17, 2021

This is probably technically a "breaking" change as some code that used to compile will no longer...

@alamb alamb added the api-change Changes to the arrow API label May 17, 2021
@jhorstmann
Copy link
Contributor

Nice! While we're looking at the DictionaryArray and introducing api changes, we should also remove the keys_array method since the same functionality is now provided by the keys method. The keys_array has measurable overhead when used in inner loops also due to clones. Some time ago, keys only returned an iterator and keys_array had its uses, but now it's fully redundant.

@alamb alamb merged commit 71c2159 into apache:master May 21, 2021
alamb pushed a commit to alamb/arrow-rs that referenced this pull request May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Changes to the arrow API arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DictionaryArray::values() clones the underlying ArrayRef

4 participants