mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 11:57:51 +00:00
simplify row/lastRow comparison in bulkImport
This commit is contained in:
parent
cfb2a80866
commit
e54dbd6731
1 changed files with 2 additions and 2 deletions
|
|
@ -1511,7 +1511,7 @@ func (f *fragment) bulkImportStandard(rowIDs, columnIDs []uint64, options *Impor
|
|||
// sorting by rowID/columnID first and avoiding the map allocation here. (we
|
||||
// could reuse rowIDs to store the list of unique row IDs)
|
||||
rowSet := make(map[uint64]struct{})
|
||||
lastRowID := uint64(0)
|
||||
lastRowID := uint64(1 << 63)
|
||||
|
||||
// replace columnIDs with calculated positions to avoid allocation.
|
||||
for i := 0; i < len(columnIDs); i++ {
|
||||
|
|
@ -1523,7 +1523,7 @@ func (f *fragment) bulkImportStandard(rowIDs, columnIDs []uint64, options *Impor
|
|||
columnIDs[i] = pos
|
||||
|
||||
// Add row to rowSet.
|
||||
if i == 0 || rowID != lastRowID {
|
||||
if rowID != lastRowID {
|
||||
lastRowID = rowID
|
||||
rowSet[rowID] = struct{}{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue