From sqoop-dev-return-2188-apmail-incubator-sqoop-dev-archive=incubator.apache.org@incubator.apache.org Wed Mar 7 08:02:26 2012 Return-Path: X-Original-To: apmail-incubator-sqoop-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-sqoop-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D499970C for ; Wed, 7 Mar 2012 08:02:26 +0000 (UTC) Received: (qmail 88562 invoked by uid 500); 7 Mar 2012 08:02:25 -0000 Delivered-To: apmail-incubator-sqoop-dev-archive@incubator.apache.org Received: (qmail 88415 invoked by uid 500); 7 Mar 2012 08:02:22 -0000 Mailing-List: contact sqoop-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sqoop-dev@incubator.apache.org Delivered-To: mailing list sqoop-dev@incubator.apache.org Received: (qmail 88368 invoked by uid 99); 7 Mar 2012 08:02:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 08:02:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 08:02:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F14FAC99F for ; Wed, 7 Mar 2012 08:01:59 +0000 (UTC) Date: Wed, 7 Mar 2012 08:01:59 +0000 (UTC) From: "Cheolsoo Park (Created) (JIRA)" To: sqoop-dev@incubator.apache.org Message-ID: <1659607717.32139.1331107319989.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (SQOOP-456) Generated Java class does not distinguish date and timestamp in Oracle DB MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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 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