Did the metadata successfully serialize with serde json (this is a little
unclear to me given your description).

> I would expect that every schema can be serialized-deserialized back in
itself.

I have the same expectation.

If metadata can't be serialized with serde_json that would seem like a bug
to me and I think the project would appreciate help fixing it.

Thanks,
Andrew

On Sun, Apr 4, 2021 at 10:40 AM Jack Chan <j4ck....@gmail.com> wrote:

> 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
> > >
> >
>

Reply via email to