mirror of https://github.com/milvus-io/milvus.git
enhance: proxy check hnsw with sparse is legal (#33697)
issue:https://github.com/milvus-io/milvus/issues/22837 related:https://github.com/milvus-io/milvus/pull/33653 Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>pull/33805/head
parent
9a3e4080f1
commit
be3559e022
|
@ -32,9 +32,8 @@ func (c hnswChecker) CheckTrain(params map[string]string) error {
|
|||
}
|
||||
|
||||
func (c hnswChecker) CheckValidDataType(dType schemapb.DataType) error {
|
||||
// TODO(SPARSE) we'll add sparse vector support in HNSW later in cardinal
|
||||
if !typeutil.IsDenseFloatVectorType(dType) {
|
||||
return fmt.Errorf("HNSW only support float vector data type")
|
||||
if !typeutil.IsVectorType(dType) {
|
||||
return fmt.Errorf("can't build hnsw in not vector type.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ func Test_hnswChecker_CheckValidDataType(t *testing.T) {
|
|||
},
|
||||
{
|
||||
dType: schemapb.DataType_BinaryVector,
|
||||
errIsNil: false,
|
||||
errIsNil: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue