Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Sep 30, 2020

Simple value types are supported: integers, string-like, decimal

@github-actions
Copy link

Copy link
Member

@bkietz bkietz left a comment

Choose a reason for hiding this comment

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

Very neatly done, just a few nits

Comment on lines 63 to 82
Copy link
Member

Choose a reason for hiding this comment

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

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();
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, right, thank you.

Comment on lines +193 to +198
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The property is already exposed in FixedSizeBinaryBuilder.

pitrou added 2 commits October 1, 2020 10:58
Simple value types are supported: integers, string-like, decimal
@pitrou pitrou force-pushed the ARROW-7372-json-simple-dict branch from 6205857 to b31a8fb Compare October 1, 2020 09:22
@pitrou
Copy link
Member Author

pitrou commented Oct 1, 2020

Thanks for the suggestions. I'm going to merge when CI is green.

@pitrou pitrou closed this in 4e563bf Oct 1, 2020
@pitrou pitrou deleted the ARROW-7372-json-simple-dict branch October 1, 2020 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants