}
private BoundaryDef translate(ShapeDetails inpShape, BoundarySpec bndSpec)
throws SemanticException {
if (bndSpec instanceof ValueBoundarySpec) {
ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec;
ValueBoundaryDef vbDef = new ValueBoundaryDef();
vbDef.setAmt(vBndSpec.getAmt());
vbDef.setDirection(vBndSpec.getDirection());
PTFTranslator.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression());
PTFExpressionDef exprDef = null;
try {
exprDef = buildExpressionDef(inpShape, vBndSpec.getExpression());
} catch (HiveException he) {
throw new SemanticException(he);
}
PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
vbDef.setExpressionDef(exprDef);