edponce commented on a change in pull request #11196:
URL: https://github.com/apache/arrow/pull/11196#discussion_r712858301
##########
File path: python/pyarrow/types.pxi
##########
@@ -2446,8 +2446,11 @@ cpdef DictionaryType dictionary(index_type, value_type,
bint ordered=False):
DictionaryType out = DictionaryType.__new__(DictionaryType)
shared_ptr[CDataType] dict_type
- if _index_type.id not in {Type_INT8, Type_INT16, Type_INT32, Type_INT64}:
- raise TypeError("The dictionary index type should be signed integer.")
+ if _index_type.id not in {
+ Type_INT8, Type_INT16, Type_INT32, Type_INT64,
+ Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
Review comment:
There are related sets (such as [the primitive
types](https://github.com/apache/arrow/blob/master/python/pyarrow/types.pxi#L1827))
already defined in `types.pxi`, so it makes sense to have them in the same
file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]