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

Oracle connector parsing SELECT_LOB_LOCATOR event missing constant `unavailable.value.placeholder`

XMLWordPrintable

      Bug report

      The Table contains multiple LOB columns:

       

      CREATE TABLE "LOB_TABLE" 
         (    "A0" NUMBER, 
          "A1" VARCHAR2(200), 
          "A2" CLOB, 
          "A3" NCLOB, 
          "A4" BLOB, 
          "A5" VARCHAR2(100), 
           PRIMARY KEY ("A1")
         )  

       

       insert data  (The length of A2 A3 needs to be more than 4000): 

       

      {
          "payload": {
              "before": null,
              "after": {
                  "A0": {
                      "scale": 0,
                      "value": "AQ=="
                  },
                  "A1": "lwmzVQd6r7",
                  "A2": "Navicat Data ...",
                  "A3": "In the middle ...",
                  "A4": "...",
                  "A5": "cuTVQV0OpK"
              },
              "op": "c",
              "ts_ms": 1662350118235,
              "transaction": null
          }
      } 

       

      update column “A2” only 。  “A3” “A4” returns null:

       

      {
          "payload": {
              "before": {
                  "A0": {
                      "scale": 0,
                      "value": "AQ=="
                  },
                  "A1": "lwmzVQd6r7",
                  "A2": null,
                  "A3": null,
                  "A4": null,
                  "A5": "cuTVQV0OpK"
              },
              "after": {
                  "A0": {
                      "scale": 0,
                      "value": "AQ=="
                  },
                  "A1": "lwmzVQd6r7",
                  "A2": "1Navicat Data... ",
                  "A3": null,
                  "A4": null,
                  "A5": "cuTVQV0OpK"
              },
              "op": "u",
              "ts_ms": 1662350118240,
              "transaction": null
          }
      } 

      Implementation ideas (optional)

       

      I think the ${unavailable.value.placeholder} should be return.

      The reason is that io.debezium.connector.oracle.logminer.parser#reset does not initialize the value :

       

          private void reset(Table table) {
              columnName = null;
              schemaName = null;
              tableName = null;
              binary = false;
              columnValues = new Object[table.columns().size()];
              // Maybe populate OracleValueConverters.UNAVAILABLE_VALUE here  
              Arrays.fill(columnValues, OracleValueConverters.UNAVAILABLE_VALUE);   
          } 

       

              ccranfor@redhat.com Chris Cranford
              zhenglc1990@126.com lincheng zheng (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: