Standardization fails if default value is not defined for a non-nullable array
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- scala, spark
调研方向
从 CommonTypeDefaults.scala 的第 63-71 行附近开始,stack trace 显示缺失的默认值在此处被引发并处理。使用不可为 null 的数组列且不指定显式默认值来复现该问题,然后验证标准化会使用空数组,而不是抛出异常。
由索引模型根据 Issue 内容生成。
描述
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
- Create a schema with a non-nullable array column.
- Try to standardize data with this schema while not specifying a default value for the array column.
- See the error.
Expected behavior
Standardization should use empty array as the default value for array type automatically.
Business Value
--
Screenshots
--
Additional context
--
- 主要语言
- Scala
- 星标
- 7
- 派生
- 2
- 平均合并
- 8 天 8 小时
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AbsaOSS/spark-data-standardization 的其他 Issue
-
enhancement
难度 3/5 1-2 天 新手友好度 45/100
-
bug
难度 3/5 1-2 天 新手友好度 48/100
AbsaOSS/spark-data-standardization#68 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
-
Standardization can fail with `Task not serializable` when casting to date is requested可能已有人在做 @qwerty44-U 于 122 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 25/100
查看 AbsaOSS/spark-data-standardization 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
apache/pekko-persistence-jdbc#646 ·
维护者通常 1 天内回复
-
requires-triage
难度 2/5 1-3 小时 新手友好度 82/100
apache/datafusion-comet#7176 ·
维护者通常 1 天内回复
-
kind:bug state:needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
OpenLineage/OpenLineage#5100 · 1 条评论 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复