@Test public void testIntersectSameInstance() { Schema schemaA = new Schema(new HashSet<>()); Schema intersection = schemaA.intersect(schemaA); Assert.assertSame(schemaA, intersection); }
public Schema intersect(Schema other) { if (this != other) { Set<KeyspaceTablePair> intersection = Sets.intersection(this.qualifiedTables, other.qualifiedTables); return new Schema(intersection); } return this; }
Schema { public Schema intersect(Schema other) { if (this != other) { Set<KeyspaceTablePair> intersection = Sets.intersection(this.qualifiedTables, other.qualifiedTables); return new Schema(intersection); } return this; } }
Schema { public Schema intersect(Schema other) { if (this != other) { Set<KeyspaceTablePair> intersection = Sets.intersection(this.qualifiedTables, other.qualifiedTables); return new Schema(intersection); } return this; } Schema(Metadata metadata, JobConfiguration configuration);  Schema(Set<KeyspaceTablePair> qualifiedTables); }
Schema { public Schema intersect(Schema other) { if (this != other) { Set<KeyspaceTablePair> intersection = Sets.intersection(this.qualifiedTables, other.qualifiedTables); return new Schema(intersection); } return this; } Schema(Metadata metadata, JobConfiguration configuration);  Schema(Set<KeyspaceTablePair> qualifiedTables); Schema intersect(Schema other); List<KeyspaceTablePair> toQualifiedTableList(); int size(); @VisibleForTesting static Set<String> getKeyspaceFilter(JobConfiguration configuration); static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second); }
Schema { public Schema intersect(Schema other) { if (this != other) { Set<KeyspaceTablePair> intersection = Sets.intersection(this.qualifiedTables, other.qualifiedTables); return new Schema(intersection); } return this; } Schema(Metadata metadata, JobConfiguration configuration);  Schema(Set<KeyspaceTablePair> qualifiedTables); Schema intersect(Schema other); List<KeyspaceTablePair> toQualifiedTableList(); int size(); @VisibleForTesting static Set<String> getKeyspaceFilter(JobConfiguration configuration); static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second);  }