Skip to content

Commit 01b072d

Browse files
committed
address comment
1 parent 0f4d4a4 commit 01b072d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ object ExpressionEncoder {
5252
throw new UnsupportedOperationException(
5353
"Cannot create encoder for Option of non-flat type, as non-flat type is represented " +
5454
"as a row, and the entire row can not be null in Spark SQL like normal databases. " +
55-
"You can wrap your type with Tuple1 if you do want top level null objects.")
55+
"You can wrap your type with Tuple1 if you do want top level null objects, e.g. " +
56+
"val ds: Dataset[Tuple1[MyClass]] = Seq(Tuple1(MyClass(...)), Tuple1(null)).toDS")
5657
}
5758

5859
val cls = mirror.runtimeClass(tpe)

0 commit comments

Comments
 (0)