if (model.getShuffleModel() == null) {
assert model.getReduceUnits().isEmpty();
return null;
}
assert model.getReduceUnits().isEmpty() == false;
CompiledShuffle shuffle = model.getShuffleModel().getCompiled();
CompiledReduce reducer = model.getReduceUnits().get(0).getCompiled();
return new Reduce(
reducer.getReducerType().getQualifiedName(),
reducer.getCombinerTypeOrNull() == null
? null
: reducer.getCombinerTypeOrNull().getQualifiedName(),
shuffle.getKeyTypeName(),
shuffle.getValueTypeName(),
shuffle.getGroupComparatorTypeName(),
shuffle.getSortComparatorTypeName(),
shuffle.getPartitionerTypeName());
}