AbsaOSS / AbsaOSS/spark-data-standardization

Standardization fails if default value is not defined for a non-nullable array

オープン
#86 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Scala
スター
7
フォーク
2
平均マージ
1日 18時間
マージ済み PR(30日)
4

説明

## Describe the bug
The error is:
```
Caused by: java.lang.IllegalStateException: No default value defined for data type array
at za.co.absa.standardization.types.CommonTypeDefaults.getDataTypeDefaultValue(CommonTypeDefaults.scala:63) ~[pramen-components_2.12_3.5-0.3.5-SNAPSHOT.jar:0.3.5-SNAPSHOT]
at za.co.absa.standardization.types.CommonTypeDefaults.$anonfun$getDataTypeDefaultValueWithNull$1(CommonTypeDefaults.scala:71) ~[pramen-components_2.12_3.5-0.3.5-SNAPSHOT.jar:0.3.5-SNAPSHOT]
at scala.util.Try$.apply(Try.scala:213) ~[scala-library-2.12.18.jar:?]
at za.co.absa.standardization.types.CommonTypeDefaults.getDataTypeDefaultValueWithNull(CommonTypeDefaults.scala:71) ~[pramen-components_2.12_3.5-0.3.5-SNAPSHOT.jar:0.3.5-SNAPSHOT]
```

But the natural default value for an array is the empty array.

## To Reproduce
1. Create a schema with a non-nullable array column.
2. Try to standardize data with this schema while not specifying a default value for the array column.
3. See the error.

## Expected behavior
Standardization should use empty array as the default value for array type automatically.

## Business Value
--

## Screenshots
--

## Additional context
--

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。