Indeed, I did, with both serde json and dynamodb. Inside an arrow schema, the metadata field is a hashmap with skip serializing if empty. When deserializing, it expects a metadata field. I would expect that every schema can be serialized-deserialized back in itself.
Jack On Sat, Apr 3, 2021, 10:59 AM Andrew Lamb <al...@influxdata.com> wrote: > This looks like a rust program. Perhaps you could try using `serde_json` or > some other format to narrow down where the issue is > > On Fri, Apr 2, 2021 at 10:00 PM Jack Chan <j4ck....@gmail.com> wrote: > > > Hi > > > > I tried to serialize and deserialize an arrow schema, but I got into an > > error of > > (Error { message: "missing field `metadata`" }). Is this a bug in apache > > arrow or in serde_dynamodb? > > > > ``` > > let schema = ArrowSchema::empty(); > > let object = serde_dynamodb::to_hashmap(&schema)?; > > let roundtrip: ArrowSchema = > serde_dynamodb::from_hashmap(object)?; > > assert_eq!(roundtrip, schema); > > ``` > > > > Jack > > >