hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Kimball (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MAPREDUCE-1174) Sqoop improperly handles table/column names which are reserved sql words
Date Sat, 31 Oct 2009 02:00:59 GMT

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

Aaron Kimball updated MAPREDUCE-1174:

    Attachment: MAPREDUCE-1174.patch

This patch puts in a foundation for quoting by providing {{escapeTableName()}} and {{escapeColumnName()}}
methods in ConnManager; the default implementation does not change the literal strings passed
in. ConnManager implementations now use these when putting user-provided table/column names
in sql strings.

MySQLManager has been changed to use {{`backticks`}} to quote table and column names. This
does not work with HSQLDB; the default non-quoting implementation is used instead.

New test case demonstrates the ability to import tables/columns with reserved words in mysql.
Ran locally; passes.

> Sqoop improperly handles table/column names which are reserved sql words
> ------------------------------------------------------------------------
>                 Key: MAPREDUCE-1174
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1174
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: contrib/sqoop
>            Reporter: Aaron Kimball
>            Assignee: Aaron Kimball
>         Attachments: MAPREDUCE-1174.patch
> In some databases it is legal to name tables and columns with terms that overlap SQL
reserved keywords (e.g., {{CREATE}}, {{table}}, etc.). In such cases, the database allows
you to escape the table and column names. We should always escape table and column names when

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message