5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-09 01:50:07 +08:00

SQOOP-615: Error in Avro generation

(Giovanni Ruggiero via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2012-09-27 12:58:35 +02:00
parent 465c2751f7
commit d4767e9f61

View File

@ -61,7 +61,7 @@ public Schema generate() throws IOException {
List<Field> fields = new ArrayList<Field>();
for (String columnName : columnNames) {
String cleanedCol = ClassWriter.toIdentifier(columnName);
int sqlType = columnTypes.get(cleanedCol);
int sqlType = columnTypes.get(columnName);
Schema avroSchema = toAvroSchema(sqlType, columnName);
Field field = new Field(cleanedCol, avroSchema, null, null);
field.addProp("columnName", columnName);