You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/14 12:34:56 UTC

[GitHub] [arrow] 0x26res commented on a diff in pull request #14633: 18257 - pass back time types with correct type class

0x26res commented on code in PR #14633:
URL: https://github.com/apache/arrow/pull/14633#discussion_r1021471636


##########
python/pyarrow/public-api.pxi:
##########
@@ -97,6 +97,10 @@ cdef api object pyarrow_wrap_data_type(
         out = SparseUnionType.__new__(SparseUnionType)
     elif type.get().id() == _Type_DENSE_UNION:
         out = DenseUnionType.__new__(DenseUnionType)
+    elif type.get().id() == _Type_TIME32:
+        out = Time32Type.__new__(Time32Type)
+    elif type.get().id() == _Type_TIME64:
+        out = Time64Type.__new__(Time64Type)

Review Comment:
   @jorisvandenbossche I've noticed that date32 and date64 are missing here as well. But they would require more effort because Date32Type and Date64Type don't exist. I think I would need to introduced them in `types.pxi`. I'm not sure if this is necessary though, given these types don't have a custom field (unlike Time32Type which has a `unit`).
   
   Also should the if statement in that function be in any specific order?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org