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

GenericJdbcPartitioner.constructTextConditions(String, Object, Object, String, String, boolean, boolean) may occur java.lang.ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 1.99.6, 1.99.7
    • None
    • connectors/generic
    • None

    Description

      org.apache.sqoop.connector.jdbc.GenericJdbcPartitioner.constructTextConditions(String, Object, Object, String, String, boolean, boolean)
      this function has such cast:
      String lbString = prefix + bigDecimalToText((BigDecimal)lowerBound);
      String ubString = prefix + bigDecimalToText((BigDecimal)upperBound);

      and org.apache.sqoop.connector.jdbc.GenericJdbcPartitioner.partitionTextColumn() has this statement:
      constructTextConditions(prefix, 0, 0,
      partitionMinValue, partitionMaxValue, true, true)

      it will cause java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal

      Attachments

        1. SQOOP-3008.patch
          3 kB
          hu xiaodong

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xiaodong.hu hu xiaodong
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: