Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-10223

DBSource does not handle all data types correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.5.0
    • Component/s: Pipelines
    • Labels:
    • Release Notes:
      Hide
      DBSource now casts TINYINT and SMALLINT to INT type
      Show
      DBSource now casts TINYINT and SMALLINT to INT type
    • Rank:
      1|hzzeef:

      Description

      If a field in a record read from a source contains a type that is not supported, such as a short, then Hydrator fails with a cast exception. Instead, it should promote the short to an int and read the record. Looks like we do the type promotion for schema already, since the schema uses int when the source field type is short.

      We saw an issue where the JDBC driver for SQL Server would convert SMALLINT to short, and Hydrator would fail to read the record. It confuses users since the Hydrator schema for the same source says the field is int, but the error message says cannot cast short to int.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yue Yue Gao
                Reporter:
                poorna Poorna Chandra
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: