未验证 提交 6c4d497d 编写于 作者: C Cai Yudong 提交者: GitHub

Fix mac build error (#16415)

Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
上级 e2eed6fd
......@@ -87,7 +87,9 @@ AppendIndex(CLoadIndexInfo c_load_index_info, CBinarySet c_binary_set) {
AssertInfo(find_index_type == true, "Can't find index type in index_params");
knowhere::IndexMode mode;
if (find_index_mode) {
mode = index_params["index_mode"] == "CPU" ? knowhere::IndexMode::MODE_CPU : knowhere::IndexMode::MODE_GPU;
std::string index_mode = index_params["index_mode"];
mode = (index_mode == "CPU" || index_mode == "cpu") ? knowhere::IndexMode::MODE_CPU
: knowhere::IndexMode::MODE_GPU;
} else {
mode = knowhere::IndexMode::MODE_CPU;
}
......
......@@ -259,8 +259,8 @@ TEST(CApiTest, DeleteTest) {
auto collection = NewCollection(get_default_schema_config());
auto segment = NewSegment(collection, Growing, -1);
long delete_row_ids[] = {100000, 100001, 100002};
unsigned long delete_timestamps[] = {0, 0, 0};
int64_t delete_row_ids[] = {100000, 100001, 100002};
uint64_t delete_timestamps[] = {0, 0, 0};
auto offset = PreDelete(segment, 3);
......@@ -635,8 +635,8 @@ TEST(CApiTest, GetDeletedCountTest) {
auto collection = NewCollection(get_default_schema_config());
auto segment = NewSegment(collection, Growing, -1);
long delete_row_ids[] = {100000, 100001, 100002};
unsigned long delete_timestamps[] = {0, 0, 0};
int64_t delete_row_ids[] = {100000, 100001, 100002};
uint64_t delete_timestamps[] = {0, 0, 0};
auto offset = PreDelete(segment, 3);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册