enhance: enable MV on binary vectors (#35668)

Signed-off-by: Patrick Weizhi Xu <weizhi.xu@zilliz.com>
pull/35688/head
Patrick Weizhi Xu 2024-08-25 16:27:09 +08:00 committed by GitHub
parent cfa434086a
commit 4236c3bafb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,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

@ -1665,7 +1665,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