Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#86 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
scala, spark

调研方向

从 CommonTypeDefaults.scala 的第 63-71 行附近开始,stack trace 显示缺失的默认值在此处被引发并处理。使用不可为 null 的数组列且不指定显式默认值来复现该问题,然后验证标准化会使用空数组,而不是抛出异常。

由索引模型根据 Issue 内容生成。

描述

bug

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

--

主要语言
Scala
星标
7
派生
2
平均合并
8 天 8 小时
30 天内合并 PR
3

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AbsaOSS/spark-data-standardization 的其他 Issue

查看 AbsaOSS/spark-data-standardization 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。