Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-890

ClassWriter Generates setField Casts Based on the Output Type, not the Input Type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4.2
    • 1.5.0
    • codegen
    • None

    Description

      I've attached a testcase that exports from a Long column in an avro file to an Integer column in the database. The setField method the ClassWriter generates puts in an (Integer) cast, whereas it should be a (Long) cast. The fix isn't immediately obvious, as the generateSetField currently only has the SQL types, not the input types.

      Attachments

        1. SQOOP-890.testcase.patch
          1 kB
          Nick White
        2. SQOOP-890.patch
          3 kB
          Nick White

        Activity

          People

            njw45 Nick White
            njw45 Nick White
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: