public static ColGroup copyColGroup(ColGroup group){
  ColGroup ret=null;
  int[] colIndices=Arrays.copyOf(group.getColIndices(),group.getNumCols());
  if (group instanceof ColGroupUncompressed) {
    ColGroupUncompressed in=(ColGroupUncompressed)group;
    ret=new ColGroupUncompressed(colIndices,in.getNumRows(),in.getData());
  }
 else   if (group instanceof ColGroupRLE) {
    ColGroupRLE in=(ColGroupRLE)group;
    ret=new ColGroupRLE(colIndices,in.getNumRows(),in.hasZeros(),in.getValues(),in.getBitmaps(),in.getBitmapOffsets());
  }
 else   if (group instanceof ColGroupOLE) {
    ColGroupOLE in=(ColGroupOLE)group;
    ret=new ColGroupOLE(colIndices,in.getNumRows(),in.hasZeros(),in.getValues(),in.getBitmaps(),in.getBitmapOffsets());
  }
  return ret;
}

public static ColGroup copyColGroup ( ColGroup group ) { ColGroup ret = null ; int [ ] colIndices = Arrays . copyOf ( group . getColIndices ( ) , group . getNumCols ( ) ) ; if ( group instanceof ColGroupUncompressed ) { ColGroupUncompressed in = ( ColGroupUncompressed ) group ; ret = new ColGroupUncompressed ( colIndices , in . getNumRows ( ) , in . getData ( ) ) ; } else if ( group instanceof ColGroupRLE ) { ColGroupRLE in = ( ColGroupRLE ) group ; ret = new ColGroupRLE ( colIndices , in . getNumRows ( ) , in . hasZeros ( ) , in . getValues ( ) , in . getBitmaps ( ) , in . getBitmapOffsets ( ) ) ; } else if ( group instanceof ColGroupOLE ) { ColGroupOLE in = ( ColGroupOLE ) group ; ret = new ColGroupOLE ( colIndices , in . getNumRows ( ) , in . hasZeros ( ) , in . getValues ( ) , in . getBitmaps ( ) , in . getBitmapOffsets ( ) ) ; } return ret ; }
copy col group instance with deep copy of column indices but shallow copy of actual contents ;
