You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Benjamin Kietzman (JIRA)" <ji...@apache.org> on 2018/12/15 13:53:00 UTC

[jira] [Commented] (ARROW-4036) [C++] Make status codes pluggable

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

Benjamin Kietzman commented on ARROW-4036:
------------------------------------------

A few ways I can think of to accomplish that without collisions
 * Extend Status with something like std::error_category for each sub library (could be as simple as adding a byte to Status::State identifying sub library)
 * Replace StatusCode with the hardcoded timestamp of each code's definition (== weaksauce uuid)
 * RegisterStatusCode(&kSomeStatusCode) will not yield consistent codes; if we add a new one in arrow then all the sub library codes will increment. Is that a problem? It would break if, for example, different versions of arrow were communicating Statuses
 * RegisterStatusCode(timestamp, &kSomeStatusCode) will fix that if we have guaranteed load order for sub libraries

Either of the latter two mean being a little careful about StatusCodes since their values will not be defined until loading is complete. For example, {{constexpr StatusCode my_code = kSomeStatusCode;}} would be undefined behavior 

> [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)