Skip to content

Commit 077f633

Browse files
committed
[SQL] Handle null values in debug()
Author: Michael Armbrust <[email protected]> Closes #1646 from marmbrus/nullDebug and squashes the following commits: 49050a8 [Michael Armbrust] Handle null values in debug()
1 parent 2e6efca commit 077f633

File tree

1 file changed

+3
-1
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/debug

1 file changed

+3
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ package object debug {
105105
var i = 0
106106
while (i < numColumns) {
107107
val value = currentRow(i)
108-
columnStats(i).elementTypes += HashSet(value.getClass.getName)
108+
if (value != null) {
109+
columnStats(i).elementTypes += HashSet(value.getClass.getName)
110+
}
109111
i += 1
110112
}
111113
currentRow

0 commit comments

Comments
 (0)