From 8b6bae9aac9686d05c9e6c0183cbed6f8a395087 Mon Sep 17 00:00:00 2001 From: Arnaud Adant Date: Mon, 16 Oct 2023 22:13:36 -0500 Subject: [PATCH] is_deleted and _sign are exclusive --- .../db_load/mysql_parser/CreateTableMySQLParserListener.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sink-connector/python/db_load/mysql_parser/CreateTableMySQLParserListener.py b/sink-connector/python/db_load/mysql_parser/CreateTableMySQLParserListener.py index 1e4ea5c..332f5af 100644 --- a/sink-connector/python/db_load/mysql_parser/CreateTableMySQLParserListener.py +++ b/sink-connector/python/db_load/mysql_parser/CreateTableMySQLParserListener.py @@ -127,10 +127,12 @@ class CreateTableMySQLParserListener(MySqlParserListener): def exitColumnCreateTable(self, ctx): tableName = self.extract_original_text(ctx.tableName()) self.buffer = f"CREATE TABLE {tableName} (" - self.columns.append("`_sign` Int8 DEFAULT 1") self.columns.append("`_version` UInt64 DEFAULT 0") + # is_deleted and _sign are redundant, so exclusive in the schema if self.rmt_delete_support: self.columns.append("`is_deleted` UInt8 DEFAULT 0") + else: + self.columns.append("`_sign` Int8 DEFAULT 1") for column in self.columns: self.buffer += column