Skip to content

Commit

Permalink
Fix failed to calculate the length of JSON data (#1433)
Browse files Browse the repository at this point in the history
Signed-off-by: yah01 <yang.cen@zilliz.com>
  • Loading branch information
yah01 authored May 16, 2023
1 parent 7480908 commit c32fc4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymilvus/client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def len_of(field_data) -> int:
if field_data.scalars.HasField("bytes_data"):
return len(field_data.scalars.bytes_data.data)

if field_data.scalars.HasField("json_data"):
return len(field_data.scalars.json_data.data)

raise MilvusException(message="Unsupported scalar type")

if field_data.HasField("vectors"):
Expand Down

0 comments on commit c32fc4b

Please sign in to comment.