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

Method outputBatchRows

bolt/dwio/common/SortingWriter.cpp:137–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137vector_size_t SortingWriter::outputBatchRows() {
138 vector_size_t estimatedMaxOutputRows =
139 std::numeric_limits<vector_size_t>::max();
140 if (sortBuffer_->estimateOutputRowSize().has_value() &&
141 sortBuffer_->estimateOutputRowSize().value() != 0) {
142 const uint64_t maxOutputRows =
143 maxOutputBytesConfig_ / sortBuffer_->estimateOutputRowSize().value();
144
145 if (UNLIKELY(maxOutputRows > std::numeric_limits<vector_size_t>::max())) {
146 return maxOutputRowsConfig_;
147 }
148
149 estimatedMaxOutputRows = maxOutputRows;
150 }
151 return std::min(estimatedMaxOutputRows, maxOutputRowsConfig_);
152}
153
154std::unique_ptr<memory::MemoryReclaimer> SortingWriter::MemoryReclaimer::create(
155 SortingWriter* writer) {

Callers

nothing calls this directly

Calls 5

has_valueMethod · 0.80
maxFunction · 0.50
minFunction · 0.50
estimateOutputRowSizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected