@Override
    public int compare(TableScanOperator o1, TableScanOperator o2) {
      int r;
      r=cmpFiltered(o1,o2);
      if(r!=0) {
        return r;
      }
      r=cmpDataSize(o1,o2);
      if(r!=0) {
        return r;
      }

      return o1.toString().compareTo(o2.toString());
    }
Orders TS operators in decreasing order by "weight".
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java