Uploaded image for project: 'Sqoop (READ-ONLY)'
  1. Sqoop (READ-ONLY)
  2. SQOOP-37

Hive keywords not properly escaped on import

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: hive
    • Labels:
      None

      Description

      There are quite a few keywords[1] in Hive that cause ParseErrors when there is a column of the same name in the database (happened to me for "timestamp"). This is easily avoided as such words can be escaped with backticks. The same is done in HiveUtils. So the easiest solution would be to just escape everything.

      [1] http://github.com/apache/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ParseDriver.java#L46-191
      [2] http://github.com/apache/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java#L122-127

        Attachments

        1. SQOOP-37.2.patch
          6 kB
          Lars Francke
        2. SQOOP-37.4.patch
          8 kB
          Lars Francke
        3. SQOOP-37.patch
          0.5 kB
          Lars Francke

          Activity

            People

            • Assignee:
              lars_francke Lars Francke
              Reporter:
              lars_francke Lars Francke
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: