Skip to content

Commit

Permalink
[chore](binlog) Save table type in CreateTableRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter committed Nov 28, 2024
1 parent d77bfa0 commit 8a0188f
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 8a0188f

Please sign in to comment.