public static VoltTable unionTables ( Collection < VoltTable > operands ) { VoltTable result = null ; // Locate the first non-null table to get the schema for ( VoltTable vt : operands ) { if ( vt != null ) { result = new VoltTable ( vt . getTableSchema ( ) ) ; result . setStatusCode ( vt . getStatusCode ( ) ) ; break ; } } if ( result != null ) { result . addTables ( operands ) ; result . resetRowPosition ( ) ; } return result ; }
Utility to aggregate a list of tables sharing a schema . Common for sysprocs to do this to aggregate results .