@Test public void testValidJoins() { Assert.assertEquals(0, builder.akibanInformationSchema().validate(validations).failures().size()); }
@Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { Set<Table> childTables = new HashSet<>(); for (Join join : ais.getJoins().values()) { if (childTables.contains(join.getChild())) { output.reportFailure(new AISValidationFailure ( new JoinToMultipleParentsException (join.getChild().getName()))); } else { childTables.add(join.getChild()); } } }
JoinToOneParent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { Set<Table> childTables = new HashSet<>(); for (Join join : ais.getJoins().values()) { if (childTables.contains(join.getChild())) { output.reportFailure(new AISValidationFailure ( new JoinToMultipleParentsException (join.getChild().getName()))); } else { childTables.add(join.getChild()); } } } }
JoinToOneParent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { Set<Table> childTables = new HashSet<>(); for (Join join : ais.getJoins().values()) { if (childTables.contains(join.getChild())) { output.reportFailure(new AISValidationFailure ( new JoinToMultipleParentsException (join.getChild().getName()))); } else { childTables.add(join.getChild()); } } }  }
JoinToOneParent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { Set<Table> childTables = new HashSet<>(); for (Join join : ais.getJoins().values()) { if (childTables.contains(join.getChild())) { output.reportFailure(new AISValidationFailure ( new JoinToMultipleParentsException (join.getChild().getName()))); } else { childTables.add(join.getChild()); } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output); }
JoinToOneParent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { Set<Table> childTables = new HashSet<>(); for (Join join : ais.getJoins().values()) { if (childTables.contains(join.getChild())) { output.reportFailure(new AISValidationFailure ( new JoinToMultipleParentsException (join.getChild().getName()))); } else { childTables.add(join.getChild()); } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output);  }