@@ -219,34 +219,39 @@ trait Row extends Serializable {
219219 * Returns the value at position i as a primitive boolean.
220220 *
221221 * @throws ClassCastException when data type does not match.
222+ * @throws SparkException when value is null.
222223 */
223224 def getBoolean (i : Int ): Boolean = getAnyValAs[Boolean ](i)
224225
225226 /**
226227 * Returns the value at position i as a primitive byte.
227228 *
228229 * @throws ClassCastException when data type does not match.
230+ * @throws SparkException when value is null.
229231 */
230232 def getByte (i : Int ): Byte = getAnyValAs[Byte ](i)
231233
232234 /**
233235 * Returns the value at position i as a primitive short.
234236 *
235237 * @throws ClassCastException when data type does not match.
238+ * @throws SparkException when value is null.
236239 */
237240 def getShort (i : Int ): Short = getAnyValAs[Short ](i)
238241
239242 /**
240243 * Returns the value at position i as a primitive int.
241244 *
242245 * @throws ClassCastException when data type does not match.
246+ * @throws SparkException when value is null.
243247 */
244248 def getInt (i : Int ): Int = getAnyValAs[Int ](i)
245249
246250 /**
247251 * Returns the value at position i as a primitive long.
248252 *
249253 * @throws ClassCastException when data type does not match.
254+ * @throws SparkException when value is null.
250255 */
251256 def getLong (i : Int ): Long = getAnyValAs[Long ](i)
252257
@@ -255,13 +260,15 @@ trait Row extends Serializable {
255260 * Throws an exception if the type mismatches or if the value is null.
256261 *
257262 * @throws ClassCastException when data type does not match.
263+ * @throws SparkException when value is null.
258264 */
259265 def getFloat (i : Int ): Float = getAnyValAs[Float ](i)
260266
261267 /**
262268 * Returns the value at position i as a primitive double.
263269 *
264270 * @throws ClassCastException when data type does not match.
271+ * @throws SparkException when value is null.
265272 */
266273 def getDouble (i : Int ): Double = getAnyValAs[Double ](i)
267274
@@ -516,6 +523,7 @@ trait Row extends Serializable {
516523 *
517524 * @throws UnsupportedOperationException when schema is not defined.
518525 * @throws ClassCastException when data type does not match.
526+ * @throws SparkException when value is null.
519527 */
520528 private def getAnyValAs [T <: AnyVal ](i : Int ): T =
521529 if (isNullAt(i)) throw DataTypeErrors .valueIsNullError(i)
0 commit comments