| 23 | namespace bytedance::bolt::exec { |
| 24 | template <bool needSort> |
| 25 | SpillableWindowBuild<needSort>::SpillableWindowBuild( |
| 26 | const std::shared_ptr<const core::WindowNode>& windowNode, |
| 27 | bolt::memory::MemoryPool* pool, |
| 28 | const common::SpillConfig* spillConfig, |
| 29 | tsan_atomic<bool>* nonReclaimableSection, |
| 30 | const uint32_t maxBatchRows, |
| 31 | uint64_t preferredOutputBatchBytes, |
| 32 | uint64_t spillMemoryThreshold, |
| 33 | bool enableJit) |
| 34 | : WindowBuild( |
| 35 | windowNode, |
| 36 | pool, |
| 37 | spillConfig, |
| 38 | nonReclaimableSection, |
| 39 | spillMemoryThreshold, |
| 40 | enableJit), |
| 41 | pool_(pool), |
| 42 | maxBatchRows_(maxBatchRows), |
| 43 | preferredOutputBatchBytes_(preferredOutputBatchBytes), |
| 44 | outputType_(windowNode->inputType()) { |
| 45 | partitionStartRows_.push_back(0); |
| 46 | } |
| 47 | template <bool needSort> |
| 48 | void SpillableWindowBuild<needSort>::buildNextPartition() { |
| 49 | if (currentSpilledPartition_ < spillers_.size() && |