[
https://issues.apache.org/jira/browse/ARROW-5890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394102#comment-17394102
]
Antoine Pitrou commented on ARROW-5890:
---------------------------------------
> Specifically for the {{cast}} case, would we want to have some extension
> point in the ExtensionType to control the casting?
Perhaps, though I'm not sure what it should look like. Perhaps like this:
{code:c++}
class ExtensionType {
// ...
bool CanCastTo(const DataType& to_type);
Result<Datum> CastTo(const Datum& value, std::shared_ptr<DataType> to_type,
const CastOptions& options = CastOptions::Safe(),
ExecContext* ctx = NULLPTR);
}
{code}
cc [~bkietz]
> [C++][Python] Support ExtensionType arrays in more kernels
> ----------------------------------------------------------
>
> Key: ARROW-5890
> URL: https://issues.apache.org/jira/browse/ARROW-5890
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Joris Van den Bossche
> Priority: Major
>
> From a quick test (through Python), it seems that {{slice}} and {{take}}
> work, but the following not:
> - {{cast}}: it could rely on the casting rules for the storage type. Or do we
> want that you explicitly have to take the storage array before casting?
> - {{dictionary_encode}} / {{unique}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)