diff --git a/executor.go b/executor.go index adbd78f41..d84563a41 100644 --- a/executor.go +++ b/executor.go @@ -2846,7 +2846,7 @@ func (e *executor) executeSetValueField(ctx context.Context, index string, c *pq return ret, nil } -// executeSetValueField executes a Set() call for a specific int field. +// executeSetValueField removes value for colID if present func (e *executor) executeClearValueField(ctx context.Context, index string, c *pql.Call, f *Field, colID uint64, opt *execOptions) (bool, error) { span, ctx := tracing.StartSpanFromContext(ctx, "Executor.executeClearValueField") defer span.Finish() diff --git a/field_test.go b/field_test.go index 79b14e91f..398002ca2 100644 --- a/field_test.go +++ b/field_test.go @@ -257,6 +257,7 @@ func TestField_ClearValue(t *testing.T) { if changed, err := f.ClearValue(100); err != nil { t.Fatal(err) } else if !changed { + t.Fatal(err) } // Read value. diff --git a/view.go b/view.go index 079a20fac..334d55d34 100644 --- a/view.go +++ b/view.go @@ -405,7 +405,7 @@ func (v *view) setValue(columnID uint64, bitDepth uint, value int64) (changed bo return frag.setValue(columnID, bitDepth, value) } -// clearValue uses a column of bits to set a multi-bit value. +// clearValue removes a specific value assigned to columnID func (v *view) clearValue(columnID uint64, bitDepth uint, value int64) (changed bool, err error) { shard := columnID / ShardWidth frag, err := v.CreateFragmentIfNotExists(shard)