From 33acd53b8d4da20ade37b22e73ccc4fd8f583a54 Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Mon, 13 Jun 2022 18:39:34 +0800 Subject: [PATCH 1/4] remove the log --- dbms/src/TiDB/Schema/SchemaBuilder.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dbms/src/TiDB/Schema/SchemaBuilder.cpp b/dbms/src/TiDB/Schema/SchemaBuilder.cpp index 99e540e6c95..e2d90ab3290 100644 --- a/dbms/src/TiDB/Schema/SchemaBuilder.cpp +++ b/dbms/src/TiDB/Schema/SchemaBuilder.cpp @@ -969,7 +969,6 @@ parseColumnsFromTableInfo(const TiDB::TableInfo & table_info, Poco::Logger * log std::vector primary_keys; for (const auto & column : table_info.columns) { - LOG_FMT_DEBUG(log, "Analyzing column: {}, type: {}", column.name, static_cast(column.tp)); DataTypePtr type = getDataTypeByColumnInfo(column); columns.emplace_back(column.name, type); if (column.hasPriKeyFlag()) @@ -1158,7 +1157,7 @@ void SchemaBuilder::applyDropPhysicalTable(const String & db } auto alter_lock = storage->lockForAlter(getThreadName()); storage->alterFromTiDB(alter_lock, commands, db_name, storage->getTableInfo(), name_mapper, context); - LOG_FMT_INFO(log, "Tombstoned table {}.{}", db_name, name_mapper.debugTableName(storage->getTableInfo())); + LOG_FMT_INFO(log, "Tombstoned t able {}.{}", db_name, name_mapper.debugTableName(storage->getTableInfo())); } template From ebe8776080b4bd2b9eb3b53e0c544572cf297771 Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Mon, 13 Jun 2022 19:27:19 +0800 Subject: [PATCH 2/4] fix typo --- dbms/src/TiDB/Schema/SchemaBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/TiDB/Schema/SchemaBuilder.cpp b/dbms/src/TiDB/Schema/SchemaBuilder.cpp index e2d90ab3290..81247088c3c 100644 --- a/dbms/src/TiDB/Schema/SchemaBuilder.cpp +++ b/dbms/src/TiDB/Schema/SchemaBuilder.cpp @@ -1157,7 +1157,7 @@ void SchemaBuilder::applyDropPhysicalTable(const String & db } auto alter_lock = storage->lockForAlter(getThreadName()); storage->alterFromTiDB(alter_lock, commands, db_name, storage->getTableInfo(), name_mapper, context); - LOG_FMT_INFO(log, "Tombstoned t able {}.{}", db_name, name_mapper.debugTableName(storage->getTableInfo())); + LOG_FMT_INFO(log, "Tombstoned table {}.{}", db_name, name_mapper.debugTableName(storage->getTableInfo())); } template From 7e4114c29f6fd1c68646815b713e67836083d48f Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Mon, 13 Jun 2022 19:47:30 +0800 Subject: [PATCH 3/4] fix function --- dbms/src/TiDB/Schema/SchemaBuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/TiDB/Schema/SchemaBuilder.cpp b/dbms/src/TiDB/Schema/SchemaBuilder.cpp index 81247088c3c..f532ac231e2 100644 --- a/dbms/src/TiDB/Schema/SchemaBuilder.cpp +++ b/dbms/src/TiDB/Schema/SchemaBuilder.cpp @@ -963,7 +963,7 @@ void SchemaBuilder::applyDropSchema(const String & db_name) } std::tuple -parseColumnsFromTableInfo(const TiDB::TableInfo & table_info, Poco::Logger * log) +parseColumnsFromTableInfo(const TiDB::TableInfo & table_info) { NamesAndTypes columns; std::vector primary_keys; @@ -998,7 +998,7 @@ String createTableStmt( Poco::Logger * log) { LOG_FMT_DEBUG(log, "Analyzing table info : {}", table_info.serialize()); - auto [columns, pks] = parseColumnsFromTableInfo(table_info, log); + auto [columns, pks] = parseColumnsFromTableInfo(table_info); String stmt; WriteBufferFromString stmt_buf(stmt); From c3b2237973202f625457d75a796d0a77d9472166 Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Mon, 13 Jun 2022 20:35:48 +0800 Subject: [PATCH 4/4] fix function --- dbms/src/Storages/tests/gtest_filter_parser.cpp | 2 +- dbms/src/TiDB/Schema/SchemaBuilder-internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/tests/gtest_filter_parser.cpp b/dbms/src/Storages/tests/gtest_filter_parser.cpp index 8820c05d2da..3a554fcf4b6 100644 --- a/dbms/src/Storages/tests/gtest_filter_parser.cpp +++ b/dbms/src/Storages/tests/gtest_filter_parser.cpp @@ -98,7 +98,7 @@ DM::RSOperatorPtr FilterParserTest::generateRsOperator(const String table_info_j DM::ColumnDefines columns_to_read; { NamesAndTypes source_columns; - std::tie(source_columns, std::ignore) = parseColumnsFromTableInfo(table_info, log->getLog()); + std::tie(source_columns, std::ignore) = parseColumnsFromTableInfo(table_info); dag_query = std::make_unique( conditions, DAGPreparedSets(), diff --git a/dbms/src/TiDB/Schema/SchemaBuilder-internal.h b/dbms/src/TiDB/Schema/SchemaBuilder-internal.h index a331205ce8c..94edcbea204 100644 --- a/dbms/src/TiDB/Schema/SchemaBuilder-internal.h +++ b/dbms/src/TiDB/Schema/SchemaBuilder-internal.h @@ -35,7 +35,7 @@ struct TableInfo; } namespace DB { -std::tuple parseColumnsFromTableInfo(const TiDB::TableInfo & table_info, Poco::Logger * log); +std::tuple parseColumnsFromTableInfo(const TiDB::TableInfo & table_info); constexpr char tmpNamePrefix[] = "_tiflash_tmp_";