end = end > p.size() ? p.size() : end;
return new Range(start, end, p);
}
int getRowBoundaryStart(BoundaryDef b, int currRow) throws HiveException {
Direction d = b.getDirection();
int amt = b.getAmt();
switch(d) {
case PRECEDING:
if (amt == BoundarySpec.UNBOUNDED_AMOUNT) {
return 0;