MCPcopy Create free account
hub / github.com/alibaba/zvec / SetUpTestSuite

Method SetUpTestSuite

tests/db/sqlengine/optimizer_test.cc:63–83  ·  view source on GitHub ↗

Sets up the test fixture.

Source from the content-addressed store, hash-verified

61 public:
62 // Sets up the test fixture.
63 static void SetUpTestSuite() {
64 schema = std::make_shared<CollectionSchema>();
65 auto &collection_schema = *schema;
66 collection_schema.set_name("collection");
67
68 // feature field
69 auto column1 = std::make_shared<FieldSchema>();
70 auto vector_params = std::make_shared<FlatIndexParams>(MetricType::IP);
71 column1->set_name("face_feature");
72 column1->set_index_params(vector_params);
73 column1->set_dimension(4);
74 column1->set_data_type(DataType::VECTOR_FP32);
75 collection_schema.add_field(column1);
76
77 // invert field
78 auto column2 = std::make_shared<FieldSchema>();
79 column2->set_name("age");
80 column2->set_data_type(DataType::INT32);
81 column2->set_index_params(std::make_shared<InvertIndexParams>(false));
82 collection_schema.add_field(column2);
83 }
84
85 // Tears down the test fixture.
86 static void TearDownTestSuite() {}

Callers

nothing calls this directly

Calls 4

set_nameMethod · 0.80
add_fieldMethod · 0.80
set_dimensionMethod · 0.45
set_data_typeMethod · 0.45

Tested by

no test coverage detected