public PhysicalExec createGroupByPlan(TaskAttemptContext context,GroupbyNode groupbyNode, PhysicalExec subOp)
throws IOException {
Enforcer enforcer = context.getEnforcer();
EnforceProperty property = getAlgorithmEnforceProperty(enforcer, groupbyNode);
if (property != null) {
GroupbyAlgorithm algorithm = property.getGroupby().getAlgorithm();
if (algorithm == GroupbyAlgorithm.HASH_AGGREGATION) {
return createInMemoryHashAggregation(context, groupbyNode, subOp);
} else {
return createSortAggregation(context, property, groupbyNode, subOp);
}