if(batches.keySet().size() > 1) throw new SchemaChangeException("Sort currently only supports a single schema.");
if(batches.size() > Character.MAX_VALUE) throw new SchemaChangeException("Sort cannot work on more than %d batches at a time.", (int) Character.MAX_VALUE);
if(batches.keys().size() < 1){
assert false : "Invalid to have an empty set of batches with no schemas.";
}
sv4 = new SelectionVector4(svAllocator.getAllocation(), recordCount, Character.MAX_VALUE);
BatchSchema schema = batches.keySet().iterator().next();
List<RecordBatchData> data = batches.get(schema);
// now we're going to generate the sv4 pointers
switch(schema.getSelectionVectorMode()){