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)
| 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 |