[
https://issues.apache.org/jira/browse/SQOOP-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149966#comment-15149966
]
ASF GitHub Bot commented on SQOOP-2839:
---------------------------------------
GitHub user vishnusn opened a pull request:
https://github.com/apache/sqoop/pull/14
[SQOOP-2839]
On our investigation we found out this is related to Sqoop’s internal
implementation. Sqoop internally 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 in order to solve this issue , adding PROTOCOL_VERSION in reserved words
list
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vishnusn/sqoop patch-3
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sqoop/pull/14.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 #14
----
commit e8887a418ee916546a2fb62475546e294a9a552e
Author: vishnusn <[email protected]>
Date: 2016-02-17T06:16:01Z
[SQOOP-2839]
On our investigation we found out this is related to Sqoop’s internal
implementation. Sqoop internally 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 in order to solve this issue , adding PROTOCOL_VERSION in reserved words
list
----
> 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
> Affects Versions: 1.4.6
> 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)