Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-3021

ClassWriter fails if a column name contains a backslash character

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.6
    • Fix Version/s: 1.4.7
    • Component/s: None
    • Labels:
      None

      Description

      The following Sqoop command fails with a javac error:

      sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query "select C1_INT,C4_VARCHAR20, REGEXP_REPLACE(TRIM(C4_VARCHAR20),'\:','!') from T1_IMPORT WHERE \$CONDITIONS" --target-dir regex_imp --delete-target-dir -m 1
      

      The reason is that the REGEXP_REPLACE expression contains a backslash character which does not get escaped in ClassWriter and an invalid string gets generated into the Java code.

      SQOOP-2864 solved this problem for the double quote character we need to generalize that solution.

        Attachments

        1. SQOOP-3021.patch
          13 kB
          Szabolcs Vasas

          Issue Links

            Activity

              People

              • Assignee:
                vasas Szabolcs Vasas
                Reporter:
                vasas Szabolcs Vasas
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: