Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.19.0
-
None
-
None
-
Ubuntu 8.04, Java 6, MySQL 5.0 (most likely not relevant)
-
Reviewed
Description
In org.apache.hadoop.mapred.lib.db.DBOutputFormat, the supplied names of the columns are not used for inserting values. The column names supplied to DBOutputFormat.setOutput(JobConf, String, String...) are used to determine the number of values to insert, but the order is dictated by the table definition of the underlying database. This affects the correct indices for DBWritable.write(PreparedStatement).
I will attach a patch that correctly maps these values.
I am characterizing this as a bug rather than an improvement because there may be existing code which implicitly relied on DBOutputFormat ignoring the supplied table names.