diff --git a/be/src/olap/schema_change.cpp b/be/src/olap/schema_change.cpp index 599d9c1d1423ca..4b0153564276ca 100644 --- a/be/src/olap/schema_change.cpp +++ b/be/src/olap/schema_change.cpp @@ -1317,8 +1317,8 @@ Status SchemaChangeJob::parse_request(const SchemaChangeParams& sc_params, } // if new tablet enable row store, or new tablet has different row store columns - if ((!base_tablet_schema->have_column(BeConsts::ROW_STORE_COL) && - new_tablet_schema->have_column(BeConsts::ROW_STORE_COL)) || + if ((!base_tablet_schema->exist_column(BeConsts::ROW_STORE_COL) && + new_tablet_schema->exist_column(BeConsts::ROW_STORE_COL)) || !std::equal(new_tablet_schema->row_columns_uids().begin(), new_tablet_schema->row_columns_uids().end(), base_tablet_schema->row_columns_uids().begin(), diff --git a/be/src/olap/tablet_schema.cpp b/be/src/olap/tablet_schema.cpp index b3dde488674bea..78854a1534e2d8 100644 --- a/be/src/olap/tablet_schema.cpp +++ b/be/src/olap/tablet_schema.cpp @@ -1289,6 +1289,10 @@ void TabletSchema::update_indexes_from_thrift(const std::vector( diff --git a/be/src/olap/tablet_schema.h b/be/src/olap/tablet_schema.h index 8cf6e20208c90f..290f62743f73a4 100644 --- a/be/src/olap/tablet_schema.h +++ b/be/src/olap/tablet_schema.h @@ -318,6 +318,7 @@ class TabletSchema { const TabletColumn& column(size_t ordinal) const; Result column(const std::string& field_name) const; Status have_column(const std::string& field_name) const; + bool exist_column(const std::string& field_name) const; const TabletColumn& column_by_uid(int32_t col_unique_id) const; TabletColumn& mutable_column_by_uid(int32_t col_unique_id); TabletColumn& mutable_column(size_t ordinal);