You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Eduardo Ponce (Jira)" <ji...@apache.org> on 2021/09/21 16:17:00 UTC

[jira] [Created] (ARROW-14058) [Python] Update use of FunctionOptions scoped enums once Cython 3 is supported

Eduardo Ponce created ARROW-14058:
-------------------------------------

             Summary: [Python] Update use of FunctionOptions scoped enums once Cython 3 is supported
                 Key: ARROW-14058
                 URL: https://issues.apache.org/jira/browse/ARROW-14058
             Project: Apache Arrow
          Issue Type: Improvement
          Components: Python
            Reporter: Eduardo Ponce


In [_pyarrow/_compute.pyx_|https://github.com/apache/arrow/blob/master/python/pyarrow/_compute.pyx] there are several scoped enums for FunctionOptions (e.g., RoundMode and SortOrder) which are not used in dictionaries but rather with a chain of if-elses because scoped enums are not fully supported in Cython >= 0.29.x since they do not resolve to an underlying integral type. We would like to be consistent with the use of other FunctionOptions and use a dictionary when mapping string input to enum constant.

In order for the above to work in Cython 3, we also need to update the definition of the scoped enums found in [_pyarrow/includes/libarrow.pxd_|] to the form of
{code:c++}
cpdef enum class CRoundMode(int8_t)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)