Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nullable bug of Arrow MapVector in Bridge.cpp (#11214)
Summary: There is a constraint defined in [arrow/format/Schema.fbs](https://github.com/apache/arrow/blob/a153dcb7ae1f61e705472574a5890b33db8cb76a/format/Schema.fbs#L138), which requires the MapVector itself and the key of MapVector to be not nullable. > /// Neither the "entries" field nor the "key" field may be nullable. There are also two not-nullable constraints in the Java implementation of MapVector: 1. Map data should be a non-nullable struct type; https://github.com/apache/arrow/blob/d4516c5386f84619dfdf2a9f72fed6d7df89704c/java/vector/src/main/java/org/apache/arrow/vector/complex/MapVector.java#L98 2. Map data key type should be a non-nullable; https://github.com/apache/arrow/blob/d4516c5386f84619dfdf2a9f72fed6d7df89704c/java/vector/src/main/java/org/apache/arrow/vector/complex/MapVector.java#L105 However, When the velox convert the MapVector to Arrow MapVector, velox will set the flag of MapVector to nullable, which violates these constraints: https://github.com/facebookincubator/velox/blob/acd57170b6d98206def1ef02b74c467e3ba18061/velox/vector/arrow/Bridge.cpp#L1388 Pull Request resolved: #11214 Reviewed By: xiaoxmeng Differential Revision: D64520267 Pulled By: pedroerp fbshipit-source-id: adcb140e17e422850e3d3fcc61ead31db8f152e6
- Loading branch information