Node15Leaf holds up to 15 sorted bytes.
More...
|
|
static constexpr NType | NODE_15_LEAF = NType::NODE_15_LEAF |
|
static constexpr uint8_t | CAPACITY = 15 |
|
|
class | Node7Leaf |
|
class | Node256Leaf |
Node15Leaf holds up to 15 sorted bytes.
◆ InsertByte()
| void duckdb::Node15Leaf::InsertByte |
( |
ART & | art, |
|
|
Node & | node, |
|
|
const uint8_t | byte ) |
|
static |
Insert a byte.
153556 {
153557 {
153558 NodeHandle<Node15Leaf> n15_handle(art, node);
153559 auto &n15 = n15_handle.Get();
153560 if (n15.count != CAPACITY) {
153561 InsertByteInternal(n15, byte);
153562 return;
153563 }
153564 }
153565 auto node15 = node;
153566 Node256Leaf::GrowNode15Leaf(art, node, node15);
153568}
static void InsertByte(ART &art, Node &node, const uint8_t byte)
Insert a byte.
Definition duckdb.cpp:155248
◆ DeleteByte()
| void duckdb::Node15Leaf::DeleteByte |
( |
ART & | art, |
|
|
Node & | node, |
|
|
const uint8_t | byte ) |
|
static |
Delete a byte.
153570 {
153571 {
153572 auto n15_handle = DeleteByteInternal(art, node, byte);
153573 auto &n15 = n15_handle.Get();
153574 if (n15.count >= Node7Leaf::CAPACITY) {
153575 return;
153576 }
153577 }
153578 auto node15 = node;
153579 Node7Leaf::ShrinkNode15Leaf(art, node, node15);
153580}
◆ GrowNode7Leaf()
| void duckdb::Node15Leaf::GrowNode7Leaf |
( |
ART & | art, |
|
|
Node & | node15_leaf, |
|
|
Node & | node7_leaf ) |
|
staticprivate |
153582 {
153583 {
153584 NodeHandle<Node7Leaf> n7_handle(art, node7_leaf);
153585 auto &n7 = n7_handle.Get();
153586
153587 auto n15_handle =
New(art, node15_leaf);
153588 auto &n15 = n15_handle.Get();
153589 node15_leaf.SetGateStatus(node7_leaf.GetGateStatus());
153590
153591 n15.count = n7.count;
153592 for (uint8_t i = 0; i < n7.count; i++) {
153593 n15.key[i] = n7.key[i];
153594 }
153595 }
153597}
static NodeHandle< BaseLeaf > New(ART &art, Node &node)
Definition duckdb.cpp:150900
static void FreeNode(ART &art, Node &node)
Free the node.
Definition duckdb.cpp:154622
◆ ShrinkNode256Leaf()
| void duckdb::Node15Leaf::ShrinkNode256Leaf |
( |
ART & | art, |
|
|
Node & | node15_leaf, |
|
|
Node & | node256_leaf ) |
|
staticprivate |
We shrink at <= Node48::SHRINK_THRESHOLD.
153599 {
153600 {
153601 auto n15_handle =
New(art, node15_leaf);
153602 auto &n15 = n15_handle.Get();
153603
153604 NodeHandle<Node256Leaf> n256_handle(art, node256_leaf);
153605 auto &n256 = n256_handle.Get();
153606
153607 node15_leaf.SetGateStatus(node256_leaf.GetGateStatus());
153608
153609 ValidityMask
mask(&n256.mask[0], Node256::CAPACITY);
153610 for (uint16_t i = 0; i < Node256::CAPACITY; i++) {
153611 if (
mask.RowIsValid(i)) {
153612 n15.key[n15.count] = UnsafeNumericCast<uint8_t>(i);
153613 n15.count++;
153614 }
153615 }
153616 }
153618}
GMat mask(const GMat &src, const GMat &mask)
The documentation for this class was generated from the following file: