Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Convert json_cast_type to DataType #2690

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import grpc
from grpc._cython import cygrpc

from pymilvus.client.types import DataType
from pymilvus.decorators import ignore_unimplemented, retry_on_rpc_failure, upgrade_reminder
from pymilvus.exceptions import (
AmbiguousIndexName,
Expand Down Expand Up @@ -1144,6 +1145,8 @@ def describe_index(
info_dict = {kv.key: kv.value for kv in response.index_descriptions[0].params}
info_dict["field_name"] = response.index_descriptions[0].field_name
info_dict["index_name"] = response.index_descriptions[0].index_name
if info_dict.get("json_cast_type"):
info_dict["json_cast_type"] = DataType(int(info_dict["json_cast_type"]))
if info_dict.get("params"):
info_dict["params"] = json.loads(info_dict["params"])
info_dict["total_rows"] = response.index_descriptions[0].total_rows
Expand Down