mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 10:15:43 +00:00
enhance: removed unused VectorFunction (#44178)
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "common/Types.h"
|
||||
#include "exec/expression/EvalCtx.h"
|
||||
#include "exec/expression/VectorFunction.h"
|
||||
#include "exec/expression/Utils.h"
|
||||
#include "exec/QueryContext.h"
|
||||
#include "expr/ITypeExpr.h"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "common/Json.h"
|
||||
#include "common/Types.h"
|
||||
#include "exec/expression/EvalCtx.h"
|
||||
#include "exec/expression/VectorFunction.h"
|
||||
#include "exec/expression/Utils.h"
|
||||
#include "exec/QueryContext.h"
|
||||
#include "expr/ITypeExpr.h"
|
||||
@@ -62,21 +61,9 @@ class Expr {
|
||||
Expr(DataType type,
|
||||
const std::vector<std::shared_ptr<Expr>>&& inputs,
|
||||
const std::string& name)
|
||||
: type_(type),
|
||||
inputs_(std::move(inputs)),
|
||||
name_(name),
|
||||
vector_func_(nullptr) {
|
||||
: type_(type), inputs_(std::move(inputs)), name_(name) {
|
||||
}
|
||||
|
||||
Expr(DataType type,
|
||||
const std::vector<std::shared_ptr<Expr>>&& inputs,
|
||||
std::shared_ptr<VectorFunction> vec_func,
|
||||
const std::string& name)
|
||||
: type_(type),
|
||||
inputs_(std::move(inputs)),
|
||||
name_(name),
|
||||
vector_func_(vec_func) {
|
||||
}
|
||||
virtual ~Expr() = default;
|
||||
|
||||
const DataType&
|
||||
@@ -133,8 +120,6 @@ class Expr {
|
||||
DataType type_;
|
||||
std::vector<std::shared_ptr<Expr>> inputs_;
|
||||
std::string name_;
|
||||
// NOTE: unused
|
||||
std::shared_ptr<VectorFunction> vector_func_;
|
||||
|
||||
// whether we have offset input and do expr filtering on these data
|
||||
// default is false which means we will do expr filtering on the total segment data
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
// Licensed to the LF AI & Data foundation under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you 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 <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "common/Vector.h"
|
||||
#include "exec/QueryContext.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace exec {
|
||||
|
||||
class VectorFunction {
|
||||
public:
|
||||
virtual ~VectorFunction() = default;
|
||||
|
||||
virtual void
|
||||
Apply(std::vector<VectorPtr>& args,
|
||||
DataType output_type,
|
||||
EvalCtx& context,
|
||||
VectorPtr& result) const = 0;
|
||||
};
|
||||
|
||||
std::shared_ptr<VectorFunction>
|
||||
GetVectorFunction(const std::string& name,
|
||||
const std::vector<DataType>& input_types,
|
||||
const QueryConfig& config);
|
||||
|
||||
} // namespace exec
|
||||
} // namespace milvus
|
||||
Reference in New Issue
Block a user