Skip to content

Commit

Permalink
branch-2.1: [chore](binlog) Save table type in CreateTableRecord #44735
Browse files Browse the repository at this point in the history
… (#44836)

Cherry-picked from #44735

Co-authored-by: walter <[email protected]>
  • Loading branch information
github-actions[bot] and w41ter authored Dec 3, 2024
1 parent 0b681d3 commit 4b7f5f8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.apache.doris.catalog.Database;
import org.apache.doris.catalog.Env;
import org.apache.doris.catalog.Table;
import org.apache.doris.catalog.TableIf.TableType;
import org.apache.doris.persist.CreateTableInfo;
import org.apache.doris.persist.gson.GsonUtils;

Expand All @@ -43,6 +44,8 @@ public class CreateTableRecord {
private long tableId;
@SerializedName(value = "tableName")
private String tableName;
@SerializedName(value = "tableType")
protected TableType type;
@SerializedName(value = "sql")
private String sql;

Expand All @@ -56,6 +59,8 @@ public CreateTableRecord(long commitSeq, CreateTableInfo info) {
String dbName = info.getDbName();
this.dbName = dbName;

this.type = table.getType();

Database db = Env.getCurrentInternalCatalog().getDbNullable(dbName);
if (db == null) {
LOG.warn("db not found. dbId: {}", dbId);
Expand Down

0 comments on commit 4b7f5f8

Please sign in to comment.