mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
Merge branch 'master' into groupbyoffset
This commit is contained in:
commit
837d0a1465
1 changed files with 3 additions and 7 deletions
10
row.go
10
row.go
|
|
@ -510,14 +510,10 @@ func (r *Row) Columns() []uint64 {
|
|||
|
||||
// Includes returns true if the row contains the given column.
|
||||
func (r *Row) Includes(col uint64) bool {
|
||||
// TODO: improve the efficiency of this method by
|
||||
// performing the column filter at the bitmap level
|
||||
// rather than iterating through the results here.
|
||||
shard := col / ShardWidth
|
||||
for i := range r.segments {
|
||||
for _, c := range r.segments[i].Columns() {
|
||||
if c == col {
|
||||
return true
|
||||
}
|
||||
if r.segments[i].shard == shard {
|
||||
return r.segments[i].data.Contains(col)
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue