@Test public void correct() { validate(createAIS(8L, 0)); }
@Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table table : ais.getTables().values()) { for(Column column : table.getColumnsIncludingInternal()) { Long maxStorage = column.getMaxStorageSize(); Long computedMaxStorage = column.computeStorageSize(false); Integer prefix = column.getPrefixSize(); Integer computedPrefix = column.computePrefixSize(); if((maxStorage != null) && !maxStorage.equals(computedMaxStorage)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "maxStorageSize", maxStorage, computedMaxStorage) )); } if((prefix != null) && !prefix.equals(computedPrefix)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "prefixSize", prefix, computedPrefix) )); } } } }
ColumnMaxAndPrefixSizesMatch implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table table : ais.getTables().values()) { for(Column column : table.getColumnsIncludingInternal()) { Long maxStorage = column.getMaxStorageSize(); Long computedMaxStorage = column.computeStorageSize(false); Integer prefix = column.getPrefixSize(); Integer computedPrefix = column.computePrefixSize(); if((maxStorage != null) && !maxStorage.equals(computedMaxStorage)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "maxStorageSize", maxStorage, computedMaxStorage) )); } if((prefix != null) && !prefix.equals(computedPrefix)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "prefixSize", prefix, computedPrefix) )); } } } } }
ColumnMaxAndPrefixSizesMatch implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table table : ais.getTables().values()) { for(Column column : table.getColumnsIncludingInternal()) { Long maxStorage = column.getMaxStorageSize(); Long computedMaxStorage = column.computeStorageSize(false); Integer prefix = column.getPrefixSize(); Integer computedPrefix = column.computePrefixSize(); if((maxStorage != null) && !maxStorage.equals(computedMaxStorage)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "maxStorageSize", maxStorage, computedMaxStorage) )); } if((prefix != null) && !prefix.equals(computedPrefix)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "prefixSize", prefix, computedPrefix) )); } } } }  }
ColumnMaxAndPrefixSizesMatch implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table table : ais.getTables().values()) { for(Column column : table.getColumnsIncludingInternal()) { Long maxStorage = column.getMaxStorageSize(); Long computedMaxStorage = column.computeStorageSize(false); Integer prefix = column.getPrefixSize(); Integer computedPrefix = column.computePrefixSize(); if((maxStorage != null) && !maxStorage.equals(computedMaxStorage)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "maxStorageSize", maxStorage, computedMaxStorage) )); } if((prefix != null) && !prefix.equals(computedPrefix)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "prefixSize", prefix, computedPrefix) )); } } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output); }
ColumnMaxAndPrefixSizesMatch implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table table : ais.getTables().values()) { for(Column column : table.getColumnsIncludingInternal()) { Long maxStorage = column.getMaxStorageSize(); Long computedMaxStorage = column.computeStorageSize(false); Integer prefix = column.getPrefixSize(); Integer computedPrefix = column.computePrefixSize(); if((maxStorage != null) && !maxStorage.equals(computedMaxStorage)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "maxStorageSize", maxStorage, computedMaxStorage) )); } if((prefix != null) && !prefix.equals(computedPrefix)) { output.reportFailure(new AISValidationFailure( new ColumnSizeMismatchException(table.getName(), column.getName(), "prefixSize", prefix, computedPrefix) )); } } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output);  }