This is an automated email from the ASF dual-hosted git repository. airborne pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 0c58f2d1b0a branch-3.0: [debug] Add more logs when encounter `unknown index column` #43846 (#46476) 0c58f2d1b0a is described below commit 0c58f2d1b0a285364545cd539437eb222b201a05 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Wed Jan 8 16:57:19 2025 +0800 branch-3.0: [debug] Add more logs when encounter `unknown index column` #43846 (#46476) Cherry-picked from #43846 Co-authored-by: bobhan1 <bao...@selectdb.com> --- be/src/exec/tablet_info.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/be/src/exec/tablet_info.cpp b/be/src/exec/tablet_info.cpp index 497a7779427..87c0a824951 100644 --- a/be/src/exec/tablet_info.cpp +++ b/be/src/exec/tablet_info.cpp @@ -17,6 +17,7 @@ #include "exec/tablet_info.h" +#include <butil/logging.h> #include <gen_cpp/Descriptors_types.h> #include <gen_cpp/Exprs_types.h> #include <gen_cpp/Partitions_types.h> @@ -167,6 +168,17 @@ Status OlapTableSchemaParam::init(const POlapTableSchemaParam& pschema) { auto it = slots_map.find(to_lower(pcolumn_desc.name()) + "+" + data_type_str + is_null_str); if (it == std::end(slots_map)) { + std::string keys {}; + for (const auto& [key, _] : slots_map) { + keys += fmt::format("{},", key); + } + LOG_EVERY_SECOND(WARNING) << fmt::format( + "[OlapTableSchemaParam::init(const POlapTableSchemaParam& pschema)]: " + "unknown index column, column={}, type={}, data_type_str={}, " + "is_null_str={}, slots_map.keys()=[{}], {}\npschema={}", + pcolumn_desc.name(), pcolumn_desc.type(), data_type_str, is_null_str, + keys, debug_string(), pschema.ShortDebugString()); + return Status::InternalError("unknown index column, column={}, type={}", pcolumn_desc.name(), pcolumn_desc.type()); } @@ -237,6 +249,18 @@ Status OlapTableSchemaParam::init(const TOlapTableSchemaParam& tschema) { auto it = slots_map.find(to_lower(tcolumn_desc.column_name) + "+" + data_type_str + is_null_str); if (it == slots_map.end()) { + std::stringstream ss; + ss << tschema; + std::string keys {}; + for (const auto& [key, _] : slots_map) { + keys += fmt::format("{},", key); + } + LOG_EVERY_SECOND(WARNING) << fmt::format( + "[OlapTableSchemaParam::init(const TOlapTableSchemaParam& tschema)]: " + "unknown index column, column={}, type={}, data_type_str={}, " + "is_null_str={}, slots_map.keys()=[{}], {}\ntschema={}", + tcolumn_desc.column_name, tcolumn_desc.column_type.type, data_type_str, + is_null_str, keys, debug_string(), ss.str()); return Status::InternalError("unknown index column, column={}, type={}", tcolumn_desc.column_name, tcolumn_desc.column_type.type); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org