applied suggestions by @travisturner

This commit is contained in:
Todd Gruben 2019-12-11 12:13:57 -06:00
parent 7a2d90ade8
commit 95f2864abe
3 changed files with 3 additions and 2 deletions

View file

@ -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()

View file

@ -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.

View file

@ -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)