Skip to content

Commit

Permalink
fix: Fix import array via bulkwriter
Browse files Browse the repository at this point in the history
Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper committed Apr 12, 2024
1 parent 7d75517 commit 70d3576
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pymilvus/bulk_writer/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ def _persist_parquet(self, local_path: str, **kwargs):
for val in self._buffer[k]:
arr.append(np.array(val, dtype=np.dtype("uint8")))
data[k] = pd.Series(arr)
elif field_schema.dtype == DataType.ARRAY:
dt = NUMPY_TYPE_CREATOR[field_schema.element_type.name]
arr = []
for val in self._buffer[k]:
arr.append(np.array(val, dtype=dt))
data[k] = pd.Series(arr)
elif field_schema.dtype.name in NUMPY_TYPE_CREATOR:
dt = NUMPY_TYPE_CREATOR[field_schema.dtype.name]
data[k] = pd.Series(self._buffer[k], dtype=dt)
Expand Down

0 comments on commit 70d3576

Please sign in to comment.