[ 
https://issues.apache.org/jira/browse/ARROW-4036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722307#comment-16722307
 ] 

Wes McKinney commented on ARROW-4036:
-------------------------------------

One way would be to make {{Status::State}} a public type with virtual methods. 
Since {{Status::state_}} is null in almost all cases, I wouldn't think this 
would have performance implications (though {{delete state_}} now would require 
invoking a virtual ctor) but this should be examined more closely (in godbolt) 
to be sure.

So we could define something like

{code}
class GandivaErrorState : public Status::ErrorState {
 public:
  std::string error_type() const override { return "gandiva"; }
  ...
};
{code}

> [C++] Make status codes pluggable
> ---------------------------------
>
>                 Key: ARROW-4036
>                 URL: https://issues.apache.org/jira/browse/ARROW-4036
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: 0.11.1
>            Reporter: Antoine Pitrou
>            Priority: Major
>
> Currently we're defining all Status codes in the Arrow base library, even 
> those pertaining to sub-libraries such as arrow_python, plasma, gandiva, etc. 
> We should try to devise some kind of simple registry system to avoid 
> centralizing those.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to