Skip to content

Commit

Permalink
fix: select a single column consisting of a list of column names
Browse files Browse the repository at this point in the history
Signed-off-by: lixinguo <xinguo.li@zilliz.com>
  • Loading branch information
lixinguo authored and XuanYang-cn committed Aug 5, 2024
1 parent 9ff4b2c commit 66c2362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymilvus/orm/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def check_insert_schema(schema: CollectionSchema, data: Union[List[List], pd.Dat
raise DataNotMatchException(message=msg)
columns = list(data.columns)
columns.remove(schema.primary_field)
data = data[[columns]]
data = data[columns]

tmp_fields = copy.deepcopy(schema.fields)
for i, field in enumerate(tmp_fields):
Expand All @@ -528,7 +528,7 @@ def check_upsert_schema(schema: CollectionSchema, data: Union[List[List], pd.Dat
if schema.primary_field.name not in data or data[schema.primary_field.name].isnull().all():
raise DataNotMatchException(message=ExceptionsMessage.UpsertPrimaryKeyEmpty)
columns = list(data.columns)
data = data[[columns]]
data = data[columns]

_check_data_schema_cnt(copy.deepcopy(schema.fields), data)
_check_insert_data(data)
Expand Down

0 comments on commit 66c2362

Please sign in to comment.