Remove dependency on knowhere::scalar (#16458)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/16464/head
Cai Yudong 2022-04-12 09:49:33 +08:00 committed by GitHub
parent 120e791f38
commit 70bd6b6e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 8 deletions

View File

@ -16,7 +16,6 @@
#include "common/FieldMeta.h"
#include "common/Span.h"
#include "knowhere/index/structured_index_simple/StructuredIndexSort.h"
namespace milvus::query {

View File

@ -229,7 +229,6 @@ auto
ExecExprVisitor::ExecBinaryRangeVisitorDispatcher(BinaryRangeExpr& expr_raw) -> BitsetType {
auto& expr = static_cast<BinaryRangeExprImpl<T>&>(expr_raw);
using Index = scalar::ScalarIndex<T>;
using Operator = knowhere::scalar::OperatorType;
bool lower_inclusive = expr.lower_inclusive_;
bool upper_inclusive = expr.upper_inclusive_;
T val1 = expr.lower_value_;

View File

@ -22,7 +22,6 @@
#include "AckResponder.h"
#include "InsertRecord.h"
#include "common/Schema.h"
#include "knowhere/index/structured_index_simple/StructuredIndexSort.h"
#include "knowhere/index/vector_index/VecIndex.h"
#include "segcore/SegcoreConfig.h"

View File

@ -11,7 +11,7 @@
#include <gtest/gtest.h>
#include "test_utils/DataGen.h"
#include "knowhere/index/structured_index_simple/StructuredIndexSort.h"
#include "index/ScalarIndexSort.h"
TEST(Bitmap, Naive) {
using namespace milvus;
@ -22,10 +22,10 @@ TEST(Bitmap, Naive) {
int N = 10000;
auto raw_data = DataGen(schema, N);
auto vec = raw_data.get_col<float>(0);
auto sort_index = std::make_shared<knowhere::scalar::StructuredIndexSort<float>>();
auto sort_index = std::make_shared<scalar::ScalarIndexSort<float>>();
sort_index->Build(N, vec.data());
{
auto res = sort_index->Range(0, knowhere::scalar::OperatorType::LT);
auto res = sort_index->Range(0, scalar::OperatorType::LT);
double count = res->count();
ASSERT_NEAR(count / N, 0.5, 0.01);
}

View File

@ -30,7 +30,7 @@ TEST(Dummy, Aha) {
constexpr int64_t nb = 100;
namespace indexcgo = milvus::proto::indexcgo;
namespace schemapb = milvus::proto::schema;
using knowhere::scalar::OperatorType;
using milvus::scalar::OperatorType;
using milvus::indexbuilder::MapParams;
using milvus::indexbuilder::ScalarIndexCreatorPtr;
using ScalarTestParams = std::pair<MapParams, MapParams>;

View File

@ -41,7 +41,7 @@ int DEVICEID = 0;
namespace indexcgo = milvus::proto::indexcgo;
namespace schemapb = milvus::proto::schema;
using knowhere::scalar::OperatorType;
using milvus::scalar::OperatorType;
using milvus::indexbuilder::MapParams;
using milvus::indexbuilder::ScalarIndexCreator;
using ScalarTestParams = std::pair<MapParams, MapParams>;