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

Sqoop2: Handle fixed point columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 1.99.8
    • sqoop2-framework
    • None

    Description

      From SQOOP-2213:

      Great question. This is one I wasn't 100% sure about either unfortunately. I think it depends on what we want to expose to connector developers. I've assumed the connector developers want the framework to make sure the data is correct. This may not be right...
      
      Here's the different scenarios I see:
      1. Object value is an integer.
      2. Object value is a long.
      3. Object value is a number, but neither a long nor integer.
      4. Object value is not a number.
      
      The resulting code would be affected by the following variables:
      1. How we want to handle Long values being passed to Integer sized columns
      2. How we want to handle non-numeric values being passed
      
      This code will do the following:
      1. Column(Integer), Value(Integer) => value as string
      2. Column(Integer), Value(Long) => integer bits selected then transformed to string (e.g. Java.lang.Long.MAX_VALUE.intValue() should be -1).
      3. Column(Integer), Value(String) => validate string is a number (perform #1 or #2 casts) or throw an exception.
      4. Column(Long), Value(Long) => value as string
      5. Column(Long), Value(Integer) => value as string
      6. Column(Long), Value(String) => validate string is a number (perform #4 or #5 casts) or throw an exception.
      
      I do see your point and this logic might be misplaced. Perhaps we can move this to a validation layer in due time.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            abec Abraham Elmahrek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: