ARROW-462: [C++] Implement in-memory conversions between non-nested primitive types and DictionaryArray equivalent#812
Closed
xhochy wants to merge 2 commits intoapache:masterfrom
Closed
ARROW-462: [C++] Implement in-memory conversions between non-nested primitive types and DictionaryArray equivalent#812xhochy wants to merge 2 commits intoapache:masterfrom
xhochy wants to merge 2 commits intoapache:masterfrom
Conversation
…rimitive types and DictionaryArray equivalent Change-Id: I624667e3ca89a0c0f19b33d3efe5e39146941b61
wesm
reviewed
Jul 4, 2017
| Status DictionaryBuilder<T, Scalar>::DoubleTableSize() { | ||
| template <typename T> | ||
| Status DictionaryBuilder<T>::AppendArray(const Array& array) { | ||
| const NumericArray<T>& numeric_array = static_cast<const NumericArray<T>&>(array); |
Member
There was a problem hiding this comment.
You could use PrimitiveArray here and cast the raw_data() to const Scalar*
cpp/src/arrow/builder.h
Outdated
| : DictionaryBuilder<T1>(pool, TypeTraits<T1>::type_singleton()) {} | ||
|
|
||
| Status Append(const Scalar& value); | ||
| Status AppendArray(const Array& array); |
Member
There was a problem hiding this comment.
I don't know whether overloaded methods or differently-named methods is better.
As an aside, should start writing more Doxygen docstrings for new APIs (and making a pass over our existing APIs). Please remind me to write more documentation in my PRs, too =)
Member
Author
There was a problem hiding this comment.
Overloaded methods did sadly not work in combination with the templates. Thus I renamed them to avoid the compiler errors.
Member
|
Looks like the tests only failed due to anaconda.org problems |
…n internal namespace. Add BinaryDictionaryBuilder convenience Change-Id: Icb130ec40b6bf43d026749aa142359efea04aca9
Member
|
+1, will await build. I made a couple small tweaks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simple usage: