Skip to content

Commit 8af350d

Browse files
authored
fix: [2.5] bulk insert should use function runner's input field list instead schema's (#41561)
relate: #41213 pr: #41560 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
1 parent 41d9104 commit 8af350d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/datanode/importv2/util.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,10 @@ func RunEmbeddingFunction(task *ImportTask, data *storage.InsertData) error {
214214
if err != nil {
215215
return err
216216
}
217-
inputDatas := make([]any, 0, len(fn.InputFieldIds))
218-
for _, inputFieldID := range fn.InputFieldIds {
217+
218+
inputFieldIDs := lo.Map(runner.GetInputFields(), func(field *schemapb.FieldSchema, _ int) int64 { return field.GetFieldID() })
219+
inputDatas := make([]any, 0, len(inputFieldIDs))
220+
for _, inputFieldID := range inputFieldIDs {
219221
inputDatas = append(inputDatas, data.Data[inputFieldID].GetDataRows())
220222
}
221223
outputFieldData, err := runner.BatchRun(inputDatas...)

0 commit comments

Comments
 (0)