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

Reselect post processor does not work with VariableScaleDecimal primary keys

XMLWordPrintable

      In situations where a table in Oracle defines its primary key as NUMBER (which is an alias for NUMBER(38,0), the connector stores the value in a VariableScaleDecimal struct and the re-select post processor is unable to decode that.

      [2025-07-28 16:53:37,078] DEBUG [oradbc7|task-0] Adding column MESSAGE7 for table MIGRPG.ALEX.T7 to re-select list due to unavailable value placeholder. (io.debezium.processors.reselect.ReselectColumnsPostProcessor:282)
      [2025-07-28 16:53:37,079] TRACE [oradbc7|task-0] Inserting prepared statement 'SELECT "MESSAGE7" FROM (SELECT * FROM "ALEX"."T7" AS OF SCN ?) WHERE ID7=?' removed from the cache (io.debezium.jdbc.JdbcConnection:1494)
      [2025-07-28 16:53:37,079] TRACE [oradbc7|task-0] PreparedStatement 'SELECT "MESSAGE7" FROM (SELECT * FROM "ALEX"."T7" AS OF SCN ?) WHERE ID7=?' with 600s timeout (io.debezium.jdbc.JdbcConnection:1498)
      [2025-07-28 16:53:37,080] WARN [oradbc7|task-0] Failed to re-select columns for table MIGRPG.ALEX.T7 and key [Struct{scale=0,value=[B@158ad6ab}] (io.debezium.processors.reselect.ReselectColumnsPostProcessor:236)
      java.sql.SQLException: Invalid column type
              at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8804)
              at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8286)
              at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:9061)
              at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:9036)
              at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:222)
              at io.debezium.jdbc.JdbcConnection.prepareQuery(JdbcConnection.java:811)
              at io.debezium.jdbc.JdbcConnection.reselectColumns(JdbcConnection.java:1724)
              at io.debezium.connector.oracle.OracleConnection.reselectColumns(OracleConnection.java:665)
              at io.debezium.processors.reselect.ReselectColumnsPostProcessor.apply(ReselectColumnsPostProcessor.java:223)
              at io.debezium.pipeline.EventDispatcher.doPostProcessing(EventDispatcher.java:785)
      

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: