@Test(expected=IndexColumnIsPartialException.class) public void partialLengthIsInvalid() { validate(createAIS(32, 16)); }
@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()) )); } } } } }
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()) )); } } } } } }
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()) )); } } } } }  }
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); }
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);  }