sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheolsoo Park (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SQOOP-456) Generated Java class does not distinguish date and timestamp in Oracle DB
Date Thu, 08 Mar 2012 22:18:09 GMT

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

Cheolsoo Park updated SQOOP-456:
--------------------------------

    Priority: Minor  (was: Major)

The Oracle JDBC driver has a long history on date and timestamp. In shorts, versions <
9.2 && > 11.1 auto-cast date to timestamp. But the rest of versions do not.

For more details, please refer to the following link: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
                
> Generated Java class does not distinguish date and timestamp in Oracle DB 
> --------------------------------------------------------------------------
>
>                 Key: SQOOP-456
>                 URL: https://issues.apache.org/jira/browse/SQOOP-456
>             Project: Sqoop
>          Issue Type: Bug
>          Components: codegen
>            Reporter: Cheolsoo Park
>            Assignee: Cheolsoo Park
>            Priority: Minor
>
> In genereated Java class, both date and timestamp are considered as timestamps. For examples,
the following getter method is generated for a date column:
> {code:xml} 
> public void readFields(ResultSet __dbResults) throws SQLException {
>   this.__cur_result_set = __dbResults;
>   this.DATA_COL0 = JdbcWritableBridge.readTimestamp(1, __dbResults);
> }
> {code}
> This happens because both date and timestamp is labeled as Types.TIMESTAMP by ConnManager.
The fix seems straightforward. In ClassWriter, the new method getColTypeNamesForTable introduced
by Bilung at SQOOP-352 should replace getColTypes(). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message