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

Method SpillWriter

bolt/exec/SpillFile.cpp:200–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200SpillWriter::SpillWriter(
201 const RowTypePtr& type,
202 const std::vector<SpillSortKey>& sortingKeys,
203 const std::string& pathPrefix,
204 uint64_t targetFileSize,
205 const common::SpillConfig::SpillIOConfig& ioConfig,
206 memory::MemoryPool* pool,
207 folly::Synchronized<common::SpillStats>* stats,
208 uint32_t maxBatchRows,
209 std::optional<RowFormatInfo> rowInfo)
210 : type_(type),
211 sortingKeys_(sortingKeys),
212 compressionKind_(ioConfig.compressionKind),
213 pathPrefix_(pathPrefix),
214 targetFileSize_(targetFileSize),
215 spillUringEnabled_(ioConfig.spillUringEnabled),
216 writeBufferSize_(ioConfig.writeBufferSize),
217 fileCreateConfig_(ioConfig.fileCreateConfig),
218 updateAndCheckSpillLimitCb_(ioConfig.updateAndCheckSpillLimitCb),
219 pool_(pool),
220 stats_(stats),
221 maxBatchRows_(maxBatchRows),
222 rowInfo_(rowInfo),
223 spillSerdeKind_(ioConfig.spillSerdeKind) {
224 if (ioConfig.spillSerdeKind) {
225 serde_ = getNamedVectorSerde(*ioConfig.spillSerdeKind);
226 }
227}
228
229SpillWriteFile* SpillWriter::ensureFile() {
230 if ((currentFile_ != nullptr) && (currentFile_->size() > targetFileSize_)) {

Callers

nothing calls this directly

Calls 1

getNamedVectorSerdeFunction · 0.85

Tested by

no test coverage detected