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

Method translateToInnerRows

bolt/expression/PeeledEncoding.cpp:68–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68SelectivityVector* PeeledEncoding::translateToInnerRows(
69 const SelectivityVector& outerRows,
70 LocalSelectivityVector& innerRowsHolder) const {
71 BOLT_CHECK(wrapEncoding_ != VectorEncoding::Simple::FLAT);
72 if (wrapEncoding_ == VectorEncoding::Simple::CONSTANT) {
73 auto newRows = innerRowsHolder.get(constantWrapIndex_ + 1, false);
74 newRows->setValid(constantWrapIndex_, true);
75 newRows->updateBounds();
76 return newRows;
77 }
78 auto baseSize = baseSize_;
79 auto indices = wrap_->as<vector_size_t>();
80 // If the wrappers add nulls, do not enable the inner rows. The
81 // indices for places that a dictionary sets to null are not
82 // defined. Null adding dictionaries are not peeled off non
83 // null-propagating Exprs.
84 auto flatNulls = wrapNulls_ ? wrapNulls_->as<uint64_t>() : nullptr;
85
86 auto* newRows = innerRowsHolder.get(baseSize, false);
87 bolt::translateToInnerRows(outerRows, indices, flatNulls, *newRows);
88
89 return newRows;
90}
91
92namespace {
93inline void setPeeled(

Callers 7

AsJsonMethod · 0.80
evalSpecialFormMethod · 0.80
evalSpecialFormMethod · 0.80
peelEncodingsMethod · 0.80
applyMethod · 0.80
TEST_PFunction · 0.80

Calls 4

setValidMethod · 0.80
updateBoundsMethod · 0.80
translateToInnerRowsFunction · 0.50
getMethod · 0.45

Tested by 1

TEST_PFunction · 0.64