-
I'm just curious why you have defined your own trait ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for the question @Tudyx. I'm a huge fan of serde and we had a longer section dedicated to this in the README. I'll look to add that back. The two main goals of this crate are:
For 1, if we use serde, we either need to infer the schema in a separate pass, which this crate does. Or we need to infer it while performing the operation. For deserialization, we could do this (and inferring the schema is already something arrow2 already does for formats like JSON btw). For serialization, we would need an alternate mechanism to specify the desired schema. For this crate, we wanted compile-time generation of the arrow2 schema to not require the user to come up with another way to specify the schema. This is where the If we have compile-time mapping, the remaining problem is mapping between rust types and arrow2 data structures that correspond to our schema. We could use serde for this, but the serde data model is an additional layer of abstraction we don't need. The conversions that need to be performed is more similar to Honestly, if the compile-time schema was not needed, then it would make a lot more sense to try to use serde to avoid all the proc-macro work. But it's my belief that the compile-time schema drastically improves the usability of this crate, which is why we took this path. Hope that makes sense! |
Beta Was this translation helpful? Give feedback.
Thanks for the question @Tudyx. I'm a huge fan of serde and we had a longer section dedicated to this in the README. I'll look to add that back.
The two main goals of this crate are:
For 1, if we use serde, we either need to infer the schema in a separate pass, which this crate does. Or we need to infer it while performing the operation. For deserialization, we could do this (and inferring the schema is already something arrow2 already does for formats like JSON btw). For serialization, we would need an alternate mechanism to specify the desired schema.
For this crate, we wa…