@Test void testNoMaxInds() throws AlgorithmExecutionException { ColumnIdentifier a1 = new ColumnIdentifier("R", "A1"); ColumnIdentifier a2 = new ColumnIdentifier("R", "A2"); ColumnIdentifier b1 = new ColumnIdentifier("S", "B1"); ColumnIdentifier b2 = new ColumnIdentifier("S", "B2"); TableInputGenerator tableRGenerator = mock(TableInputGenerator.class); TableInputGenerator tableSGenerator = mock(TableInputGenerator.class); RelationalInputGenerator tableR = RelationalInputGeneratorStub.builder() .relationName("R") .columnNames(ImmutableList.of(INDEX_COLUMN, "A1", "A2")) .rows(ImmutableList.of( Row.of("1", "a", "b", "c"), Row.of("2", "d", "e", "f"))) .build(); RelationalInputGenerator tableS = RelationalInputGeneratorStub.builder() .relationName("S") .columnNames(ImmutableList.of(INDEX_COLUMN, "B1", "B2")) .rows(ImmutableList.of( Row.of("1", "a", "e"), Row.of("2", "d", "b"))) .build(); ImmutableSet<InclusionDependency> unaryInds = ImmutableSet.of( toInd(a1, b1), toInd(a2, b2)); ImmutableSet<InclusionDependency> maximumInds = ImmutableSet.of( new InclusionDependency(new ColumnPermutation(a1), new ColumnPermutation(b1)), new InclusionDependency(new ColumnPermutation(a2), new ColumnPermutation(b2))); when(config.getInputGenerators()) .thenReturn(ImmutableList.of(tableRGenerator, tableSGenerator)); when(tableRGenerator.generateNewCopy()).then(in -> tableR.generateNewCopy()); when(tableSGenerator.generateNewCopy()).then(in -> tableS.generateNewCopy()); when(mockDao.getSortedRelationalInput(same(tableRGenerator), any(ColumnIdentifier.class), any(ColumnIdentifier.class), anyString(), anyBoolean())) .then(in -> tableR.generateNewCopy()); when(mockDao.getSortedRelationalInput(same(tableSGenerator), any(ColumnIdentifier.class), any(ColumnIdentifier.class), anyString(), anyBoolean())) .then(in -> tableS.generateNewCopy()); mind2.execute(unaryInds); assertEqualMaxInds(resultReceiver.getReceivedResults(), maximumInds); }
public void execute(ImmutableSet<InclusionDependency> uinds) throws AlgorithmExecutionException { CoordinatesRepository repository = new CoordinatesRepository(config, uinds); IntSet uindIds = repository.storeUindCoordinates(); log.info("Finished calculating UIND coordinates"); Set<IntSet> maxInds = generateMaxInds(repository, uindIds); repository.collectInds(maxInds); }
Mind2 { public void execute(ImmutableSet<InclusionDependency> uinds) throws AlgorithmExecutionException { CoordinatesRepository repository = new CoordinatesRepository(config, uinds); IntSet uindIds = repository.storeUindCoordinates(); log.info("Finished calculating UIND coordinates"); Set<IntSet> maxInds = generateMaxInds(repository, uindIds); repository.collectInds(maxInds); } }
Mind2 { public void execute(ImmutableSet<InclusionDependency> uinds) throws AlgorithmExecutionException { CoordinatesRepository repository = new CoordinatesRepository(config, uinds); IntSet uindIds = repository.storeUindCoordinates(); log.info("Finished calculating UIND coordinates"); Set<IntSet> maxInds = generateMaxInds(repository, uindIds); repository.collectInds(maxInds); } Mind2(Mind2Configuration config); }
Mind2 { public void execute(ImmutableSet<InclusionDependency> uinds) throws AlgorithmExecutionException { CoordinatesRepository repository = new CoordinatesRepository(config, uinds); IntSet uindIds = repository.storeUindCoordinates(); log.info("Finished calculating UIND coordinates"); Set<IntSet> maxInds = generateMaxInds(repository, uindIds); repository.collectInds(maxInds); } Mind2(Mind2Configuration config); void execute(ImmutableSet<InclusionDependency> uinds); }
Mind2 { public void execute(ImmutableSet<InclusionDependency> uinds) throws AlgorithmExecutionException { CoordinatesRepository repository = new CoordinatesRepository(config, uinds); IntSet uindIds = repository.storeUindCoordinates(); log.info("Finished calculating UIND coordinates"); Set<IntSet> maxInds = generateMaxInds(repository, uindIds); repository.collectInds(maxInds); } Mind2(Mind2Configuration config); void execute(ImmutableSet<InclusionDependency> uinds);  }