Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
In Substrait, nullability is associated with a type, whereas in Arrow it is associated with a field. Currently, DeserializeType ignores nullability for this reason, and SerializeType uses the (AFAICT) illegal NULLABILITY_UNSPECIFIED enum variant to do round-trip testing, and therefore this illegal variant is not rejected as it should.
The correct solution IMO is to (de)serialize types to and from std::pair<std::shared_ptr<DataType>, bool> to explicitly expose this difference to the outside world. The internal FromProto and ToProto are functions already doing this.