mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
[test]Modify the common func (#16828)
Signed-off-by: jingkl <jingjing.jia@zilliz.com>
This commit is contained in:
parent
bc7972eb87
commit
57e9f9ad3e
@ -254,9 +254,9 @@ def gen_dataframe_all_data_type(nb=ct.default_nb, dim=ct.default_dim, start=0):
|
||||
int16_values = pd.Series(data=[np.int16(i) for i in range(start, start + nb)], dtype="int16")
|
||||
int8_values = pd.Series(data=[np.int8(i) for i in range(start, start + nb)], dtype="int8")
|
||||
bool_values = pd.Series(data=[np.bool(i) for i in range(start, start + nb)], dtype="bool")
|
||||
string_values = pd.Series(data=[str(i) for i in range(start, start + nb)], dtype="string")
|
||||
float_values = pd.Series(data=[np.float32(i) for i in range(start, start + nb)], dtype="float32")
|
||||
double_values = pd.Series(data=[np.double(i) for i in range(start, start + nb)], dtype="double")
|
||||
string_values = pd.Series(data=[str(i) for i in range(start, start + nb)], dtype="string")
|
||||
float_vec_values = gen_vectors(nb, dim)
|
||||
df = pd.DataFrame({
|
||||
ct.default_int64_field_name: int64_values,
|
||||
@ -265,8 +265,8 @@ def gen_dataframe_all_data_type(nb=ct.default_nb, dim=ct.default_dim, start=0):
|
||||
ct.default_int8_field_name: int8_values,
|
||||
ct.default_bool_field_name: bool_values,
|
||||
ct.default_float_field_name: float_values,
|
||||
ct.default_string_field_name: string_values,
|
||||
ct.default_double_field_name: double_values,
|
||||
ct.default_string_field_name: string_values,
|
||||
ct.default_float_vec_field_name: float_vec_values
|
||||
})
|
||||
return df
|
||||
|
@ -895,7 +895,7 @@ class TestDeleteOperation(TestcaseBase):
|
||||
log.debug(collection_w.num_entities)
|
||||
collection_w.query(tmp_expr, output_fields=[ct.default_float_vec_field_name],
|
||||
check_task=CheckTasks.check_query_results,
|
||||
check_items={'exp_res': df_new.iloc[[0], [0, 2]].to_dict('records'), 'with_vec': True})
|
||||
check_items={'exp_res': df_new.iloc[[0], [0, 3]].to_dict('records'), 'with_vec': True})
|
||||
|
||||
collection_w.delete(tmp_expr)
|
||||
if to_flush_delete:
|
||||
|
Loading…
Reference in New Issue
Block a user