Jungtaek Lim created SPARK-33136:
------------------------------------
Summary: Handling nullability for complex types is broken during
resolution of V2 write command
Key: SPARK-33136
URL: https://issues.apache.org/jira/browse/SPARK-33136
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.0.1, 3.0.0, 3.1.0
Reporter: Jungtaek Lim
I figured out Spark 3.x cannot write to complex type with nullable if matching
column type in DataFrame is non-nullable.
For example,
{code:java}
case class StructData(a: String, b: Int)
case class Data(col_b: Boolean, col_i: Int, col_l: Long, col_f: Float, col_d:
Double, col_s: String, col_fi: Array[Byte], col_bi: Array[Byte], col_de:
Double, col_st: StructData, col_li: Seq[String], col_ma: Map[Int, String]){code}
`col_st.b` would be non-nullable in DataFrame, which should not matter when we
insert from DataFrame to the table which has `col_st.b` as nullable.
(non-nullable to nullable should be possible)
This looks to be broken in V2 write command.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]