提交 adc6dc38 编写于 作者: J JinHai-CN

Fix compiling error

Signed-off-by: NJinHai-CN <hai.jin@zilliz.com>
上级 23896782
......@@ -11,6 +11,4 @@ We use GitHub for tracking bugs and feature requests. If you need any support fo
[Slack](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk): The #general channel is the place where people offer support.
## Other
[Bootcamp](https://github.com/milvus-io/bootcamp): It provides more scenario-based applications and demos of Milvus.
......@@ -3,9 +3,6 @@ coverage:
notify:
require_ci_to_pass: yes
precision: 2
round: down
range: "70...100"
......
......@@ -17,45 +17,6 @@ namespace milvus {
namespace server {
namespace web {
Status
CopyRowRecords(const OList<OList<OFloat32>::ObjectWrapper>::ObjectWrapper& records, std::vector<float>& vectors) {
size_t tal_size = 0;
records->forEach([&tal_size](const OList<OFloat32>::ObjectWrapper& row_item) { tal_size += row_item->count(); });
vectors.resize(tal_size);
size_t index_offset = 0;
records->forEach([&vectors, &index_offset](const OList<OFloat32>::ObjectWrapper& row_item) {
row_item->forEach(
[&vectors, &index_offset](const OFloat32& item) { vectors[index_offset++] = item->getValue(); });
});
return Status::OK();
}
Status
CopyBinRowRecords(const OList<OList<OInt64>::ObjectWrapper>::ObjectWrapper& records, std::vector<uint8_t>& vectors) {
size_t tal_size = 0;
records->forEach([&tal_size](const OList<OInt64>::ObjectWrapper& item) { tal_size += item->count(); });
vectors.resize(tal_size);
size_t index_offset = 0;
bool oor = false;
records->forEach([&vectors, &index_offset, &oor](const OList<OInt64>::ObjectWrapper& row_item) {
row_item->forEach([&vectors, &index_offset, &oor](const OInt64& item) {
if (!oor) {
int64_t value = item->getValue();
if (0 > value || value > 255) {
oor = true;
} else {
vectors[index_offset++] = static_cast<uint8_t>(value);
}
}
});
});
return Status::OK();
}
Status
ParseQueryInteger(const OQueryParams& query_params, const std::string& key, int64_t& value, bool nullable) {
auto query = query_params.get(key.c_str());
......
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License.
#pragma once
#include <string>
#include <vector>
#include "db/Types.h"
#include "server/web_impl/Types.h"
#include "utils/Status.h"
namespace milvus {
namespace server {
namespace web {
Status
ParseQueryInteger(const OQueryParams& query_params, const std::string& key, int64_t& value, bool nullable = true);
Status
ParseQueryStr(const OQueryParams& query_params, const std::string& key, std::string& value, bool nullable = true);
Status
ParseQueryBool(const OQueryParams& query_params, const std::string& key, bool& value, bool nullable = true);
} // namespace web
} // namespace server
} // namespace milvus
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册