westonpace commented on code in PR #41823:
URL: https://github.com/apache/arrow/pull/41823#discussion_r1689989051
##########
python/pyarrow/types.pxi:
##########
@@ -5207,6 +5251,63 @@ def fixed_shape_tensor(DataType value_type, shape,
dim_names=None, permutation=N
return out
+def opaque(DataType storage_type, str type_name not None, str vendor_name not
None):
+ """
+ Create instance of opaque extension type.
+
+ Parameters
+ ----------
+ storage_type : DataType
+ The underlying data type.
+ type_name : str
+ The name of the type in the external system.
+ vendor_name : str
+ The name of the external system.
+
+ Examples
+ --------
+ Create an instance of opaque extension type:
+
+ >>> import pyarrow as pa
+ >>> type = pa.opaque(pa.binary(), "other", "jdbc")
+ >>> type
+ OpaqueType(extension<arrow.opaque[storage_type=binary, type_name=other,
vendor_name=jdbc]>)
+
+ Inspect the data type:
+
+ >>> type.storage_type
+ DataType(binary)
+ >>> type.type_name
+ 'other'
+ >>> type.vendor_name
+ 'jdbc'
+
+ Create a table with fixed shape tensor extension array:
Review Comment:
```suggestion
Create a table with an opaque array:
```
##########
python/pyarrow/array.pxi:
##########
@@ -4438,6 +4438,34 @@ cdef class FixedShapeTensorArray(ExtensionArray):
)
+cdef class OpaqueArray(ExtensionArray):
+ """
+ Concrete class for opaque extension arrays.
+
+ Examples
+ --------
+ Define the extension type for opaque array
Review Comment:
```suggestion
Define the extension type for an opaque array
```
##########
python/pyarrow/types.pxi:
##########
@@ -5207,6 +5251,63 @@ def fixed_shape_tensor(DataType value_type, shape,
dim_names=None, permutation=N
return out
+def opaque(DataType storage_type, str type_name not None, str vendor_name not
None):
+ """
+ Create instance of opaque extension type.
+
+ Parameters
+ ----------
+ storage_type : DataType
+ The underlying data type.
+ type_name : str
+ The name of the type in the external system.
+ vendor_name : str
+ The name of the external system.
+
+ Examples
+ --------
+ Create an instance of opaque extension type:
Review Comment:
```suggestion
Create an instance of an opaque extension type:
```
--
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]