Class HashJoinMemoryCalculatorImpl.PostBuildCalculationsImpl

java.lang.Object
org.apache.drill.exec.physical.impl.join.HashJoinMemoryCalculatorImpl.PostBuildCalculationsImpl
All Implemented Interfaces:
HashJoinMemoryCalculator.PostBuildCalculations, HashJoinStateCalculator<HashJoinMemoryCalculator>
Enclosing class:
HashJoinMemoryCalculatorImpl

public static class HashJoinMemoryCalculatorImpl.PostBuildCalculationsImpl extends Object implements HashJoinMemoryCalculator.PostBuildCalculations

In this state, we need to make sure there is enough room to spill probe side batches, if spilling is necessary. If there is not enough room, we have to evict build side partitions. If we don't have to evict build side partitions in this state, then we are done. If we do have to evict build side partitions then we have to recursively repeat the process.

Lifecycle

  • Step 1: Call initialize(boolean). This gives the HashJoinStateCalculator additional information it needs to compute memory requirements.
  • Step 2: Call shouldSpill(). This tells you which build side partitions need to be spilled in order to make room for probing.
  • Step 3: Call next(). After you are done probing and partitioning the probe side, get the next calculator.