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

fix: [2.5] should not modify users search_param, copy instead #2578

Merged
merged 1 commit into from
Jan 17, 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: 2 additions & 1 deletion pymilvus/client/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import datetime
import importlib.util
from copy import deepcopy
from datetime import timedelta
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union

Expand Down Expand Up @@ -277,7 +278,7 @@ def get_params(search_params: Dict):
# no more parameters will be written searchParams.params
# to ensure compatibility and milvus can still get a json format parameter
# try to write all the parameters under searchParams into searchParams.Params
params = search_params.get("params", {})
params = deepcopy(search_params.get("params", {}))
for key, value in search_params.items():
if key in params:
if params[key] != value:
Expand Down
Loading