diff --git a/batch/batch.go b/batch/batch.go index b4e63f95b..34eb28675 100644 --- a/batch/batch.go +++ b/batch/batch.go @@ -1313,20 +1313,15 @@ func (b *Batch) makeFragments(frags, clearFrags fragments) (fragments, fragments shardWidth := b.shardWidth() emptyClearRows := make(map[int]uint64) - // create _exists fragments if needed - // TODO(tlt): maybe make this a separate flag for backward compatibility? - // (because dax.Table doesn't have this). - //if b.index.Options.TrackExistence { - if true { - var curBM *roaring.Bitmap - curShard := ^uint64(0) // impossible sentinel value for shard. - for _, col := range b.ids { - if col/shardWidth != curShard { - curShard = col / shardWidth - curBM = frags.GetOrCreate(curShard, "_exists", "") - } - curBM.DirectAdd(col % shardWidth) + // create _exists fragments + var curBM *roaring.Bitmap + curShard := ^uint64(0) // impossible sentinel value for shard. + for _, col := range b.ids { + if col/shardWidth != curShard { + curShard = col / shardWidth + curBM = frags.GetOrCreate(curShard, "_exists", "") } + curBM.DirectAdd(col % shardWidth) } for i, rowIDs := range b.rowIDs { diff --git a/importer.go b/importer.go index 9bfa3b79d..5753deb21 100644 --- a/importer.go +++ b/importer.go @@ -66,10 +66,6 @@ func (i *onPremImporter) ImportRoaringShard(ctx context.Context, tid dax.TableID return i.api.ImportRoaringShard(ctx, string(tid), shard, request) } -// EncodeImportValues is kind of weird. We're trying to mimic what the client -// does here (because the Importer interface was originally based off of the -// client methods). So we end up generating a protobuf-encode byte slice. And we -// don't really use path. func (i *onPremImporter) EncodeImportValues(ctx context.Context, tid dax.TableID, fld *dax.Field, shard uint64, vals []int64, ids []uint64, clear bool) (path string, data []byte, err error) { // This intentionally no-ops. See comment on struct. return "", nil, nil