Skip to content

Commit 4d780ea

Browse files
committed
chore[vortex-array]: remove SerdeVTable
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 0b22a00 commit 4d780ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vortex-python/src/arrays/py/vtable.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use vortex::vtable::{
2020
VTable, ValidityVTable, VisitorVTable,
2121
};
2222
use vortex::{
23-
ArrayBufferVisitor, ArrayChildVisitor, ArrayRef, Canonical, EncodingId,
24-
EncodingRef, Precision, RawMetadata, SerializeMetadata, vtable,
23+
ArrayBufferVisitor, ArrayChildVisitor, ArrayRef, Canonical, EncodingId, EncodingRef, Precision,
24+
RawMetadata, SerializeMetadata, vtable,
2525
};
2626

2727
use crate::arrays::py::{PythonArray, PythonEncoding};
@@ -51,11 +51,11 @@ impl VTable for PythonVTable {
5151
}
5252

5353
fn metadata(array: &PythonArray) -> VortexResult<Self::Metadata> {
54-
Python::with_gil(|py| {
54+
Python::attach(|py| {
5555
let obj = array.object.bind(py);
5656
if !obj.hasattr(intern!(py, "metadata"))? {
5757
// The class does not have a metadata attribute so does not support serialization.
58-
vortex_bail!("Array does not support serialization");
58+
return Ok(None);
5959
}
6060

6161
let bytes = obj
@@ -65,7 +65,7 @@ impl VTable for PythonVTable {
6565
.as_bytes()
6666
.to_vec();
6767

68-
Ok(RawMetadata(bytes))
68+
Ok(Some(RawMetadata(bytes)))
6969
})
7070
}
7171

0 commit comments

Comments
 (0)