/** {@inheritDoc} */ @Override public ResultSet getNewRowsAsResultSet() { if (this.newRow == null) { // first check for UPDATE ops to get the delta if (this.type == Type.BEFORE_UPDATE || this.type == Type.AFTER_UPDATE) { final SerializableDelta delta = getSerializableDelta(); final GemFireContainer container = getContainer(); assert container.isByteArrayStore(); // We ensure that all WAN queues are drained completely before changing // schema in ALTER TABLE (see GemFireContainer.incrementSchemaVersion) // so using getCurrentRowFormatter below is safe. return (this.newRow = new DVDStoreResultSet( delta.getChangedRow(), -1, container.getCurrentRowFormatter(), delta.getChangedColumns(), null)); } Object newVal = getNewValue(); if (newVal != null) { assert getContainer().isByteArrayStore(); assert !(newVal instanceof OffHeapByteSource); if (newVal.getClass() == byte[].class) { // table shape may have changed by the time event is replayed in // AsyncEventListener so use RowFormatter using the row bytes final byte[] row = (byte[]) newVal; return (this.newRow = new RawStoreResultSet(row, getRowFormatter(row))); } else { // table shape may have changed by the time event is replayed in // AsyncEventListener so use RowFormatter using the row bytes final byte[][] row = (byte[][]) newVal; return (this.newRow = new RawStoreResultSet(row, getRowFormatter(row))); } } else { return null; } } return this.newRow; }