MenasConverter incorrectly handles Array's containsNull
- 主要语言
- Scala
- 星标
- 33
- 派生
- 16
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Describe the bug
Having an array with `containsNull` value of `false`, the value is lost when converting from Spark's `DataType` to `Menas SchemaField`
## To Reproduce
```scala
val sparkSchema = Seq(
StructField("arrayWithoutNulls", ArrayType(StringType, containsNull = false))
)
val menasSchema = sparkConverter.convertSparkToMenasFields(sparkSchema)
val sparkSchema2 = sparkConverter.convertMenasToSparkFields(menasSchema)
assert(sparkSchema == sparkSchema2) // will fail
```
The message:
```
Expected :List(StructField(arrayWithoutNulls,ArrayType(StringType,true),true))
Actual :List(StructField(arrayWithoutNulls,ArrayType(StringType,false),true))
```
## Expected behaviour
The value should be kept during the conversion.
贡献指南
评估
这个 Issue 还没有评估数据。