mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
1. Add function storage in rootcoord 2. Parse udf expression 3. Execute wasm in core Signed-off-by: Ziyu Wang <15871035978@163.com> Signed-off-by: Ziyu Wang <15871035978@163.com>
26 lines
604 B
Go
26 lines
604 B
Go
package rootcoord
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/milvus-io/milvus/api/commonpb"
|
|
|
|
"github.com/milvus-io/milvus/api/milvuspb"
|
|
)
|
|
|
|
type createFunctionTask struct {
|
|
baseTask
|
|
Req *milvuspb.CreateFunctionRequest
|
|
}
|
|
|
|
func (t *createFunctionTask) Prepare(ctx context.Context) error {
|
|
if err := CheckMsgType(t.Req.GetBase().GetMsgType(), commonpb.MsgType_CreateFunction); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (t *createFunctionTask) Execute(ctx context.Context) error {
|
|
return t.core.meta.CreateFunction(ctx, t.Req.GetFunctionName(), t.Req.GetWatBodyBase64(), t.Req.GetArgTypes(), t.GetTs())
|
|
}
|