thisisnic commented on code in PR #45818:
URL: https://github.com/apache/arrow/pull/45818#discussion_r1998747389


##########
python/pyarrow/scalar.pxi:
##########
@@ -240,6 +240,10 @@ cdef class UInt8Scalar(Scalar):
         cdef CUInt8Scalar* sp = <CUInt8Scalar*> self.wrapped.get()
         return sp.value if sp.is_valid else None
 
+    def __int__(self):
+
+        return(self.as_py())
+

Review Comment:
   Is all this copying and pasting OK?  I could define a new scalar integer 
subclass which defines this once and then have the existing int-based 
subclasses be subclasses of that, but I wasn't sure if that would be 
overengineering things?



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to