| 306 | } |
| 307 | |
| 308 | void HashBuild::setReusableHashTable( |
| 309 | std::shared_ptr<core::OpaqueHashTable> opaqueHashTable) { |
| 310 | LOG(INFO) << "Enter setReusableHashTable!"; |
| 311 | BOLT_USER_CHECK( |
| 312 | !joinNode_->isRightJoin() && !joinNode_->isFullJoin() && |
| 313 | !joinNode_->isRightSemiFilterJoin() && |
| 314 | !joinNode_->isRightSemiProjectJoin(), |
| 315 | "Reusable hash table is not supported for join types that require " |
| 316 | "build-side probed flags"); |
| 317 | reuseHashTable_ = true; |
| 318 | joinBridge_->start(); |
| 319 | setState(State::kFinish); |
| 320 | |
| 321 | if (joinNode_->joinHasNullKeys() && isAntiJoin(joinType_) && nullAware_ && |
| 322 | !joinNode_->filter()) { |
| 323 | joinBridge_->setAntiJoinHasNullKeys(); |
| 324 | return; |
| 325 | } |
| 326 | |
| 327 | auto reusableHashTable = |
| 328 | std::reinterpret_pointer_cast<exec::BaseHashTable>(opaqueHashTable); |
| 329 | |
| 330 | joinBridge_->setHashTable( |
| 331 | std::move(reusableHashTable), {}, joinNode_->joinHasNullKeys(), nullptr); |
| 332 | LOG(INFO) << "setReusableHashTable success!"; |
| 333 | } |
| 334 | |
| 335 | void HashBuild::setupSpiller( |
| 336 | SpillPartition* spillPartition, |