@@ -20,8 +20,8 @@ use vortex::vtable::{
2020 VTable , ValidityVTable , VisitorVTable ,
2121} ;
2222use 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
2727use 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