| 43 | } |
| 44 | |
| 45 | Status PhjBuilder::ProcessBuildBatch( |
| 46 | RowBatch* build_batch, HashTableCtx* ctx, bool build_filters, bool is_null_aware) { |
| 47 | Status status; |
| 48 | HashTableCtx::ExprValuesCache* expr_vals_cache = ctx->expr_values_cache(); |
| 49 | expr_vals_cache->Reset(); |
| 50 | FOREACH_ROW(build_batch, 0, build_batch_iter) { |
| 51 | TupleRow* build_row = build_batch_iter.Get(); |
| 52 | if (!ctx->EvalAndHashBuild(build_row)) { |
| 53 | if (is_null_aware) { |
| 54 | // If we are NULL aware and this build row has NULL in the eq join slot, |
| 55 | // append it to the null_aware partition. We will need it later. |
| 56 | if (UNLIKELY( |
| 57 | !AppendRow(null_aware_partition_->build_rows(), build_row, &status))) { |
| 58 | return status; |
| 59 | } |
| 60 | } |
| 61 | continue; |
| 62 | } |
| 63 | if (build_filters) { |
| 64 | DCHECK_EQ(ctx->level(), 0) |
| 65 | << "Runtime filters should not be built during repartitioning."; |
| 66 | InsertRuntimeFilters(filter_ctxs_.data(), build_row); |
| 67 | } |
| 68 | const uint32_t hash = expr_vals_cache->CurExprValuesHash(); |
| 69 | const uint32_t partition_idx = hash >> (32 - NUM_PARTITIONING_BITS); |
| 70 | PhjBuilderPartition* partition = hash_partitions_[partition_idx].get(); |
| 71 | if (UNLIKELY(!AppendRow(partition->build_rows(), build_row, &status))) { |
| 72 | return status; |
| 73 | } |
| 74 | } |
| 75 | for (const FilterContext& ctx : filter_ctxs_) ctx.MaterializeValues(); |
| 76 | return Status::OK(); |
| 77 | } |
| 78 | |
| 79 | bool PhjBuilderPartition::InsertBatch(TPrefetchMode::type prefetch_mode, |
| 80 | HashTableCtx* ht_ctx, RowBatch* batch, |
nothing calls this directly
no test coverage detected