You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/15 08:01:18 UTC

[jira] [Commented] (SQOOP-2839) Sqoop import failure due to data member conflict in ORM code for table

    [ https://issues.apache.org/jira/browse/SQOOP-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146988#comment-15146988 ] 

ASF GitHub Bot commented on SQOOP-2839:
---------------------------------------

GitHub user vishnusn opened a pull request:

    https://github.com/apache/sqoop/pull/13

    [SQOOP-2839] : Sqoop import failure due to data member conflict in ORM code for table

    [SQOOP-2839] : Sqoop creates a Java class corresponding to the table to be imported, which contains all the column names as data members. It also includes a constant named  "PROTOCOL_VERSION" and this leads to conflict between data members, if one of the column is named “PROTOCOL_VERSION”. So we updated the constant name to PROTOCOL_VERSION_SQOOP_<current Version>.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vishnusn/sqoop patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/sqoop/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit 2a3d5e4027ff7118049c72190994c1c0900aa455
Author: vishnusn <vi...@gmail.com>
Date:   2016-02-15T06:58:07Z

    Update ClassWriter.java
    
    [SQOOP-2839] : Sqoop creates a Java class corresponding to the table to be imported, which contains all the column names as data members. It also includes a constant named  "PROTOCOL_VERSION" and this leads to conflict between data members, if one of the column is named “PROTOCOL_VERSION”. So we updated the constant name to PROTOCOL_VERSION_SQOOP_<current Version>.

----


> Sqoop import failure due to data member conflict in ORM code for table
> ----------------------------------------------------------------------
>
>                 Key: SQOOP-2839
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2839
>             Project: Sqoop
>          Issue Type: Bug
>          Components: codegen
>            Reporter: VISHNU S NAIR
>
> While importing data with Sqoop, if any of the table contains a column named "PROTOCOL_VERSION", Sqoop will fail to import data.
> /tmp/sqoop-user/compile/fd570d817e8323d1135a7f2a6612e321/QueryResult.java:173: error: variable PROTOCOL_VERSION is already defined in class QueryResult
>   private String PROTOCOL_VERSION;
>                  ^
> /tmp/sqoop-user/compile/fd570d817e8323d1135a7f2a6612e321/QueryResult.java:175: error: incompatible types
>     return PROTOCOL_VERSION;
>            ^
>   required: String
>   found:    int



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