IndexColumnIsNotPartial implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table table : ais.getTables().values()) { for(Index index : table.getIndexesIncludingInternal()) { for(IndexColumn indexColumn : index.getKeyColumns()) { if(indexColumn.getIndexedLength() != null) { output.reportFailure(new AISValidationFailure( new IndexColumnIsPartialException(table.getName(), index.getIndexName().getName(), indexColumn.getPosition()) )); } } } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output);  }
@Test public void nullIndexedLengthIsValid() { validate(createAIS(32, null)); }
@Test(expected=IndexColumnIsPartialException.class) public void fullLengthIsInvalid() { validate(createAIS(32, 32)); }
@Test(expected=IndexColumnIsPartialException.class) public void partialLengthIsInvalid() { validate(createAIS(32, 16)); }