This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 312c03a9ddd [pick](upgrade) fix array map type check log message
#38254 (#38704)
312c03a9ddd is described below
commit 312c03a9ddd702417005418fe8809bfd56ba0548
Author: amory <[email protected]>
AuthorDate: Thu Aug 1 23:23:29 2024 +0800
[pick](upgrade) fix array map type check log message #38254 (#38704)
---
be/src/olap/tablet_schema.cpp | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/be/src/olap/tablet_schema.cpp b/be/src/olap/tablet_schema.cpp
index 82c52195cff..fb105f03dbd 100644
--- a/be/src/olap/tablet_schema.cpp
+++ b/be/src/olap/tablet_schema.cpp
@@ -438,11 +438,18 @@ void TabletColumn::init_from_pb(const ColumnPB& column) {
_visible = column.visible();
}
if (_type == FieldType::OLAP_FIELD_TYPE_ARRAY) {
- CHECK(column.children_columns_size() == 1) << "ARRAY type has more
than 1 children types.";
+ CHECK(column.children_columns_size() == 1)
+ << "ARRAY type should has 1 children types, but got "
+ << column.children_columns_size();
}
if (_type == FieldType::OLAP_FIELD_TYPE_MAP) {
- DCHECK(column.children_columns_size() == 2) << "MAP type has more than
2 children types.";
- LOG(WARNING) << "MAP type has more than 2 children types.";
+ DCHECK(column.children_columns_size() == 2)
+ << "MAP type should has 2 children types, but got "
+ << column.children_columns_size();
+ if (UNLIKELY(column.children_columns_size() != 2)) {
+ LOG(WARNING) << "MAP type should has 2 children types, but got "
+ << column.children_columns_size();
+ }
}
for (size_t i = 0; i < column.children_columns_size(); i++) {
TabletColumn child_column;
@@ -479,11 +486,15 @@ void TabletColumn::to_schema_pb(ColumnPB* column) const {
column->set_visible(_visible);
if (_type == FieldType::OLAP_FIELD_TYPE_ARRAY) {
- CHECK(_sub_columns.size() == 1) << "ARRAY type has more than 1
children types.";
+ CHECK(_sub_columns.size() == 1)
+ << "ARRAY type should has 1 children types, but got " <<
_sub_columns.size();
}
if (_type == FieldType::OLAP_FIELD_TYPE_MAP) {
- DCHECK(_sub_columns.size() == 2) << "MAP type has more than 2 children
types.";
- LOG(WARNING) << "MAP type has more than 2 children types.";
+ DCHECK(_sub_columns.size() == 2)
+ << "MAP type should has 2 children types, but got " <<
_sub_columns.size();
+ if (UNLIKELY(_sub_columns.size() != 2)) {
+ LOG(WARNING) << "MAP type should has 2 children types, but got "
<< _sub_columns.size();
+ }
}
for (size_t i = 0; i < _sub_columns.size(); i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]