Skip to content

Commit 146c549

Browse files
authored
fix: Fix extension type definitions (#20)
`PyExtensionType` is a special type for extensions backed by Python pickle, so it's not what we want. We should use the base `ExtensionType`
1 parent c0cdf55 commit 146c549

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cloudquery/sdk/types/json.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import pyarrow as pa
22

33

4-
class JSONType(pa.PyExtensionType):
4+
class JSONType(pa.ExtensionType):
55
def __init__(self):
6-
pa.PyExtensionType.__init__(self, pa.binary())
6+
pa.ExtensionType.__init__(self, extension_name="json", storage_type=pa.binary())
77

88
def __reduce__(self):
99
return JSONType, ()

cloudquery/sdk/types/uuid.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import pyarrow as pa
22

33

4-
class UUIDType(pa.PyExtensionType):
4+
class UUIDType(pa.ExtensionType):
55
def __init__(self):
6-
pa.PyExtensionType.__init__(self, pa.binary(16))
6+
pa.ExtensionType.__init__(
7+
self, extension_name="uuid", storage_type=pa.binary(16)
8+
)
79

810
def __reduce__(self):
911
return UUIDType, ()

0 commit comments

Comments
 (0)