[ 
https://issues.apache.org/jira/browse/MAPREDUCE-6246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramtin updated MAPREDUCE-6246:
------------------------------
    Fix Version/s: 2.4.1
           Labels: DB2 mapreduce  (was: )
           Status: Patch Available  (was: Open)

I changed the current DBOutputFormat class by checking the product name from 
connection object to see if it is DB2 then generates "INSERT INTO"  query 
without semicolon(";"). 

This technique is already used in DBInputFormat class for generating different 
"SELECT" statements for Oracle and MySQL databases.

> DBOutputFormat.java appending extra semicolon to query which is incompatible 
> with DB2
> -------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6246
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6246
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv1, mrv2
>    Affects Versions: 2.4.1
>         Environment: OS: RHEL 5.x, RHEL 6.x, SLES 11.x
> Platform: xSeries, pSeries
> Browser: Firefox, IE
> Security Settings: No Security, Flat file, LDAP, PAM
> File System: HDFS, GPFS FPO
>            Reporter: ramtin
>            Assignee: ramtin
>              Labels: mapreduce, DB2
>             Fix For: 2.4.1
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In DBOutputFormat class there is constructQuery method that generates "INSERT 
> INTO" statement with semicolon(";") at the end.
> Semicolon is ANSI SQL-92 standard character for a statement terminator but 
> this feature is disabled(OFF) as a default settings in IBM DB2.
> Although by using -t we can turn it ON for db2. 
> (http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0010410.html?cp=SSEPGG_9.7.0%2F3-6-2-0-2).
>  But there are some products that already built on top of this default 
> setting (OFF) so by turning ON this feature make them error prone.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to