MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / openHeapFile

Method openHeapFile

src/java/simpledb/common/Utility.java:134–140  ·  view source on GitHub ↗

Opens a HeapFile and adds it to the catalog. @param cols number of columns in the table. @param f location of the file storing the table. @return the opened table.

(int cols, File f)

Source from the content-addressed store, hash-verified

132 * @return the opened table.
133 */
134 public static HeapFile openHeapFile(int cols, File f) {
135 // create the HeapFile and add it to the catalog
136 TupleDesc td = getTupleDesc(cols);
137 HeapFile hf = new HeapFile(f, td);
138 Database.getCatalog().addTable(hf, UUID.randomUUID().toString());
139 return hf;
140 }
141
142 public static HeapFile openHeapFile(int cols, String colPrefix, File f, TupleDesc td) {
143 // create the HeapFile and add it to the catalog

Callers 8

validatePredicateMethod · 0.95
crashMethod · 0.95
createRandomHeapFileMethod · 0.95
mainMethod · 0.95
convertMethod · 0.95
createEmptyHeapFileMethod · 0.95

Calls 4

getTupleDescMethod · 0.95
getCatalogMethod · 0.95
toStringMethod · 0.65
addTableMethod · 0.45

Tested by 5

validatePredicateMethod · 0.76
crashMethod · 0.76
createRandomHeapFileMethod · 0.76