return create(index, type, null, DataType.UNKNOWN);
}
public POLocalRearrangeTez create(int index, LocalRearrangeType type, List<PhysicalPlan> plans,
byte keyType) throws PlanException {
ExpressionOperator keyExpression = null;
if (type == LocalRearrangeType.STAR) {
keyExpression = new POProject(new OperatorKey(scope, nig.getNextNodeId(scope)));
keyExpression.setResultType(DataType.TUPLE);
((POProject)keyExpression).setStar(true);
} else if (type == LocalRearrangeType.NULL) {
keyExpression = new ConstantExpression(new OperatorKey(scope, nig.getNextNodeId(scope)));
((ConstantExpression)keyExpression).setValue(null);
keyExpression.setResultType(DataType.BYTEARRAY);
}
PhysicalPlan addPlan = new PhysicalPlan();
List<PhysicalPlan> addPlans = Lists.newArrayList();
if (type == LocalRearrangeType.STAR || type == LocalRearrangeType.NULL) {