[
https://issues.apache.org/jira/browse/ARROW-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719027#comment-16719027
]
Antoine Pitrou commented on ARROW-47:
-------------------------------------
I think there are several dimensions in the design space that should be
explored.
* Should scalars be backed by an ArrayData, or be standalone (or possibly one
or the other)? Backing by an ArrayData allows cheap passing of binary values
for example (like a std::string_view), while standalone values would be more
expensive (some types will come with their owned piece of memory like a
std::string). But standalone values are also more flexible in usage (you don't
need a separate ArrayData that you must remember to keep alive...).
* Can scalars have disjoint types, or is a common base class desired? Or
perhaps even a single union type, possible a {{variant}}? Those different
solutions have different costs, and also different usage models.
> [C++] Consider adding a scalar type object model
> ------------------------------------------------
>
> Key: ARROW-47
> URL: https://issues.apache.org/jira/browse/ARROW-47
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++
> Reporter: Wes McKinney
> Assignee: Uwe L. Korn
> Priority: Major
> Labels: Analytics
> Fix For: 0.13.0
>
>
> Just did this on the Python side. In later analytics routines, passing in
> scalar values (example: Array + Scalar) requires some kind of container. Some
> systems, like the R language, solve this problem with length-1 arrays, but we
> should do some analysis of use cases and figure out what will work best for
> Arrow.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)