enhance: [2.4] enable MV on binary vectors (#35669)

pr: #35668

Signed-off-by: Patrick Weizhi Xu <weizhi.xu@zilliz.com>
(cherry picked from commit 5404228fca58d4ad4a788ec6d58d2693019132b6)
pull/35674/head
Patrick Weizhi Xu 2024-08-25 16:27:08 +08:00 committed by GitHub
parent 35d2f9b210
commit 4b5bd07971
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -206,7 +206,8 @@ func (it *indexBuildTask) PreCheck(ctx context.Context, dependency *taskSchedule
// vector index build needs information of optional scalar fields data
optionalFields := make([]*indexpb.OptionalFieldInfo, 0)
partitionKeyIsolation := false
if Params.CommonCfg.EnableMaterializedView.GetAsBool() && isOptionalScalarFieldSupported(indexType) && typeutil.IsDenseFloatVectorType(field.DataType) {
isVectorTypeSupported := typeutil.IsDenseFloatVectorType(field.DataType) || typeutil.IsBinaryVectorType(field.DataType)
if Params.CommonCfg.EnableMaterializedView.GetAsBool() && isOptionalScalarFieldSupported(indexType) && isVectorTypeSupported {
if collectionInfo == nil {
log.Ctx(ctx).Warn("get collection failed", zap.Int64("collID", segIndex.CollectionID), zap.Error(err))
it.SetState(indexpb.JobState_JobStateInit, err.Error())

View File

@ -1716,7 +1716,6 @@ func (s *taskSchedulerSuite) Test_indexTaskWithMvOptionalScalarField() {
s.Run("enqueue returns empty when vector type is not dense vector", func() {
paramtable.Get().CommonCfg.EnableMaterializedView.SwapTempValue("true")
for _, dataType := range []schemapb.DataType{
schemapb.DataType_BinaryVector,
schemapb.DataType_SparseFloatVector,
} {
mt.collections[collID].Schema.Fields[0].DataType = dataType