class 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())
                        ));
                    }
                }
            }
        }
    }

}