ARROW-7372: [C++] Allow creating dictionary array from simple JSON#8309
Closed
pitrou wants to merge 2 commits intoapache:masterfrom
Closed
ARROW-7372: [C++] Allow creating dictionary array from simple JSON#8309pitrou wants to merge 2 commits intoapache:masterfrom
pitrou wants to merge 2 commits intoapache:masterfrom
Conversation
bkietz
approved these changes
Sep 30, 2020
Member
bkietz
left a comment
There was a problem hiding this comment.
Very neatly done, just a few nits
cpp/src/arrow/ipc/json_simple.cc
Outdated
Comment on lines
63
to
82
Member
There was a problem hiding this comment.
I think the converters would be simplified by passing the BuilderType as the template parameter directly, rather than passing a trait with which to look it up. value_type need not be a trait member at all, I think:
inline const std::shared_ptr<DataType>& value_type(const std::shared_ptr<DataType>& type) {
if (type->id() != Type::DICTIONARY) return type;
return checked_cast<const DictionaryType&>(*type).value_type();
}
cpp/src/arrow/array/builder_dict.h
Outdated
Comment on lines
+193
to
+198
Member
There was a problem hiding this comment.
This is probably fine. Nit: I'd prefer to get the FixedSizeBinaryType inside the converter and use it's byte_width() over propagating the property to builders
Member
Author
There was a problem hiding this comment.
The property is already exposed in FixedSizeBinaryBuilder.
Simple value types are supported: integers, string-like, decimal
6205857 to
b31a8fb
Compare
Member
Author
|
Thanks for the suggestions. I'm going to merge when CI is green. |
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 value types are supported: integers, string-like, decimal