Commit d9ea4a0
committed
Add nullable vector support for segment search and indexing
This commit adds nullable vector support for both growing and sealed segments,
including search, retrieval, and index building operations. It introduces
OffsetMapping for efficient logical-to-physical offset translation.
Core infrastructure changes:
- Add OffsetMapping class with Build()/BuildIncremental() for bitmap-based
offset mapping, supporting both dense lookup and efficient valid count tracking
- Add TransformBitset() and TransformOffset() utilities for converting between
logical and physical coordinate spaces during search operations
- Update SearchResult to include has_raw_data_ flag and physical offset handling
Growing segment changes:
- Update ConcurrentVector to support nullable vectors with OffsetMapping
- Add get_offset_mapping() and valid data tracking in AckSeal()
- Update FieldIndexing to handle nullable vectors with physical offset storage
- Modify SearchOnGrowing to transform bitset/offsets for nullable vector search
- Add nullable vector tests in SegmentGrowingTest covering search and retrieval
Sealed segment changes:
- Update ChunkedColumn/ChunkedColumnGroup to support OffsetMapping
- Modify ChunkedSegmentSealedImpl to handle nullable vector field data loading
- Update SearchOnSealedIndex/SearchOnSealedColumn with early return for 100% null
case to prevent crash when searching empty index
- Add FilterVectorValidOffsets() for output field retrieval with nullable vectors
- Expand ChunkedSegmentSealedBinlogIndexTest with comprehensive nullable test cases
Index building changes:
- Update VectorMemIndex/VectorDiskIndex to store and serialize OffsetMapping
- Add BuildValidData()/UpdateValidData() for nullable vector index building
- Update VecIndexCreator and index_c API with valid data parameter support
- Modify InterimSealedIndexTranslator to handle nullable vector binlog index
Search and reduce changes:
- Update Reduce.cpp to transform physical offsets back to logical for output
- Update StreamReduce with nullable vector offset transformation support
- Add early return in SearchOnSealed when offset_mapping has zero valid count
Signed-off-by: marcelo-cjl <[email protected]>1 parent 2e6c7ac commit d9ea4a0
File tree
50 files changed
+3614
-601
lines changed- internal/core
- src
- common
- exec/operator
- indexbuilder
- index
- mmap
- query
- segcore
- reduce
- storagev1translator
- unittest/test_utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+3614
-601
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| |||
559 | 564 | | |
560 | 565 | | |
561 | 566 | | |
562 | | - | |
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
573 | 593 | | |
574 | 594 | | |
575 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| |||
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
462 | | - | |
463 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
464 | 468 | | |
465 | 469 | | |
466 | 470 | | |
| |||
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
481 | | - | |
482 | | - | |
483 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
484 | 502 | | |
485 | 503 | | |
486 | 504 | | |
| |||
524 | 542 | | |
525 | 543 | | |
526 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
527 | 549 | | |
528 | 550 | | |
529 | 551 | | |
530 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
531 | 558 | | |
532 | 559 | | |
533 | 560 | | |
534 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
535 | 566 | | |
536 | 567 | | |
537 | 568 | | |
538 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
539 | 574 | | |
540 | 575 | | |
541 | 576 | | |
542 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
543 | 582 | | |
544 | 583 | | |
545 | 584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
132 | 181 | | |
133 | 182 | | |
134 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
0 commit comments