| 995 | } |
| 996 | |
| 997 | RowVectorPtr HashProbe::getBuildSideOutput() { |
| 998 | outputTableRows_.resize(outputBatchSize_); |
| 999 | int32_t numOut; |
| 1000 | if (isRightSemiFilterJoin(joinType_)) { |
| 1001 | numOut = table_->listProbedRows( |
| 1002 | &lastProbeIterator_, |
| 1003 | outputBatchSize_, |
| 1004 | RowContainer::kUnlimited, |
| 1005 | outputTableRows_.data()); |
| 1006 | } else if (isRightSemiProjectJoin(joinType_)) { |
| 1007 | numOut = table_->listAllRows( |
| 1008 | &lastProbeIterator_, |
| 1009 | outputBatchSize_, |
| 1010 | RowContainer::kUnlimited, |
| 1011 | outputTableRows_.data()); |
| 1012 | } else { |
| 1013 | // Must be a right join or full join. |
| 1014 | numOut = table_->listNotProbedRows( |
| 1015 | &lastProbeIterator_, |
| 1016 | outputBatchSize_, |
| 1017 | RowContainer::kUnlimited, |
| 1018 | outputTableRows_.data()); |
| 1019 | } |
| 1020 | if (!numOut) { |
| 1021 | return nullptr; |
| 1022 | } |
| 1023 | |
| 1024 | prepareOutput(numOut); |
| 1025 | |
| 1026 | // Populate probe-side columns of the output with nulls. |
| 1027 | for (auto projection : projectedInputColumns_) { |
| 1028 | output_->childAt(projection.outputChannel) = BaseVector::createNullConstant( |
| 1029 | outputType_->childAt(projection.outputChannel), numOut, pool()); |
| 1030 | } |
| 1031 | |
| 1032 | extractColumns( |
| 1033 | table_.get(), |
| 1034 | folly::Range<char**>(outputTableRows_.data(), numOut), |
| 1035 | tableOutputProjections_, |
| 1036 | pool(), |
| 1037 | outputType_->children(), |
| 1038 | output_->children()); |
| 1039 | |
| 1040 | if (isRightSemiProjectJoin(joinType_)) { |
| 1041 | // Populate 'match' column. |
| 1042 | if (noInput_) { |
| 1043 | // Probe side is empty. All rows should return 'match = false', even |
| 1044 | // ones with a null join key. |
| 1045 | matchColumn() = createConstantFalse(numOut, pool()); |
| 1046 | } else { |
| 1047 | table_->rows()->extractProbedFlags( |
| 1048 | outputTableRows_.data(), |
| 1049 | numOut, |
| 1050 | nullAware_, |
| 1051 | nullAware_ && probeSideHasNullKeys_, |
| 1052 | matchColumn()); |
| 1053 | } |
| 1054 | } |
nothing calls this directly
no test coverage detected