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

Sqoop2: SqoopIDFUtils handling of decimal need to be fixed

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.99.5
    • None
    • None

    Description

      we need to handle scale and precision and make sure we instantiate the bigDecimal correctly

      We also need to make scale and precision mandatory to avoid confusion for connectors while they map their types

      public class Decimal extends AbstractNumber {
      
        /**
         * Number of valid numbers.
         */
        private Long precision;
      
        /**
         * Number of decimal places.
         */
        private Long scale;
      
      

      IDF java handling today is very lame!

        public static Object toDecimal(String csvString, Column column) {
          return new BigDecimal(csvString);
        }
      

      3. there is no single unit test today with the values for precision and scale, so we need to define what those values are for Long

      Attachments

        1. SQOOP-2027-v1.patch
          18 kB
          Veena Basavaraj
        2. SQOOP-2027.patch
          18 kB
          Veena Basavaraj

        Issue Links

          Activity

            People

              vybs Veena Basavaraj
              vybs Veena Basavaraj
              Votes:
              0 Vote for this issue
              Watchers:
              6 Stop watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment