-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement custom function module in milvus expr #36560
feat: Implement custom function module in milvus expr #36560
Conversation
@jiangyinzuo go-sdk check failed, comment |
@jiangyinzuo E2e jenkins job failed, comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some todos
throw std::runtime_error("FilterScalarFunction " + func_sig.toString() + | ||
" not found. " + this->expr_->ToString()); | ||
} | ||
// eval inputs in function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evaluate the input arguments here, not in function
expression::FilterFunctionRegisterKey func_sig{ | ||
this->expr_->fun_name(), std::move(func_param_type_list)}; | ||
auto& factory = expression::FunctionFactory::Instance(); | ||
auto function = factory.GetFilterFunction(func_sig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call factory.GetFilterFunction
at logical expr or parser
@jiangyinzuo E2e jenkins job failed, comment |
@jiangyinzuo go-sdk check failed, comment |
a9369b8
to
3e564b6
Compare
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
@jiangyinzuo go-sdk check failed, comment |
3e564b6
to
82234e1
Compare
@jiangyinzuo go-sdk check failed, comment |
0ab6321
to
b651d73
Compare
@jiangyinzuo Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco. |
@jiangyinzuo cpp-unit-test check failed, comment |
03c6250
to
a18455d
Compare
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
@jiangyinzuo cpp-unit-test check failed, comment |
@jiangyinzuo E2e jenkins job failed, comment |
a18455d
to
fd3394d
Compare
@jiangyinzuo cpp-unit-test check failed, comment |
rerun cpp-unit-test |
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
fd3394d
to
0e70f2b
Compare
rerun cpp-unit-test |
@jiangyinzuo cpp-unit-test check failed, comment |
rerun cpp-unit-test |
1 similar comment
rerun cpp-unit-test |
7f1ced8
to
8382c28
Compare
OSPP 2024 project: https://summer-ospp.ac.cn/org/prodetail/247410235?list=org&navpage=org Solutions: - parser (planparserv2) - add CallExpr in planparserv2/Plan.g4 - update parser_visitor and show_visitor - grpc protobuf - add CallExpr in plan.proto - execution (`core/src/exec`) - add `CallExpr`, `ValueExpr` and `ColumnExpr` (both logical and physical) for function call and function parameters - function factory (`core/src/exec/expression/function`) - create a global hashmap when starting milvus (see server.go) - the global hashmap stores function signatures and their function pointers, the CallExpr in execution engine can get the function pointer by function signature. - `common/Vector.h` - add ConstantVector, update ColumnVector - `segcore/SegmentChunkReader.h` - extracted some methods from `CompareExpr.h` - custom functions - empty(string) - starts_with(string, string) - add cpp/go unittests and E2E tests closes: milvus-io#36559 Signed-off-by: Yinzuo Jiang <[email protected]>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: czs007, jiangyinzuo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Document about how to add a new filtering function. PR milvus-io#36560 has implemented the custom filtering function module. Signed-off-by: Yinzuo Jiang <[email protected]> Signed-off-by: Yinzuo Jiang <[email protected]>
OSPP 2024 project: https://summer-ospp.ac.cn/org/prodetail/247410235?list=org&navpage=org
Solutions:
core/src/exec
)CallExpr
ValueExpr
andColumnExpr
(both logical and physical) for function call and function parameterscore/src/exec/expression/function
)closes: #36559