Review Board 1.7.22

SQOOP-1071 Avro import is failing when columns are starting with underscore

Review Request #11748 - Created June 8, 2013 and submitted

Jarek Cecho
The issue is hiding in fact that ClassWriter will use toJavaIdentifier() method to generate attribute name, however AvroSchemaGenerator is using only toIdentifier(). I've changed the AvroSchemaGenerator to generate the proper schema in the same way as is doing the ClassWriter. This is backward incompatible change, however considering that Sqoop was not able to import anything without this, I would assume that consequences will be minimal if there will be any.
I've added test that will fail without the fix and refactored a bit BaseSqoopTestCase to allow override column names. All tests seems to be passing.
Review request changed
Updated (July 22, 2013, 9:49 p.m.)
  • changed from pending to submitted