mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 15:50:28 +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:
parent
5774ddd6db
commit
9b10f9b2c4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user