Jeroen van Straten created ARROW-15618:
------------------------------------------

             Summary: [C++] Correctly handle Substrait nullability of types
                 Key: ARROW-15618
                 URL: https://issues.apache.org/jira/browse/ARROW-15618
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Jeroen van Straten


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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to