Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <jiangruiyi@gmail.com>
  • Loading branch information
shanghaikid committed Dec 26, 2024
1 parent 135bc75 commit 2dbc2fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions milvus/grpc/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,13 @@ export class Data extends Collection {
}

// Tip: The field data sequence needs to be set same as `collectionInfo.schema.fields`.
// If primarykey is set `autoid = true`, you don't need to insert the primary key field,
// and if function field is set, you need to ignore the field value in the data.
const functionOutputFields: string[] = [];
const fieldMap = new Map<string, _Field>(
collectionInfo.schema.fields.reduce((acc, v) => {
// if autoID is true, ignore the primary key field or if upsert is true
const insertable = !v.autoID || upsert;

// if function field is set, you need to ignore the field value in the data.
if (v.is_function_output) {
functionOutputFields.push(v.name); // ignore function field
} else if (insertable) {
Expand Down

0 comments on commit 2dbc2fb

Please sign in to comment.