[hotfix][tidb] Fix RowKind.INSERT judgement condition (#1104)

Co-authored-by: rinka <gzlinjia@corp.netease.com>
pull/1110/head
Rinka 3 years ago committed by GitHub
parent 463c53aea0
commit dbd87b9a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,7 +81,7 @@ public class RowDataTiKVChangeEventDeserializationSchema
row.getValue().toByteArray(), row.getValue().toByteArray(),
RowKey.decode(row.getKey().toByteArray()).getHandle(), RowKey.decode(row.getKey().toByteArray()).getHandle(),
tableInfo); tableInfo);
if (row.getOldValue() == null) { if (row.getOldValue() == null || row.getOldValue().isEmpty()) {
RowData rowDataUpdateBefore = RowData rowDataUpdateBefore =
(RowData) physicalConverter.convert(tikvValues, tableInfo, null); (RowData) physicalConverter.convert(tikvValues, tableInfo, null);
rowDataUpdateBefore.setRowKind(RowKind.INSERT); rowDataUpdateBefore.setRowKind(RowKind.INSERT);

Loading…
Cancel
Save