ArrayList<OrderExpression> orderColList = spec.getQueryOrderSpec() == null ?
new ArrayList<PTFInvocationSpec.OrderExpression>() :
spec.getQueryOrderSpec().getExpressions();
for (int i = 0; i < orderColList.size(); i++) {
OrderExpression orderCol = orderColList.get(i);
org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.Order order = orderCol.getOrder();
if (order.name().equals("ASC")) {
orderString.append('+');
} else {
orderString.append('-');
}
ExprNodeDesc orderExpr = genExprNodeDesc(orderCol.getExpression(), inputRR);
orderCols.add(orderExpr);
}
ArrayList<ColumnInfo> colInfoList = inputRR.getColumnInfos();
RowResolver rsNewRR = new RowResolver();