public static Pair < Object [ ] , AdHocPlannedStatement [ ] > decodeSerializedBatchData ( byte [ ] serializedBatchData ) { // Collections must be the same size since they all contain slices of the same data. assert ( serializedBatchData != null ) ; ByteBuffer buf = ByteBuffer . wrap ( serializedBatchData ) ; AdHocPlannedStatement [ ] statements = null ; Object [ ] userparams = null ; try { userparams = AdHocPlannedStmtBatch . userParamsFromBuffer ( buf ) ; statements = AdHocPlannedStmtBatch . planArrayFromBuffer ( buf ) ; } catch ( IOException e ) { throw new VoltAbortException ( e ) ; } return new Pair < Object [ ] , AdHocPlannedStatement [ ] > ( userparams , statements ) ; }
Decode binary data into structures needed to process adhoc queries . This code was pulled out of runAdHoc so it could be shared there and with adHocSQLStringFromPlannedStatement .