[chore] fix compile error when use clang as compiler and a be ut problem (#8554)
This commit is contained in:
@ -17,9 +17,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <parallel_hashmap/phmap.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "gutil/hash/string_hash.h"
|
||||
#include "olap/decimal12.h"
|
||||
#include "olap/uint24.h"
|
||||
@ -169,20 +170,20 @@ public:
|
||||
|
||||
// it's impossable to use ComplexType as key , so we don't have to implemnt them
|
||||
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
|
||||
char const*& begin) const {
|
||||
char const*& begin) const override {
|
||||
LOG(FATAL) << "serialize_value_into_arena not supported in ColumnDictionary";
|
||||
}
|
||||
|
||||
[[noreturn]] const char* deserialize_and_insert_from_arena(const char* pos) {
|
||||
[[noreturn]] const char* deserialize_and_insert_from_arena(const char* pos) override {
|
||||
LOG(FATAL) << "deserialize_and_insert_from_arena not supported in ColumnDictionary";
|
||||
}
|
||||
|
||||
[[noreturn]] int compare_at(size_t n, size_t m, const IColumn& rhs,
|
||||
int nan_direction_hint) const {
|
||||
int nan_direction_hint) const override {
|
||||
LOG(FATAL) << "compare_at not supported in ColumnDictionary";
|
||||
}
|
||||
|
||||
void get_extremes(Field& min, Field& max) const {
|
||||
void get_extremes(Field& min, Field& max) const override {
|
||||
LOG(FATAL) << "get_extremes not supported in ColumnDictionary";
|
||||
}
|
||||
|
||||
@ -321,13 +322,16 @@ public:
|
||||
}
|
||||
|
||||
if (lower) {
|
||||
return std::lower_bound(dict_data.begin(), dict_data.end(), value) - dict_data.begin() - eq;
|
||||
return std::lower_bound(dict_data.begin(), dict_data.end(), value) -
|
||||
dict_data.begin() - eq;
|
||||
} else {
|
||||
return std::upper_bound(dict_data.begin(), dict_data.end(), value) - dict_data.begin() + eq;
|
||||
return std::upper_bound(dict_data.begin(), dict_data.end(), value) -
|
||||
dict_data.begin() + eq;
|
||||
}
|
||||
}
|
||||
|
||||
inline phmap::flat_hash_set<T> find_codes(const phmap::flat_hash_set<StringValue>& values) const {
|
||||
inline phmap::flat_hash_set<T> find_codes(
|
||||
const phmap::flat_hash_set<StringValue>& values) const {
|
||||
phmap::flat_hash_set<T> code_set;
|
||||
for (const auto& value : values) {
|
||||
auto it = inverted_index.find(value);
|
||||
@ -383,4 +387,4 @@ private:
|
||||
Container codes;
|
||||
};
|
||||
|
||||
} // namespace doris::vectorized
|
||||
} // namespace doris::vectorized
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@ -118,12 +118,6 @@ TEST_F(TabletMgrTest, CreateTablet) {
|
||||
create_st = _tablet_mgr->create_tablet(create_tablet_req, data_dirs);
|
||||
ASSERT_TRUE(create_st == OLAP_SUCCESS);
|
||||
|
||||
// create tablet with different schema hash should be error
|
||||
tablet_schema.__set_schema_hash(4444);
|
||||
create_tablet_req.__set_tablet_schema(tablet_schema);
|
||||
create_st = _tablet_mgr->create_tablet(create_tablet_req, data_dirs);
|
||||
ASSERT_TRUE(create_st == OLAP_ERR_CE_TABLET_ID_EXIST);
|
||||
|
||||
OLAPStatus drop_st = _tablet_mgr->drop_tablet(111, 3333, false);
|
||||
ASSERT_TRUE(drop_st == OLAP_SUCCESS);
|
||||
tablet.reset();
|
||||
@ -213,7 +207,7 @@ TEST_F(TabletMgrTest, DropTablet) {
|
||||
ASSERT_TRUE(tablet != nullptr);
|
||||
|
||||
// drop unexist tablet will be success
|
||||
OLAPStatus drop_st = _tablet_mgr->drop_tablet(111, 4444, false);
|
||||
OLAPStatus drop_st = _tablet_mgr->drop_tablet(1121, 4444, false);
|
||||
ASSERT_TRUE(drop_st == OLAP_SUCCESS);
|
||||
tablet = _tablet_mgr->get_tablet(111, 3333);
|
||||
ASSERT_TRUE(tablet != nullptr);
|
||||
|
||||
Reference in New Issue
Block a user