*/
private long[] validate() throws SQLException {
int i = 0;
Long scn = connection.getSCN();
PName tenantId = connection.getTenantId();
MetaDataClient client = new MetaDataClient(connection);
long[] timeStamps = new long[this.mutations.size()];
for (Map.Entry<TableRef, Map<ImmutableBytesPtr,Map<PColumn,byte[]>>> entry : mutations.entrySet()) {
TableRef tableRef = entry.getKey();
long serverTimeStamp = tableRef.getTimeStamp();
PTable table = tableRef.getTable();
// If we're auto committing, we've already validated the schema when we got the ColumnResolver,
// so no need to do it again here.
if (!connection.getAutoCommit()) {
MetaDataMutationResult result = client.updateCache(table.getSchemaName().getString(), table.getTableName().getString());
long timestamp = result.getMutationTime();
if (timestamp != QueryConstants.UNSET_TIMESTAMP) {
serverTimeStamp = timestamp;
if (result.wasUpdated()) {
// TODO: use bitset?