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 21BC49CCA for ; Mon, 5 Mar 2012 22:44:21 +0000 (UTC) Received: (qmail 94989 invoked by uid 500); 5 Mar 2012 22:44:20 -0000 Delivered-To: apmail-incubator-sqoop-dev-archive@incubator.apache.org Received: (qmail 94925 invoked by uid 500); 5 Mar 2012 22:44:20 -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 94909 invoked by uid 99); 5 Mar 2012 22:44:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 22:44:20 +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; Mon, 05 Mar 2012 22:44:18 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5F4ACADBF for ; Mon, 5 Mar 2012 22:43:57 +0000 (UTC) Date: Mon, 5 Mar 2012 22:43:57 +0000 (UTC) From: "Bilung Lee (Commented) (JIRA)" To: sqoop-dev@incubator.apache.org Message-ID: <939064756.24325.1330987437391.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1914867978.2677.1330519437051.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SQOOP-448) boolean fields get nullified during postgres direct import into hive. 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 [ https://issues.apache.org/jira/browse/SQOOP-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222699#comment-13222699 ] Bilung Lee commented on SQOOP-448: ---------------------------------- Thanks for your contribution! The patch will eventually be committed into the trunk, and thus the convention is to base the patch on the version of code in the trunk. > boolean fields get nullified during postgres direct import into hive. > --------------------------------------------------------------------- > > Key: SQOOP-448 > URL: https://issues.apache.org/jira/browse/SQOOP-448 > Project: Sqoop > Issue Type: Bug > Components: connectors/postgresql > Affects Versions: 1.3.0 > Reporter: Boris Partensky > Assignee: Boris Partensky > Labels: patch > Fix For: 1.3.0 > > Attachments: sqoop.patch > > > These diffs address this issue - https://issues.cloudera.org/browse/SQOOP-43. > I changed DirectPostgresManager.java to special-case rewrite COPY.... command for boolean fields so that hive sees "true"/"false". The only shortcoming with my patch is that because PG jdbc driver can not tell bit data types from booleans, direct import will break with SQL cast errors if someone has real bit fields. Not sure how often people use those, but it will break direct import for that one person who does. If you have an idea on how I can make this better, let me know. Diffs are attached -- 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