Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.7
-
None
-
None
Description
The code just does
for (Field f : fields) {
without ever checking if fields is set. There is a createRecord version that does not take fields so this can be empty. This is especially annoying within the Scala/Spark REPL as that immediately prints out the result of everything you type so it calls toString which then fails and that even leaves the object unset in the REPL.
I'll attach a patch that checks whether fields is null.