@Override
    public Double getCumulativeMemoryWithinPhaseSplit(HiveJoin join) {
      final RelMetadataQuery mq = join.getCluster().getMetadataQuery();
      // TODO: Split count is not same as no of buckets
      JoinAlgorithm oldAlgo = join.getJoinAlgorithm();
      join.setJoinAlgorithm(TezSMBJoinAlgorithm.INSTANCE);

      final Double memoryWithinPhase = mq.cumulativeMemoryWithinPhase(join);
      final Integer splitCount = mq.splitCount(join);
      join.setJoinAlgorithm(oldAlgo);

      if (memoryWithinPhase == null || splitCount == null) {
        return null;
      }
      return memoryWithinPhase / splitCount;
    }
SMB_JOIN is a Sort Merge Join. Each parallel computation handles one bucket.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/cost/HiveOnTezCostModel.java