MCPcopy Create free account
hub / github.com/bytedance/bolt / getBuildSideOutput

Method getBuildSideOutput

bolt/exec/HashProbe.cpp:997–1057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

995}
996
997RowVectorPtr 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 }

Callers

nothing calls this directly

Calls 15

isRightSemiFilterJoinFunction · 0.85
isRightSemiProjectJoinFunction · 0.85
extractColumnsFunction · 0.85
createConstantFalseFunction · 0.85
listProbedRowsMethod · 0.80
listAllRowsMethod · 0.80
listNotProbedRowsMethod · 0.80
childAtMethod · 0.80
extractProbedFlagsMethod · 0.80
poolFunction · 0.50
resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected