}
private OrderExpressionDef translate(ShapeDetails inpShape,
OrderExpression oExpr)
throws SemanticException {
OrderExpressionDef oexpDef = new OrderExpressionDef();
oexpDef.setOrder(oExpr.getOrder());
try {
PTFExpressionDef expDef = buildExpressionDef(inpShape, oExpr.getExpression());
oexpDef.setExpressionTreeString(expDef.getExpressionTreeString());
oexpDef.setExprEvaluator(expDef.getExprEvaluator());
oexpDef.setExprNode(expDef.getExprNode());
oexpDef.setOI(expDef.getOI());
} catch (HiveException he) {
throw new SemanticException(he);
}
PTFTranslator.validateComparable(oexpDef.getOI(),
String.format("Partition Expression %s is not a comparable expression",
oExpr.getExpression().toStringTree()));
return oexpDef;
}