MCPcopy Create free account
hub / github.com/apache/impala / makeSet

Method makeSet

fe/src/main/java/org/apache/impala/util/DisjointSet.java:65–74  ·  view source on GitHub ↗

Registers a new item set with a single item. Returns the new item set. Throws if such an item set already exists.

(T item)

Source from the content-addressed store, hash-verified

63 * Throws if such an item set already exists.
64 */
65 public Set<T> makeSet(T item) {
66 if (itemSets_.containsKey(item)) {
67 throw new IllegalStateException(
68 "Item set for item already exists: " + item.toString());
69 }
70 Set<T> s = Sets.newHashSet(item);
71 itemSets_.put(item, s);
72 uniqueSets_.put(s, DUMMY_VALUE);
73 return s;
74 }
75
76 /**
77 * Merges the two item sets belonging to the members a and b. The merged set contains

Callers 4

testMakeSetMethod · 0.95
testUnionMethod · 0.95
unionMethod · 0.95
bulkUnionMethod · 0.95

Calls 2

putMethod · 0.65
toStringMethod · 0.45

Tested by 2

testMakeSetMethod · 0.76
testUnionMethod · 0.76