mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Remove trackExistence check in batch (i.e. always build _exists) data. (#2348)
(cherry picked from commit 5110405f2f)
This commit is contained in:
parent
c7b4e47f10
commit
0cb16f0cf4
2 changed files with 8 additions and 17 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue