5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 05:51:17 +08:00

SQOOP-168. NPE due to null binary columns.

(Scott Foster via Arvind Prabhakar)

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1150016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Bayer 2011-07-22 20:04:29 +00:00
parent 5774ddd6db
commit 9b10f9b2c4

View File

@ -115,7 +115,7 @@ public static Date readDate(int colNum, ResultSet r) throws SQLException {
public static BytesWritable readBytesWritable(int colNum, ResultSet r)
throws SQLException {
byte [] bytes = r.getBytes(colNum);
return new BytesWritable(bytes);
return bytes == null ? null : new BytesWritable(bytes);
}
public static BigDecimal readBigDecimal(int colNum, ResultSet r)