Affects Version/s: None
Fix Version/s: 1.4.2
To reproduce the error,
1) Create a table "foo" with a column name "I" on Oracle DB
2) Run sqoop import --connect jdbc:oracle:thin:@//localhost/xe --username **** --password **** --verbose --table foo --split-by i --columns i --hive-import
This generates the following call stack:
The reason is simple. In the following lines of code:
colType is null because column "i" does not exist in the table "foo" but "I" exists. Now toHiveType(int colType) tries to autocast a null to a primitive int, resulting a NPE.
It would be better if more informative message is provided rather than a random NPE.