| 1325 | } |
| 1326 | |
| 1327 | void PhjBuilderConfig::Codegen(FragmentState* state) { |
| 1328 | LlvmCodeGen* codegen = state->codegen(); |
| 1329 | DCHECK(codegen != nullptr); |
| 1330 | Status build_codegen_status; |
| 1331 | Status insert_codegen_status; |
| 1332 | Status codegen_status; |
| 1333 | |
| 1334 | // Codegen for hashing rows with the builder's hash table context. |
| 1335 | llvm::Function* hash_fn; |
| 1336 | codegen_status = |
| 1337 | HashTableCtx::CodegenHashRow(codegen, false, *hash_table_config_, &hash_fn); |
| 1338 | llvm::Function* murmur_hash_fn; |
| 1339 | codegen_status.MergeStatus( |
| 1340 | HashTableCtx::CodegenHashRow(codegen, true, *hash_table_config_, &murmur_hash_fn)); |
| 1341 | |
| 1342 | // Codegen for evaluating build rows |
| 1343 | llvm::Function* eval_build_row_fn; |
| 1344 | codegen_status.MergeStatus(HashTableCtx::CodegenEvalRow( |
| 1345 | codegen, true, *hash_table_config_, &eval_build_row_fn)); |
| 1346 | |
| 1347 | llvm::Function* insert_filters_fn; |
| 1348 | codegen_status.MergeStatus( |
| 1349 | CodegenInsertRuntimeFilters(codegen, filter_exprs_, &insert_filters_fn)); |
| 1350 | |
| 1351 | if (codegen_status.ok()) { |
| 1352 | TPrefetchMode::type prefetch_mode = state->query_options().prefetch_mode; |
| 1353 | build_codegen_status = CodegenProcessBuildBatch( |
| 1354 | codegen, hash_fn, murmur_hash_fn, eval_build_row_fn, insert_filters_fn); |
| 1355 | insert_codegen_status = CodegenInsertBatch( |
| 1356 | codegen, hash_fn, murmur_hash_fn, eval_build_row_fn, prefetch_mode); |
| 1357 | } else { |
| 1358 | build_codegen_status = codegen_status; |
| 1359 | insert_codegen_status = codegen_status; |
| 1360 | } |
| 1361 | AddCodegenStatus(build_codegen_status, "Build Side"); |
| 1362 | AddCodegenStatus(insert_codegen_status, "Hash Table Construction"); |
| 1363 | } |
| 1364 | |
| 1365 | string PhjBuilder::DebugString() const { |
| 1366 | stringstream ss; |
nothing calls this directly
no test coverage detected