mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 02:52:19 +08:00
SQOOP-936: Classwriter should check if columnNames generated are null before accessing them
(Venkat Ranganathan via Jarek Jarcec Cecho)
This commit is contained in:
parent
0d5f73ad8d
commit
1d0ebc2730
@ -1071,6 +1071,10 @@ private void generateHadoopWrite(Map<String, Integer> columnTypes,
|
||||
public void generate() throws IOException {
|
||||
Map<String, Integer> columnTypes = getColumnTypes();
|
||||
|
||||
if (columnTypes == null) {
|
||||
throw new IOException("No columns to generate for ClassWriter");
|
||||
}
|
||||
|
||||
String[] colNames = getColumnNames(columnTypes);
|
||||
|
||||
// Translate all the column names into names that are safe to
|
||||
|
Loading…
Reference in New Issue
Block a user