| 116 | } |
| 117 | |
| 118 | inline bool HashTable::Insert(HashTableCtx* __restrict__ ht_ctx, |
| 119 | BufferedTupleStream::FlatRowPtr flat_row, TupleRow* row, Status* status) { |
| 120 | Bucket* bucket = InsertInternal(ht_ctx, status); |
| 121 | if (UNLIKELY(bucket == NULL)) return false; |
| 122 | // If successful insert, update the contents of the newly inserted entry with 'idx'. |
| 123 | if (bucket->HasDuplicates()) { |
| 124 | DuplicateNode* node = bucket->GetDuplicate(); |
| 125 | if (UNLIKELY(node == NULL)) return false; |
| 126 | if (stores_tuples()) { |
| 127 | node->htdata.tuple = row->GetTuple(0); |
| 128 | } else { |
| 129 | node->htdata.flat_row = flat_row; |
| 130 | } |
| 131 | } else { |
| 132 | if (stores_tuples()) { |
| 133 | Tuple* tuple = row->GetTuple(0); |
| 134 | bucket->SetTuple(tuple); |
| 135 | } else { |
| 136 | bucket->SetFlatRow(flat_row); |
| 137 | } |
| 138 | } |
| 139 | return true; |
| 140 | } |
| 141 | |
| 142 | template <const bool READ> |
| 143 | inline void HashTable::PrefetchBucket(uint32_t hash) { |
nothing calls this directly
no test coverage detected