MCPcopy Create free account
hub / github.com/apache/arrow / ParamExtType

Class ParamExtType

python/pyarrow/tests/test_cffi.py:64–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63
64class ParamExtType(pa.ExtensionType):
65
66 def __init__(self, width):
67 self._width = width
68 super().__init__(pa.binary(width),
69 "pyarrow.tests.test_cffi.ParamExtType")
70
71 @property
72 def width(self):
73 return self._width
74
75 def __arrow_ext_serialize__(self):
76 return str(self.width).encode()
77
78 @classmethod
79 def __arrow_ext_deserialize__(cls, storage_type, serialized):
80 width = int(serialized.decode())
81 return cls(width)
82
83
84def make_schema():

Calls

no outgoing calls