llama90 commented on code in PR #40761:
URL: https://github.com/apache/arrow/pull/40761#discussion_r1553345115


##########
python/pyarrow/type_traits.pxi:
##########
@@ -0,0 +1,585 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from pyarrow.includes.libarrow cimport (is_integer,
+                                        is_signed_integer,
+                                        is_unsigned_integer,
+                                        is_floating,
+                                        is_numeric,
+                                        is_decimal,
+                                        is_run_end_type,
+                                        is_primitive,
+                                        is_base_binary_like,
+                                        is_binary_like,
+                                        is_large_binary_like,
+                                        is_binary,
+                                        is_string,
+                                        is_temporal,
+                                        is_time,
+                                        is_date,
+                                        is_interval,
+                                        is_dictionary,
+                                        is_fixed_size_binary,
+                                        is_fixed_width,
+                                        is_var_length_list,
+                                        is_list,
+                                        is_list_like,
+                                        is_var_length_list_like,
+                                        is_list_view,
+                                        is_nested,
+                                        is_union,
+                                        bit_width,
+                                        offset_bit_width)
+
+# These functions are simply a redirect, the official APIs are in 
pyarrow.types.

Review Comment:
   Thank you for review.
   
   I migrated functions to `types.pxi` file and deleted `type_traits.pxi` file. 
Does what I've done fit your intentions?
   
   Do you think docstring is also unnecessary? Actually I had no intention of 
adding a docstring. This was added because it was requested as CI was being 
performed.
   
   Or are you still talking about why you do wrapping? This part replaces the 
content mentioned previously.
   
   > I understand that pyarrow has a wide user base, and to avoid breaking 
compatibility, I've made sure that functions in the form of `is_${type}` can 
still operate as intended. (If I'm mistaken, please let me know.)
   
   If I have misunderstood your intention, I would appreciate it if you could 
explain it in a little more detail. I actually lack a general understanding of 
the pyarrow code.



-- 
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]

Reply via email to