mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: bulk insert should use function runner's input field list instead schema's (#41560)
relate: https://github.com/milvus-io/milvus/issues/41213 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
parent
476984c53e
commit
9166c77a72
@ -228,13 +228,17 @@ func RunBm25Function(task *ImportTask, data *storage.InsertData) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if runner == nil {
|
if runner == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
inputDatas := make([]any, 0, len(fn.InputFieldIds))
|
|
||||||
for _, inputFieldID := range fn.InputFieldIds {
|
inputFieldIDs := lo.Map(runner.GetInputFields(), func(field *schemapb.FieldSchema, _ int) int64 { return field.GetFieldID() })
|
||||||
|
inputDatas := make([]any, 0, len(inputFieldIDs))
|
||||||
|
for _, inputFieldID := range inputFieldIDs {
|
||||||
inputDatas = append(inputDatas, data.Data[inputFieldID].GetDataRows())
|
inputDatas = append(inputDatas, data.Data[inputFieldID].GetDataRows())
|
||||||
}
|
}
|
||||||
|
|
||||||
outputFieldData, err := runner.BatchRun(inputDatas...)
|
outputFieldData, err := runner.BatchRun(inputDatas...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user