Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-3512

DatabaseMetaData.getColumns() ignores user defined data types which causes null pointer exception.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • 1.4.0.Final
    • sqlserver-connector
    • None
    • False
    • False
    • Undefined

    Description

      The SQL table has column which is has user defined data type. But Debezium reads the columns from the table, it ignores the the UDT column and this column is included in the Capture instance, Debezium throws null pointer exception.

      File Name: SQlServerConnection.java.

      method: 

      public Table getTableSchemaFromTable(SqlServerChangeTable changeTable) throws SQLException

       

      try (ResultSet rs = metadata.getColumns(
      realDatabaseName,
      changeTable.getSourceTableId().schema(),
      changeTable.getSourceTableId().table(),
      null)) {
      while (rs.next()) {
      readTableColumn(rs, changeTable.getSourceTableId(), null).ifPresent(ce -> {
      // Filter out columns not included in the change table.
      if (changeTable.getCapturedColumns().contains(ce.name()))

      { columns.add(ce.create()); }

      });
      }

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            pakkiyarasu Pakkiyarasu P (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: