| 1782 | } |
| 1783 | |
| 1784 | bool HashBuild::nonReclaimableState() const { |
| 1785 | // Apart from being in the nonReclaimable section, |
| 1786 | // its also not reclaimable if: |
| 1787 | // 1) the hash table has been built by the last build thread (indicated |
| 1788 | // by state_) |
| 1789 | // 2) the last build operator has transferred ownership of 'this' operator's |
| 1790 | // intermediate state (table_ and spiller_) to itself |
| 1791 | // 3) it has completed spilling before reaching either of the previous |
| 1792 | // two states. |
| 1793 | return ((state_ != State::kRunning) && (state_ != State::kWaitForBuild) && |
| 1794 | (state_ != State::kYield)) || |
| 1795 | nonReclaimableSection_ || intermediateStateCleared_ || |
| 1796 | spiller_->finalized(); |
| 1797 | } |
| 1798 | |
| 1799 | void HashBuild::close() { |
| 1800 | Operator::close(); |