Skip to content

Commit

Permalink
Fix BulkWriter bug for Array type field
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <yihua.mo@zilliz.com>
  • Loading branch information
yhmo committed Feb 10, 2025
1 parent 768a2dd commit 7dfd5d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/bulk_import/example_bulkwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def local_writer_simple(schema: CollectionSchema, file_type: BulkFileType):
file_type=file_type,
) as local_writer:
# read data from csv
read_sample_data("./data/train_embeddings.csv", local_writer)
read_sample_data("./train_embeddings.csv", local_writer)

# append rows
for i in range(100000):
Expand Down Expand Up @@ -208,7 +208,7 @@ def remote_writer_simple(schema: CollectionSchema, file_type: BulkFileType):
file_type=file_type,
) as remote_writer:
# read data from csv
read_sample_data("./data/train_embeddings.csv", remote_writer)
read_sample_data("./train_embeddings.csv", remote_writer)

# append rows
for i in range(10000):
Expand Down
4 changes: 2 additions & 2 deletions pymilvus/bulk_writer/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
DataType.INT64.name: np.dtype("int64"),
DataType.FLOAT.name: np.dtype("float32"),
DataType.DOUBLE.name: np.dtype("float64"),
DataType.VARCHAR.name: None,
DataType.JSON.name: None,
DataType.VARCHAR.name: np.dtype("str"),
DataType.JSON.name: np.dtype("str"), # in numpy/parquet file, json object are stored as string
DataType.FLOAT_VECTOR.name: np.dtype("float32"),
DataType.BINARY_VECTOR.name: np.dtype("uint8"),
DataType.FLOAT16_VECTOR.name: np.dtype("uint8"),
Expand Down

0 comments on commit 7dfd5d4

Please sign in to comment.