@@ -7,7 +7,7 @@ use arrow_schema::DECIMAL128_MAX_PRECISION;
77use bigdecimal:: ToPrimitive ;
88use raphtory_api:: core:: entities:: properties:: {
99 meta:: PropMapper ,
10- prop:: { Prop , PropType } ,
10+ prop:: { Prop , PropType , SerdeMap , arrow_dtype_from_prop_type , struct_array_from_props } ,
1111} ;
1212use raphtory_core:: {
1313 entities:: {
@@ -197,7 +197,20 @@ impl Properties {
197197 }
198198 // PropColumn::Array(lazy_vec) => todo!(),
199199 // PropColumn::List(lazy_vec) => todo!(),
200- // PropColumn::Map(lazy_vec) => todo!(),
200+ PropColumn :: Map ( lazy_vec) => {
201+ let dt = meta
202+ . get_dtype ( col_id)
203+ . as_ref ( )
204+ . map ( arrow_dtype_from_prop_type)
205+ . unwrap ( ) ;
206+ let array_iter = indices
207+ . map ( |i| lazy_vec. get_opt ( i) )
208+ . map ( |e| e. map ( |m| SerdeMap ( m) ) ) ;
209+
210+ let struct_array = struct_array_from_props ( & dt, |sm| * sm, array_iter) ;
211+
212+ Some ( Arc :: new ( struct_array) )
213+ }
201214 _ => None , //todo!("Unsupported column type"),
202215 }
203216 }
@@ -234,7 +247,7 @@ impl Properties {
234247 }
235248 }
236249
237- pub ( crate ) fn t_len ( & self ) -> usize {
250+ pub fn t_len ( & self ) -> usize {
238251 self . t_properties . len ( )
239252 }
240253
0 commit comments