@Test void testTableWithTransitiveInds() throws AlgorithmExecutionException { Attribute attributeA = new Attribute(new ColumnIdentifier(TABLE_NAME, "a"), Range.closed("1", "3")); Attribute attributeB = new Attribute(new ColumnIdentifier(TABLE_NAME, "b"), Range.closed("3", "4")); Attribute attributeC = new Attribute(new ColumnIdentifier(TABLE_NAME, "c"), Range.closed("1", "3")); Attribute attributeD = new Attribute(new ColumnIdentifier(TABLE_NAME, "d"), Range.closed("1", "4")); ImmutableList<Attribute> attributes = ImmutableList.of(attributeA, attributeB, attributeC, attributeD); TableInfo tableInfo = new TableInfo(TABLE_NAME, attributes); InclusionDependency indAC = toInd(attributeA.getColumnIdentifier(), attributeC.getColumnIdentifier()); InclusionDependency indAD = toInd(attributeA.getColumnIdentifier(), attributeD.getColumnIdentifier()); InclusionDependency indCA = toInd(attributeC.getColumnIdentifier(), attributeA.getColumnIdentifier()); InclusionDependency indCD = toInd(attributeC.getColumnIdentifier(), attributeD.getColumnIdentifier()); InclusionDependency indBD = toInd(attributeB.getColumnIdentifier(), attributeD.getColumnIdentifier()); ImmutableSet<InclusionDependency> validInds = ImmutableSet.of(indAC, indAD, indCA, indCD, indBD); when(dataAccessObject.isValidUIND(any(InclusionDependency.class))) .thenAnswer(invocation -> validInds.contains(invocation.<InclusionDependency>getArgument(0))); when(dataAccessObject.getTableInfo(TABLE_NAME)).thenReturn(tableInfo); bellBrockhausen.execute(); assertThat(resultReceiver.getReceivedResults()).containsExactlyInAnyOrder(toArray(validInds)); }
public void execute() throws AlgorithmExecutionException { ImmutableSet<Attribute> attributes = collectAttributes(); Set<Attribute> candidates = generateCandidates(attributes); IndCandidates indCandidates = new IndCandidates( configuration.getResultReceiver(), dataAccessObject, ImmutableList.copyOf(candidates)); indCandidates.testCandidates(); indCandidates.printStats(); }
BellBrockhausen { public void execute() throws AlgorithmExecutionException { ImmutableSet<Attribute> attributes = collectAttributes(); Set<Attribute> candidates = generateCandidates(attributes); IndCandidates indCandidates = new IndCandidates( configuration.getResultReceiver(), dataAccessObject, ImmutableList.copyOf(candidates)); indCandidates.testCandidates(); indCandidates.printStats(); } }
BellBrockhausen { public void execute() throws AlgorithmExecutionException { ImmutableSet<Attribute> attributes = collectAttributes(); Set<Attribute> candidates = generateCandidates(attributes); IndCandidates indCandidates = new IndCandidates( configuration.getResultReceiver(), dataAccessObject, ImmutableList.copyOf(candidates)); indCandidates.testCandidates(); indCandidates.printStats(); } BellBrockhausen(BellBrockhausenConfiguration configuration, DataAccessObject dataAccessObject); }
BellBrockhausen { public void execute() throws AlgorithmExecutionException { ImmutableSet<Attribute> attributes = collectAttributes(); Set<Attribute> candidates = generateCandidates(attributes); IndCandidates indCandidates = new IndCandidates( configuration.getResultReceiver(), dataAccessObject, ImmutableList.copyOf(candidates)); indCandidates.testCandidates(); indCandidates.printStats(); } BellBrockhausen(BellBrockhausenConfiguration configuration, DataAccessObject dataAccessObject); void execute(); }
BellBrockhausen { public void execute() throws AlgorithmExecutionException { ImmutableSet<Attribute> attributes = collectAttributes(); Set<Attribute> candidates = generateCandidates(attributes); IndCandidates indCandidates = new IndCandidates( configuration.getResultReceiver(), dataAccessObject, ImmutableList.copyOf(candidates)); indCandidates.testCandidates(); indCandidates.printStats(); } BellBrockhausen(BellBrockhausenConfiguration configuration, DataAccessObject dataAccessObject); void execute();  }