ianmcook commented on code in PR #43849:
URL: https://github.com/apache/arrow/pull/43849#discussion_r1747538304


##########
docs/source/python/extending_types.rst:
##########
@@ -197,19 +227,44 @@ and then reading it back yields the proper type::
 
     >>> with pa.ipc.open_stream(buf) as reader:
     ...    result = reader.read_all()
-    >>> result.column('ext').type
-    UuidType(FixedSizeBinaryType(fixed_size_binary[16]))
+    >>> result.column("ext").type
+    RationalType(StructType(struct<numer: int32, denom: int32>))
+
+Further, note that while we registered the concrete type
+``RationalType(pa.int32())``, ``RationalType(integer_type)`` has the same
+extension name (``"my_package.rational"``) for all integer types. As such,
+the above code will also allow users to (de)serialize these data types::

Review Comment:
   Edit for readability
   ```suggestion
   ``RationalType(pa.int32())``, you could use the same extension name
   ``"my_package.rational"`` to register ``RationalType(integer_type)`` for
   any Arrow integer type. As such, the above code will also allow users to
   (de)serialize these data types::
   ```



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