@Override public Scan open(){
  Scan ss=sp.open();
  return new GroupByScan(ss,groupFlds,aggFns);
}

@ Override public Scan open ( ) { Scan ss = sp . open ( ) ; return new GroupByScan ( ss , groupFlds , aggFns ) ; }
this method opens a sort plan for the specified plan . the sort plan ensures that the underlying records will be appropriately grouped .
