├── README.md ├── about.md ├── pdf ├── 01-introduction.pdf ├── 02-advancedsql.pdf ├── 03-storage1.pdf ├── 04-storage2.pdf ├── 05-bufferpool.pdf ├── 06-hashtables.pdf ├── 07-trees1.pdf ├── 08-trees2.pdf ├── 09-indexconcurrency.pdf ├── 10-queryprocessing.pdf ├── 11-sorting.pdf ├── 12-joins.pdf ├── 13-optimization.pdf ├── 14-parallel.pdf ├── 15-embeddedlogic.pdf ├── 16-concurrencycontrol.pdf ├── 17-twophaselocking.pdf ├── 18-timestampordering.pdf ├── 19-multiversioning.pdf ├── 20-logging.pdf ├── 21-recovery.pdf ├── 22-distributedoltp1.pdf ├── 23-distributedoltp2.pdf ├── 24-distributedolap.pdf ├── 26-potpourri.pdf └── picture │ └── ToyDB.png └── simple-db ├── .idea ├── dictionaries │ ├── robot.xml │ └── root.xml ├── inspectionProfiles │ └── Project_Default.xml ├── libraries │ └── jline_jar.xml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── bin ├── depcache │ └── dependencies.txt ├── src │ └── simpledb │ │ ├── AbstractDbFileIterator.class │ │ ├── Aggregate.class │ │ ├── Aggregator$Op.class │ │ ├── Aggregator.class │ │ ├── BTreeChecker$SubtreeSummary.class │ │ ├── BTreeChecker.class │ │ ├── BTreeEntry.class │ │ ├── BTreeFile.class │ │ ├── BTreeFileEncoder$EntryComparator.class │ │ ├── BTreeFileEncoder$ReverseEntryComparator.class │ │ ├── BTreeFileEncoder$TupleComparator.class │ │ ├── BTreeFileEncoder.class │ │ ├── BTreeFileIterator.class │ │ ├── BTreeHeaderPage.class │ │ ├── BTreeInternalPage.class │ │ ├── BTreeInternalPageIterator.class │ │ ├── BTreeInternalPageReverseIterator.class │ │ ├── BTreeLeafPage.class │ │ ├── BTreeLeafPageIterator.class │ │ ├── BTreeLeafPageReverseIterator.class │ │ ├── BTreePage.class │ │ ├── BTreePageId.class │ │ ├── BTreeRootPtrPage.class │ │ ├── BTreeScan.class │ │ ├── BTreeSearchIterator.class │ │ ├── BTreeUtility$BTreeDeleter.class │ │ ├── BTreeUtility$BTreeInserter.class │ │ ├── BTreeUtility$BTreeReader.class │ │ ├── BTreeUtility$BTreeWriter.class │ │ ├── BTreeUtility.class │ │ ├── BufferPool$Lock.class │ │ ├── BufferPool$LockManager.class │ │ ├── BufferPool.class │ │ ├── Catalog$Table.class │ │ ├── Catalog.class │ │ ├── CostCard.class │ │ ├── Database.class │ │ ├── DbException.class │ │ ├── DbFile.class │ │ ├── DbFileIterator.class │ │ ├── DeadlockException.class │ │ ├── Debug.class │ │ ├── Delete.class │ │ ├── Field.class │ │ ├── Filter.class │ │ ├── HashEquiJoin.class │ │ ├── HeapFile$MyDbFileIterator.class │ │ ├── HeapFile.class │ │ ├── HeapFileEncoder.class │ │ ├── HeapPage$HeapPageIterator.class │ │ ├── HeapPage.class │ │ ├── HeapPageId.class │ │ ├── IndexOpIterator.class │ │ ├── IndexPredicate.class │ │ ├── Insert.class │ │ ├── IntField$1.class │ │ ├── IntField.class │ │ ├── IntHistogram$1.class │ │ ├── IntHistogram.class │ │ ├── IntegerAggregator$1.class │ │ ├── IntegerAggregator.class │ │ ├── Join.class │ │ ├── JoinOptimizer$1.class │ │ ├── JoinOptimizer.class │ │ ├── JoinPredicate.class │ │ ├── LogFile.class │ │ ├── LogicalFilterNode.class │ │ ├── LogicalJoinNode.class │ │ ├── LogicalPlan.class │ │ ├── LogicalScanNode.class │ │ ├── LogicalSelectListNode.class │ │ ├── LogicalSubplanJoinNode.class │ │ ├── OpIterator.class │ │ ├── Operator.class │ │ ├── OperatorCardinality.class │ │ ├── OrderBy.class │ │ ├── Page.class │ │ ├── PageId.class │ │ ├── Parser.class │ │ ├── ParsingException.class │ │ ├── Permissions.class │ │ ├── PlanCache.class │ │ ├── Predicate$Op.class │ │ ├── Predicate.class │ │ ├── Project.class │ │ ├── Query.class │ │ ├── QueryPlanVisualizer$SubTreeDescriptor.class │ │ ├── QueryPlanVisualizer.class │ │ ├── RecordId.class │ │ ├── SeqScan.class │ │ ├── SimpleDb.class │ │ ├── StringAggregator.class │ │ ├── StringField$1.class │ │ ├── StringField.class │ │ ├── StringHistogram.class │ │ ├── TableStats.class │ │ ├── Transaction.class │ │ ├── TransactionAbortedException.class │ │ ├── TransactionId.class │ │ ├── Tuple.class │ │ ├── TupleArrayIterator.class │ │ ├── TupleComparator.class │ │ ├── TupleDesc$TDItem.class │ │ ├── TupleDesc.class │ │ ├── TupleIterator.class │ │ ├── Type$1.class │ │ ├── Type$2.class │ │ ├── Type.class │ │ └── Utility.class └── test │ └── simpledb │ ├── AggregateTest.class │ ├── BTreeDeadlockTest.class │ ├── BTreeFileDeleteTest.class │ ├── BTreeFileInsertTest.class │ ├── BTreeFileReadTest.class │ ├── BTreeHeaderPageTest.class │ ├── BTreeInternalPageTest.class │ ├── BTreeLeafPageTest.class │ ├── BTreeNextKeyLockingTest.class │ ├── BTreePageIdTest.class │ ├── BTreeRootPtrPageTest.class │ ├── BufferPoolWriteTest$HeapFileDuplicates.class │ ├── BufferPoolWriteTest.class │ ├── CatalogTest.class │ ├── DeadlockTest.class │ ├── FilterTest.class │ ├── HeapFileReadTest.class │ ├── HeapFileWriteTest.class │ ├── HeapPageIdTest.class │ ├── HeapPageReadTest.class │ ├── HeapPageWriteTest.class │ ├── InsertTest.class │ ├── IntHistogramTest.class │ ├── IntegerAggregatorTest.class │ ├── JoinOptimizerTest.class │ ├── JoinPredicateTest.class │ ├── JoinTest.class │ ├── LockingTest.class │ ├── PredicateTest.class │ ├── RecordIdTest.class │ ├── StringAggregatorTest.class │ ├── TableStatsTest.class │ ├── TestUtil$CreateHeapFile.class │ ├── TestUtil$LockGrabber.class │ ├── TestUtil$MockScan.class │ ├── TestUtil$SkeletonFile.class │ ├── TestUtil.class │ ├── TransactionTest.class │ ├── TupleDescTest.class │ ├── TupleTest.class │ └── systemtest │ ├── AbortEvictionTest.class │ ├── AggregateTest$1.class │ ├── AggregateTest.class │ ├── BTreeFileDeleteTest.class │ ├── BTreeFileInsertTest.class │ ├── BTreeScanTest$InstrumentedBTreeFile.class │ ├── BTreeScanTest$TupleComparator.class │ ├── BTreeScanTest.class │ ├── BTreeTest.class │ ├── DeleteTest.class │ ├── EvictionTest.class │ ├── FilterBase.class │ ├── FilterTest.class │ ├── InsertTest.class │ ├── JoinTest.class │ ├── LogTest.class │ ├── QueryTest.class │ ├── ScanTest$1InstrumentedHeapFile.class │ ├── ScanTest.class │ ├── SimpleDbTestBase.class │ ├── SystemTestUtil.class │ ├── TransactionTest$ModifiableCyclicBarrier$UpdateLatch.class │ ├── TransactionTest$ModifiableCyclicBarrier.class │ ├── TransactionTest$XactionTester.class │ └── TransactionTest.class ├── build.xml ├── lib ├── README ├── ant-contrib-1.0b3.jar ├── jline-0.9.94.jar ├── junit-4.5.jar └── zql.jar ├── log ├── out ├── production │ └── simple-db │ │ └── simpledb │ │ ├── AbstractDbFileIterator.class │ │ ├── Aggregate.class │ │ ├── Aggregator$Op.class │ │ ├── Aggregator.class │ │ ├── BTreeChecker$SubtreeSummary.class │ │ ├── BTreeChecker.class │ │ ├── BTreeEntry.class │ │ ├── BTreeFile.class │ │ ├── BTreeFileEncoder$EntryComparator.class │ │ ├── BTreeFileEncoder$ReverseEntryComparator.class │ │ ├── BTreeFileEncoder$TupleComparator.class │ │ ├── BTreeFileEncoder.class │ │ ├── BTreeFileIterator.class │ │ ├── BTreeHeaderPage.class │ │ ├── BTreeInternalPage.class │ │ ├── BTreeInternalPageIterator.class │ │ ├── BTreeInternalPageReverseIterator.class │ │ ├── BTreeLeafPage.class │ │ ├── BTreeLeafPageIterator.class │ │ ├── BTreeLeafPageReverseIterator.class │ │ ├── BTreePage.class │ │ ├── BTreePageId.class │ │ ├── BTreeRootPtrPage.class │ │ ├── BTreeScan.class │ │ ├── BTreeSearchIterator.class │ │ ├── BTreeUtility$BTreeDeleter.class │ │ ├── BTreeUtility$BTreeInserter.class │ │ ├── BTreeUtility$BTreeReader.class │ │ ├── BTreeUtility$BTreeWriter.class │ │ ├── BTreeUtility.class │ │ ├── BufferPool$Lock.class │ │ ├── BufferPool$LockManager.class │ │ ├── BufferPool.class │ │ ├── Catalog$Table.class │ │ ├── Catalog.class │ │ ├── CostCard.class │ │ ├── Database.class │ │ ├── DbException.class │ │ ├── DbFile.class │ │ ├── DbFileIterator.class │ │ ├── DeadlockException.class │ │ ├── Debug.class │ │ ├── Delete.class │ │ ├── Field.class │ │ ├── Filter.class │ │ ├── HashEquiJoin.class │ │ ├── HeapFile$MyDbFileIterator.class │ │ ├── HeapFile.class │ │ ├── HeapFileEncoder.class │ │ ├── HeapPage$HeapPageIterator.class │ │ ├── HeapPage.class │ │ ├── HeapPageId.class │ │ ├── IndexOpIterator.class │ │ ├── IndexPredicate.class │ │ ├── Insert.class │ │ ├── IntField$1.class │ │ ├── IntField.class │ │ ├── IntHistogram$1.class │ │ ├── IntHistogram.class │ │ ├── IntegerAggregator$1.class │ │ ├── IntegerAggregator.class │ │ ├── Join.class │ │ ├── JoinOptimizer$1.class │ │ ├── JoinOptimizer.class │ │ ├── JoinPredicate.class │ │ ├── LogFile.class │ │ ├── LogicalFilterNode.class │ │ ├── LogicalJoinNode.class │ │ ├── LogicalPlan.class │ │ ├── LogicalScanNode.class │ │ ├── LogicalSelectListNode.class │ │ ├── LogicalSubplanJoinNode.class │ │ ├── OpIterator.class │ │ ├── Operator.class │ │ ├── OperatorCardinality.class │ │ ├── OrderBy.class │ │ ├── Page.class │ │ ├── PageId.class │ │ ├── Parser.class │ │ ├── ParsingException.class │ │ ├── Permissions.class │ │ ├── PlanCache.class │ │ ├── Predicate$Op.class │ │ ├── Predicate.class │ │ ├── Project.class │ │ ├── Query.class │ │ ├── QueryPlanVisualizer$SubTreeDescriptor.class │ │ ├── QueryPlanVisualizer.class │ │ ├── RecordId.class │ │ ├── SeqScan.class │ │ ├── SimpleDb.class │ │ ├── StringAggregator.class │ │ ├── StringField$1.class │ │ ├── StringField.class │ │ ├── StringHistogram.class │ │ ├── TableStats.class │ │ ├── Transaction.class │ │ ├── TransactionAbortedException.class │ │ ├── TransactionId.class │ │ ├── Tuple.class │ │ ├── TupleArrayIterator.class │ │ ├── TupleComparator.class │ │ ├── TupleDesc$TDItem.class │ │ ├── TupleDesc.class │ │ ├── TupleIterator.class │ │ ├── Type$1.class │ │ ├── Type$2.class │ │ ├── Type.class │ │ └── Utility.class └── test │ └── simple-db │ └── simpledb │ ├── AggregateTest.class │ ├── BTreeDeadlockTest.class │ ├── BTreeFileDeleteTest.class │ ├── BTreeFileInsertTest.class │ ├── BTreeFileReadTest.class │ ├── BTreeHeaderPageTest.class │ ├── BTreeInternalPageTest.class │ ├── BTreeLeafPageTest.class │ ├── BTreeNextKeyLockingTest.class │ ├── BTreePageIdTest.class │ ├── BTreeRootPtrPageTest.class │ ├── BufferPoolWriteTest$HeapFileDuplicates.class │ ├── BufferPoolWriteTest.class │ ├── CatalogTest.class │ ├── DeadlockTest.class │ ├── FilterTest.class │ ├── HeapFileReadTest.class │ ├── HeapFileWriteTest.class │ ├── HeapPageIdTest.class │ ├── HeapPageReadTest.class │ ├── HeapPageWriteTest.class │ ├── InsertTest.class │ ├── IntHistogramTest.class │ ├── IntegerAggregatorTest.class │ ├── JoinOptimizerTest.class │ ├── JoinPredicateTest.class │ ├── JoinTest.class │ ├── LockingTest.class │ ├── PredicateTest.class │ ├── RecordIdTest.class │ ├── StringAggregatorTest.class │ ├── TableStatsTest.class │ ├── TestUtil$CreateHeapFile.class │ ├── TestUtil$LockGrabber.class │ ├── TestUtil$MockScan.class │ ├── TestUtil$SkeletonFile.class │ ├── TestUtil.class │ ├── TransactionTest.class │ ├── TupleDescTest.class │ ├── TupleTest.class │ └── systemtest │ ├── AbortEvictionTest.class │ ├── AggregateTest$1.class │ ├── AggregateTest.class │ ├── BTreeFileDeleteTest.class │ ├── BTreeFileInsertTest.class │ ├── BTreeScanTest$InstrumentedBTreeFile.class │ ├── BTreeScanTest$TupleComparator.class │ ├── BTreeScanTest.class │ ├── BTreeTest.class │ ├── DeleteTest.class │ ├── EvictionTest.class │ ├── FilterBase.class │ ├── FilterTest.class │ ├── InsertTest.class │ ├── JoinTest.class │ ├── LogTest.class │ ├── QueryTest.class │ ├── ScanTest$1InstrumentedHeapFile.class │ ├── ScanTest.class │ ├── SimpleDbTestBase.class │ ├── SystemTestUtil.class │ ├── TransactionTest$ModifiableCyclicBarrier$UpdateLatch.class │ ├── TransactionTest$ModifiableCyclicBarrier.class │ ├── TransactionTest$XactionTester.class │ └── TransactionTest.class ├── simple-db.iml ├── simple1.db ├── simple2.db ├── some_data.txt ├── src └── simpledb │ ├── AbstractDbFileIterator.java │ ├── Aggregate.java │ ├── Aggregator.java │ ├── BTreeChecker.java │ ├── BTreeEntry.java │ ├── BTreeFile.java │ ├── BTreeFileEncoder.java │ ├── BTreeHeaderPage.java │ ├── BTreeInternalPage.java │ ├── BTreeLeafPage.java │ ├── BTreePage.java │ ├── BTreePageId.java │ ├── BTreeRootPtrPage.java │ ├── BTreeScan.java │ ├── BTreeUtility.java │ ├── BufferPool.java │ ├── Catalog.java │ ├── CostCard.java │ ├── Database.java │ ├── DbException.java │ ├── DbFile.java │ ├── DbFileIterator.java │ ├── DeadlockException.java │ ├── Debug.java │ ├── Delete.java │ ├── Field.java │ ├── Filter.java │ ├── HashEquiJoin.java │ ├── HeapFile.java │ ├── HeapFileEncoder.java │ ├── HeapPage.java │ ├── HeapPageId.java │ ├── IndexOpIterator.java │ ├── IndexPredicate.java │ ├── Insert.java │ ├── IntField.java │ ├── IntHistogram.java │ ├── IntegerAggregator.java │ ├── Join.java │ ├── JoinOptimizer.java │ ├── JoinPredicate.java │ ├── LogFile.java │ ├── LogicalFilterNode.java │ ├── LogicalJoinNode.java │ ├── LogicalPlan.java │ ├── LogicalScanNode.java │ ├── LogicalSelectListNode.java │ ├── LogicalSubplanJoinNode.java │ ├── OpIterator.java │ ├── Operator.java │ ├── OperatorCardinality.java │ ├── OrderBy.java │ ├── Page.java │ ├── PageId.java │ ├── Parser.java │ ├── ParsingException.java │ ├── Permissions.java │ ├── PlanCache.java │ ├── Predicate.java │ ├── Project.java │ ├── Query.java │ ├── QueryPlanVisualizer.java │ ├── RecordId.java │ ├── SeqScan.java │ ├── SimpleDb.java │ ├── StringAggregator.java │ ├── StringField.java │ ├── StringHistogram.java │ ├── TableStats.java │ ├── Transaction.java │ ├── TransactionAbortedException.java │ ├── TransactionId.java │ ├── Tuple.java │ ├── TupleDesc.java │ ├── TupleIterator.java │ ├── Type.java │ └── Utility.java └── test └── simpledb ├── AggregateTest.java ├── BTreeDeadlockTest.java ├── BTreeFileDeleteTest.java ├── BTreeFileInsertTest.java ├── BTreeFileReadTest.java ├── BTreeHeaderPageTest.java ├── BTreeInternalPageTest.java ├── BTreeLeafPageTest.java ├── BTreeNextKeyLockingTest.java ├── BTreePageIdTest.java ├── BTreeRootPtrPageTest.java ├── BufferPoolWriteTest.java ├── CatalogTest.java ├── DeadlockTest.java ├── FilterTest.java ├── HeapFileReadTest.java ├── HeapFileWriteTest.java ├── HeapPageIdTest.java ├── HeapPageReadTest.java ├── HeapPageWriteTest.java ├── InsertTest.java ├── IntHistogramTest.java ├── IntegerAggregatorTest.java ├── JoinOptimizerTest.java ├── JoinPredicateTest.java ├── JoinTest.java ├── LockingTest.java ├── PredicateTest.java ├── RecordIdTest.java ├── StringAggregatorTest.java ├── TableStatsTest.java ├── TestUtil.java ├── TransactionTest.java ├── TupleDescTest.java ├── TupleTest.java └── systemtest ├── AbortEvictionTest.java ├── AggregateTest.java ├── BTreeFileDeleteTest.java ├── BTreeFileInsertTest.java ├── BTreeScanTest.java ├── BTreeTest.java ├── DeleteTest.java ├── EvictionTest.java ├── FilterBase.java ├── FilterTest.java ├── InsertTest.java ├── JoinTest.java ├── LogTest.java ├── QueryTest.java ├── ScanTest.java ├── SimpleDbTestBase.java ├── SystemTestUtil.java └── TransactionTest.java /README.md: -------------------------------------------------------------------------------- 1 | ## ToyDB 2 | 3 | 基于Mit6.830和cmu15445。 4 | 5 | ------ 6 | 7 | **1. ToyDB框架图** 8 | 9 | ![](https://github.com/DreaMer963/ToyDB/blob/master/pdf/picture/ToyDB.png) 10 | 11 | **2. 主要流程** 12 | 13 | - Parser -> Logical plan -> Physical plan -> Optimizer -> Execute plan 14 | 15 | **3**. 更多的细节在 **about.md** 中 16 | 17 | 18 | # 不再更新,很垃圾的一个项目。。。 19 | -------------------------------------------------------------------------------- /pdf/01-introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/01-introduction.pdf -------------------------------------------------------------------------------- /pdf/02-advancedsql.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/02-advancedsql.pdf -------------------------------------------------------------------------------- /pdf/03-storage1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/03-storage1.pdf -------------------------------------------------------------------------------- /pdf/04-storage2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/04-storage2.pdf -------------------------------------------------------------------------------- /pdf/05-bufferpool.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/05-bufferpool.pdf -------------------------------------------------------------------------------- /pdf/06-hashtables.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/06-hashtables.pdf -------------------------------------------------------------------------------- /pdf/07-trees1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/07-trees1.pdf -------------------------------------------------------------------------------- /pdf/08-trees2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/08-trees2.pdf -------------------------------------------------------------------------------- /pdf/09-indexconcurrency.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/09-indexconcurrency.pdf -------------------------------------------------------------------------------- /pdf/10-queryprocessing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/10-queryprocessing.pdf -------------------------------------------------------------------------------- /pdf/11-sorting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/11-sorting.pdf -------------------------------------------------------------------------------- /pdf/12-joins.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/12-joins.pdf -------------------------------------------------------------------------------- /pdf/13-optimization.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/13-optimization.pdf -------------------------------------------------------------------------------- /pdf/14-parallel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/14-parallel.pdf -------------------------------------------------------------------------------- /pdf/15-embeddedlogic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/15-embeddedlogic.pdf -------------------------------------------------------------------------------- /pdf/16-concurrencycontrol.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/16-concurrencycontrol.pdf -------------------------------------------------------------------------------- /pdf/17-twophaselocking.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/17-twophaselocking.pdf -------------------------------------------------------------------------------- /pdf/18-timestampordering.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/18-timestampordering.pdf -------------------------------------------------------------------------------- /pdf/19-multiversioning.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/19-multiversioning.pdf -------------------------------------------------------------------------------- /pdf/20-logging.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/20-logging.pdf -------------------------------------------------------------------------------- /pdf/21-recovery.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/21-recovery.pdf -------------------------------------------------------------------------------- /pdf/22-distributedoltp1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/22-distributedoltp1.pdf -------------------------------------------------------------------------------- /pdf/23-distributedoltp2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/23-distributedoltp2.pdf -------------------------------------------------------------------------------- /pdf/24-distributedolap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/24-distributedolap.pdf -------------------------------------------------------------------------------- /pdf/26-potpourri.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/26-potpourri.pdf -------------------------------------------------------------------------------- /pdf/picture/ToyDB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/pdf/picture/ToyDB.png -------------------------------------------------------------------------------- /simple-db/.idea/dictionaries/robot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | gbfield 5 | gbfieldtype 6 | histogrammed 7 | npages 8 | ntups 9 | subplan 10 | subplans 11 | subquery 12 | tablename 13 | 14 | 15 | -------------------------------------------------------------------------------- /simple-db/.idea/dictionaries/root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | pkey 5 | succ 6 | tableid 7 | tyep 8 | 9 | 10 | -------------------------------------------------------------------------------- /simple-db/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /simple-db/.idea/libraries/jline_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simple-db/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /simple-db/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /simple-db/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/AbstractDbFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/AbstractDbFileIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Aggregate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Aggregate.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Aggregator$Op.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Aggregator$Op.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Aggregator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Aggregator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeChecker$SubtreeSummary.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeChecker$SubtreeSummary.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeChecker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeChecker.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeEntry.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeEntry.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeFile.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeFileEncoder$EntryComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeFileEncoder$EntryComparator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeFileEncoder$ReverseEntryComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeFileEncoder$ReverseEntryComparator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeFileEncoder$TupleComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeFileEncoder$TupleComparator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeFileEncoder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeFileEncoder.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeFileIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeHeaderPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeHeaderPage.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeInternalPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeInternalPage.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeInternalPageIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeInternalPageIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeInternalPageReverseIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeInternalPageReverseIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeLeafPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeLeafPage.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeLeafPageIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeLeafPageIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeLeafPageReverseIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeLeafPageReverseIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreePage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreePage.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreePageId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreePageId.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeRootPtrPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeRootPtrPage.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeScan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeScan.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeSearchIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeSearchIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeUtility$BTreeDeleter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeUtility$BTreeDeleter.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeUtility$BTreeInserter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeUtility$BTreeInserter.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeUtility$BTreeReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeUtility$BTreeReader.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeUtility$BTreeWriter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeUtility$BTreeWriter.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BTreeUtility.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BTreeUtility.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BufferPool$Lock.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BufferPool$Lock.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BufferPool$LockManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BufferPool$LockManager.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/BufferPool.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/BufferPool.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Catalog$Table.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Catalog$Table.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Catalog.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Catalog.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/CostCard.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/CostCard.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Database.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Database.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/DbException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/DbException.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/DbFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/DbFile.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/DbFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/DbFileIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/DeadlockException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/DeadlockException.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Debug.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Debug.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Delete.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Delete.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Field.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Field.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Filter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Filter.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HashEquiJoin.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HashEquiJoin.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HeapFile$MyDbFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HeapFile$MyDbFileIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HeapFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HeapFile.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HeapFileEncoder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HeapFileEncoder.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HeapPage$HeapPageIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HeapPage$HeapPageIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HeapPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HeapPage.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/HeapPageId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/HeapPageId.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IndexOpIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IndexOpIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IndexPredicate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IndexPredicate.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Insert.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Insert.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IntField$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IntField$1.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IntField.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IntField.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IntHistogram$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IntHistogram$1.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IntHistogram.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IntHistogram.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IntegerAggregator$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IntegerAggregator$1.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/IntegerAggregator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/IntegerAggregator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Join.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Join.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/JoinOptimizer$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/JoinOptimizer$1.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/JoinOptimizer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/JoinOptimizer.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/JoinPredicate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/JoinPredicate.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogFile.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogicalFilterNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogicalFilterNode.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogicalJoinNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogicalJoinNode.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogicalPlan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogicalPlan.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogicalScanNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogicalScanNode.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogicalSelectListNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogicalSelectListNode.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/LogicalSubplanJoinNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/LogicalSubplanJoinNode.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/OpIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/OpIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Operator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Operator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/OperatorCardinality.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/OperatorCardinality.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/OrderBy.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/OrderBy.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Page.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Page.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/PageId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/PageId.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Parser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Parser.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/ParsingException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/ParsingException.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Permissions.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Permissions.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/PlanCache.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/PlanCache.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Predicate$Op.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Predicate$Op.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Predicate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Predicate.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Project.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Project.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Query.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Query.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/QueryPlanVisualizer$SubTreeDescriptor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/QueryPlanVisualizer$SubTreeDescriptor.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/QueryPlanVisualizer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/QueryPlanVisualizer.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/RecordId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/RecordId.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/SeqScan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/SeqScan.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/SimpleDb.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/SimpleDb.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/StringAggregator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/StringAggregator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/StringField$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/StringField$1.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/StringField.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/StringField.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/StringHistogram.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/StringHistogram.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TableStats.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TableStats.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Transaction.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Transaction.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TransactionAbortedException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TransactionAbortedException.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TransactionId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TransactionId.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Tuple.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Tuple.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TupleArrayIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TupleArrayIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TupleComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TupleComparator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TupleDesc$TDItem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TupleDesc$TDItem.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TupleDesc.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TupleDesc.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/TupleIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/TupleIterator.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Type$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Type$1.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Type$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Type$2.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Type.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Type.class -------------------------------------------------------------------------------- /simple-db/bin/src/simpledb/Utility.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/src/simpledb/Utility.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/AggregateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/AggregateTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeDeadlockTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeDeadlockTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeFileDeleteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeFileDeleteTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeFileInsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeFileInsertTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeFileReadTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeFileReadTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeHeaderPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeHeaderPageTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeInternalPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeInternalPageTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeLeafPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeLeafPageTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeNextKeyLockingTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeNextKeyLockingTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreePageIdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreePageIdTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BTreeRootPtrPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BTreeRootPtrPageTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BufferPoolWriteTest$HeapFileDuplicates.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BufferPoolWriteTest$HeapFileDuplicates.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/BufferPoolWriteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/BufferPoolWriteTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/CatalogTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/CatalogTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/DeadlockTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/DeadlockTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/FilterTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/FilterTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/HeapFileReadTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/HeapFileReadTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/HeapFileWriteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/HeapFileWriteTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/HeapPageIdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/HeapPageIdTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/HeapPageReadTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/HeapPageReadTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/HeapPageWriteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/HeapPageWriteTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/InsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/InsertTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/IntHistogramTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/IntHistogramTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/IntegerAggregatorTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/IntegerAggregatorTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/JoinOptimizerTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/JoinOptimizerTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/JoinPredicateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/JoinPredicateTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/JoinTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/JoinTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/LockingTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/LockingTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/PredicateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/PredicateTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/RecordIdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/RecordIdTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/StringAggregatorTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/StringAggregatorTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TableStatsTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TableStatsTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TestUtil$CreateHeapFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TestUtil$CreateHeapFile.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TestUtil$LockGrabber.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TestUtil$LockGrabber.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TestUtil$MockScan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TestUtil$MockScan.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TestUtil$SkeletonFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TestUtil$SkeletonFile.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TestUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TestUtil.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TransactionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TransactionTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TupleDescTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TupleDescTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/TupleTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/TupleTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/AbortEvictionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/AbortEvictionTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/AggregateTest$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/AggregateTest$1.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/AggregateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/AggregateTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/BTreeFileDeleteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/BTreeFileDeleteTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/BTreeFileInsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/BTreeFileInsertTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/BTreeScanTest$InstrumentedBTreeFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/BTreeScanTest$InstrumentedBTreeFile.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/BTreeScanTest$TupleComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/BTreeScanTest$TupleComparator.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/BTreeScanTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/BTreeScanTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/BTreeTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/BTreeTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/DeleteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/DeleteTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/EvictionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/EvictionTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/FilterBase.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/FilterBase.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/FilterTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/FilterTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/InsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/InsertTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/JoinTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/JoinTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/LogTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/LogTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/QueryTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/QueryTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/ScanTest$1InstrumentedHeapFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/ScanTest$1InstrumentedHeapFile.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/ScanTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/ScanTest.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/SimpleDbTestBase.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/SimpleDbTestBase.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/SystemTestUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/SystemTestUtil.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier$UpdateLatch.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier$UpdateLatch.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/TransactionTest$XactionTester.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/TransactionTest$XactionTester.class -------------------------------------------------------------------------------- /simple-db/bin/test/simpledb/systemtest/TransactionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/bin/test/simpledb/systemtest/TransactionTest.class -------------------------------------------------------------------------------- /simple-db/lib/README: -------------------------------------------------------------------------------- 1 | junit-4.5.jar 2 | * http://junit.sourceforge.net/ 3 | * CPL (free for all use) 4 | 5 | zql.jar 6 | * http://www.gibello.com/code/zql/ 7 | * Free for non-commercial use 8 | 9 | JLine 10 | * http://jline.sourceforge.net/ 11 | * BSD (free for all use) 12 | 13 | mina-core-2.0.4.jar 14 | mina-filter-compression-2.0.4.jar 15 | * http://mina.apache.org/ 16 | * Apache License v2.0 (free for all use) 17 | 18 | slf4j-api-1.6.1.jar 19 | slf4j-log4j12-1.6.1.jar 20 | * http://www.slf4j.org/license.html 21 | * MIT license (free for all use) 22 | 23 | jzlib-1.0.7.jar 24 | * http://www.jcraft.com/jzlib/ 25 | * BSD (free for all use) 26 | 27 | javassist-3.16.1-GA.jar 28 | * http://www.javassist.org/ 29 | * MPL v1.1, LGPL and Apache License 30 | 31 | ant-contrib-1.0b3.jar 32 | * http://ant-contrib.sourceforge.net/ 33 | * Apache Software License 34 | 35 | log4j-1.2.17.jar 36 | * logging.apache.org/log4j/1.2/ 37 | * Apache Software license 2.0 38 | 39 | -------------------------------------------------------------------------------- /simple-db/lib/ant-contrib-1.0b3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/lib/ant-contrib-1.0b3.jar -------------------------------------------------------------------------------- /simple-db/lib/jline-0.9.94.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/lib/jline-0.9.94.jar -------------------------------------------------------------------------------- /simple-db/lib/junit-4.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/lib/junit-4.5.jar -------------------------------------------------------------------------------- /simple-db/lib/zql.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/lib/zql.jar -------------------------------------------------------------------------------- /simple-db/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/log -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/AbstractDbFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/AbstractDbFileIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Aggregate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Aggregate.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Aggregator$Op.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Aggregator$Op.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Aggregator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Aggregator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeChecker$SubtreeSummary.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeChecker$SubtreeSummary.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeChecker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeChecker.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeEntry.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeEntry.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeFile.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeFileEncoder$EntryComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeFileEncoder$EntryComparator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeFileEncoder$ReverseEntryComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeFileEncoder$ReverseEntryComparator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeFileEncoder$TupleComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeFileEncoder$TupleComparator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeFileEncoder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeFileEncoder.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeFileIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeHeaderPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeHeaderPage.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeInternalPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeInternalPage.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeInternalPageIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeInternalPageIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeInternalPageReverseIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeInternalPageReverseIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeLeafPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeLeafPage.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeLeafPageIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeLeafPageIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeLeafPageReverseIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeLeafPageReverseIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreePage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreePage.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreePageId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreePageId.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeRootPtrPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeRootPtrPage.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeScan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeScan.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeSearchIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeSearchIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeDeleter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeDeleter.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeInserter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeInserter.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeReader.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeWriter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeUtility$BTreeWriter.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BTreeUtility.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BTreeUtility.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BufferPool$Lock.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BufferPool$Lock.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BufferPool$LockManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BufferPool$LockManager.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/BufferPool.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/BufferPool.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Catalog$Table.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Catalog$Table.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Catalog.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Catalog.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/CostCard.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/CostCard.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Database.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Database.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/DbException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/DbException.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/DbFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/DbFile.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/DbFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/DbFileIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/DeadlockException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/DeadlockException.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Debug.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Debug.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Delete.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Delete.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Field.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Field.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Filter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Filter.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HashEquiJoin.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HashEquiJoin.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HeapFile$MyDbFileIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HeapFile$MyDbFileIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HeapFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HeapFile.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HeapFileEncoder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HeapFileEncoder.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HeapPage$HeapPageIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HeapPage$HeapPageIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HeapPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HeapPage.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/HeapPageId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/HeapPageId.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IndexOpIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IndexOpIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IndexPredicate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IndexPredicate.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Insert.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Insert.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IntField$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IntField$1.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IntField.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IntField.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IntHistogram$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IntHistogram$1.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IntHistogram.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IntHistogram.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IntegerAggregator$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IntegerAggregator$1.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/IntegerAggregator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/IntegerAggregator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Join.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Join.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/JoinOptimizer$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/JoinOptimizer$1.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/JoinOptimizer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/JoinOptimizer.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/JoinPredicate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/JoinPredicate.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogFile.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogicalFilterNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogicalFilterNode.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogicalJoinNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogicalJoinNode.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogicalPlan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogicalPlan.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogicalScanNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogicalScanNode.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogicalSelectListNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogicalSelectListNode.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/LogicalSubplanJoinNode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/LogicalSubplanJoinNode.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/OpIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/OpIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Operator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Operator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/OperatorCardinality.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/OperatorCardinality.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/OrderBy.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/OrderBy.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Page.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Page.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/PageId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/PageId.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Parser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Parser.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/ParsingException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/ParsingException.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Permissions.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Permissions.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/PlanCache.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/PlanCache.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Predicate$Op.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Predicate$Op.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Predicate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Predicate.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Project.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Project.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Query.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Query.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/QueryPlanVisualizer$SubTreeDescriptor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/QueryPlanVisualizer$SubTreeDescriptor.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/QueryPlanVisualizer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/QueryPlanVisualizer.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/RecordId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/RecordId.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/SeqScan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/SeqScan.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/SimpleDb.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/SimpleDb.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/StringAggregator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/StringAggregator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/StringField$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/StringField$1.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/StringField.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/StringField.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/StringHistogram.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/StringHistogram.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TableStats.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TableStats.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Transaction.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Transaction.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TransactionAbortedException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TransactionAbortedException.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TransactionId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TransactionId.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Tuple.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Tuple.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TupleArrayIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TupleArrayIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TupleComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TupleComparator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TupleDesc$TDItem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TupleDesc$TDItem.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TupleDesc.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TupleDesc.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/TupleIterator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/TupleIterator.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Type$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Type$1.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Type$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Type$2.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Type.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Type.class -------------------------------------------------------------------------------- /simple-db/out/production/simple-db/simpledb/Utility.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/production/simple-db/simpledb/Utility.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/AggregateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/AggregateTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeDeadlockTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeDeadlockTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeFileDeleteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeFileDeleteTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeFileInsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeFileInsertTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeFileReadTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeFileReadTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeHeaderPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeHeaderPageTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeInternalPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeInternalPageTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeLeafPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeLeafPageTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeNextKeyLockingTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeNextKeyLockingTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreePageIdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreePageIdTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BTreeRootPtrPageTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BTreeRootPtrPageTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BufferPoolWriteTest$HeapFileDuplicates.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BufferPoolWriteTest$HeapFileDuplicates.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/BufferPoolWriteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/BufferPoolWriteTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/CatalogTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/CatalogTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/DeadlockTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/DeadlockTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/FilterTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/FilterTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/HeapFileReadTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/HeapFileReadTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/HeapFileWriteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/HeapFileWriteTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/HeapPageIdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/HeapPageIdTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/HeapPageReadTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/HeapPageReadTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/HeapPageWriteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/HeapPageWriteTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/InsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/InsertTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/IntHistogramTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/IntHistogramTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/IntegerAggregatorTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/IntegerAggregatorTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/JoinOptimizerTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/JoinOptimizerTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/JoinPredicateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/JoinPredicateTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/JoinTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/JoinTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/LockingTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/LockingTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/PredicateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/PredicateTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/RecordIdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/RecordIdTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/StringAggregatorTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/StringAggregatorTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TableStatsTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TableStatsTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TestUtil$CreateHeapFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TestUtil$CreateHeapFile.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TestUtil$LockGrabber.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TestUtil$LockGrabber.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TestUtil$MockScan.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TestUtil$MockScan.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TestUtil$SkeletonFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TestUtil$SkeletonFile.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TestUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TestUtil.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TransactionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TransactionTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TupleDescTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TupleDescTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/TupleTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/TupleTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/AbortEvictionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/AbortEvictionTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/AggregateTest$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/AggregateTest$1.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/AggregateTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/AggregateTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/BTreeFileDeleteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/BTreeFileDeleteTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/BTreeFileInsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/BTreeFileInsertTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/BTreeScanTest$InstrumentedBTreeFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/BTreeScanTest$InstrumentedBTreeFile.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/BTreeScanTest$TupleComparator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/BTreeScanTest$TupleComparator.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/BTreeScanTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/BTreeScanTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/BTreeTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/BTreeTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/DeleteTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/DeleteTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/EvictionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/EvictionTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/FilterBase.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/FilterBase.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/FilterTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/FilterTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/InsertTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/InsertTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/JoinTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/JoinTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/LogTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/LogTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/QueryTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/QueryTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/ScanTest$1InstrumentedHeapFile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/ScanTest$1InstrumentedHeapFile.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/ScanTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/ScanTest.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/SimpleDbTestBase.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/SimpleDbTestBase.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/SystemTestUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/SystemTestUtil.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier$UpdateLatch.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier$UpdateLatch.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest$ModifiableCyclicBarrier.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest$XactionTester.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest$XactionTester.class -------------------------------------------------------------------------------- /simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudong963/ToyDB/c334d33929d9a0c18ca7a88c8b4ebc7db50afb2f/simple-db/out/test/simple-db/simpledb/systemtest/TransactionTest.class -------------------------------------------------------------------------------- /simple-db/simple-db.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /simple-db/some_data.txt: -------------------------------------------------------------------------------- 1 | 1,1,1 2 | 2,2,2 3 | 3,4,4 4 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/AbstractDbFileIterator.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.util.NoSuchElementException; 4 | 5 | /** Helper for implementing DbFileIterators. Handles hasNext()/next() logic. */ 6 | public abstract class AbstractDbFileIterator implements DbFileIterator { 7 | 8 | public boolean hasNext() throws DbException, TransactionAbortedException { 9 | if (next == null) next = readNext(); 10 | return next != null; 11 | } 12 | 13 | public Tuple next() throws DbException, TransactionAbortedException, 14 | NoSuchElementException { 15 | if (next == null) { 16 | next = readNext(); 17 | if (next == null) throw new NoSuchElementException(); 18 | } 19 | 20 | Tuple result = next; 21 | next = null; 22 | return result; 23 | } 24 | 25 | /** If subclasses override this, they should call super.close(). */ 26 | public void close() { 27 | // Ensures that a future call to next() will fail 28 | next = null; 29 | } 30 | 31 | /** Reads the next tuple from the underlying source. 32 | @return the next Tuple in the iterator, null if the iteration is finished. */ 33 | protected abstract Tuple readNext() throws DbException, TransactionAbortedException; 34 | 35 | private Tuple next = null; 36 | } 37 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Aggregator.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * The common interface for any class that can compute an aggregate over a 7 | * list of Tuples. 8 | */ 9 | public interface Aggregator extends Serializable { 10 | static final int NO_GROUPING = -1; 11 | 12 | /** 13 | * SUM_COUNT and SC_AVG will 14 | * only be used in lab7, you are not required 15 | * to implement them until then. 16 | * */ 17 | public enum Op implements Serializable { 18 | MIN, MAX, SUM, AVG, COUNT, 19 | /** 20 | * SUM_COUNT: compute sum and count simultaneously, will be 21 | * needed to compute distributed avg in lab7. 22 | * */ 23 | SUM_COUNT, 24 | /** 25 | * SC_AVG: compute the avg of a set of SUM_COUNT tuples, 26 | * will be used to compute distributed avg in lab7. 27 | * */ 28 | SC_AVG; 29 | 30 | /** 31 | * Interface to access operations by a string containing an integer 32 | * index for command-line convenience. 33 | * 34 | * @param s a string containing a valid integer Op index 35 | */ 36 | public static Op getOp(String s) { 37 | return getOp(Integer.parseInt(s)); 38 | } 39 | 40 | /** 41 | * Interface to access operations by integer value for command-line 42 | * convenience. 43 | * 44 | * @param i a valid integer Op index 45 | */ 46 | public static Op getOp(int i) { 47 | return values()[i]; 48 | } 49 | 50 | public String toString() 51 | { 52 | if (this==MIN) 53 | return "min"; 54 | if (this==MAX) 55 | return "max"; 56 | if (this==SUM) 57 | return "sum"; 58 | if (this==SUM_COUNT) 59 | return "sum_count"; 60 | if (this==AVG) 61 | return "avg"; 62 | if (this==COUNT) 63 | return "count"; 64 | if (this==SC_AVG) 65 | return "sc_avg"; 66 | throw new IllegalStateException("impossible to reach here"); 67 | } 68 | } 69 | 70 | /** 71 | * Merge a new tuple into the aggregate for a distinct group value; 72 | * creates a new group aggregate result if the group value has not yet 73 | * been encountered. 74 | * 75 | * @param tup the Tuple containing an aggregate field and a group-by field 76 | */ 77 | public void mergeTupleIntoGroup(Tuple tup); 78 | 79 | /** 80 | * Create a OpIterator over group aggregate results. 81 | * @see simpledb.TupleIterator for a possible helper 82 | */ 83 | public OpIterator iterator(); 84 | 85 | } 86 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/CostCard.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | import java.util.Vector; 3 | 4 | /** Class returned by {@link JoinOptimizer#computeCostAndCardOfSubplan} specifying the 5 | cost and cardinality of the optimal plan represented by plan. 6 | */ 7 | public class CostCard { 8 | /** The cost of the optimal subplan */ 9 | public double cost; 10 | /** The cardinality of the optimal subplan */ 11 | public int card; 12 | /** The optimal subplan */ 13 | public Vector plan; 14 | } 15 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Database.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.*; 4 | import java.util.concurrent.atomic.AtomicReference; 5 | 6 | /** 7 | * Database is a class that initializes several static variables used by the 8 | * database system (the catalog, the buffer pool, and the log files, in 9 | * particular.) 10 | *

11 | * Provides a set of methods that can be used to access these variables from 12 | * anywhere. 13 | * 14 | * @Threadsafe 15 | */ 16 | public class Database { 17 | private static AtomicReference _instance = new AtomicReference(new Database()); 18 | private final Catalog _catalog; 19 | private final BufferPool _bufferpool; 20 | 21 | private final static String LOGFILENAME = "log"; 22 | private final LogFile _logfile; 23 | 24 | private Database() { 25 | _catalog = new Catalog(); 26 | _bufferpool = new BufferPool(BufferPool.DEFAULT_PAGES); 27 | LogFile tmp = null; 28 | try { 29 | tmp = new LogFile(new File(LOGFILENAME)); 30 | } catch (IOException e) { 31 | e.printStackTrace(); 32 | System.exit(1); 33 | } 34 | _logfile = tmp; 35 | // startControllerThread(); 36 | } 37 | 38 | /** Return the log file of the static Database instance */ 39 | public static LogFile getLogFile() { 40 | return _instance.get()._logfile; 41 | } 42 | 43 | /** Return the buffer pool of the static Database instance */ 44 | public static BufferPool getBufferPool() { 45 | return _instance.get()._bufferpool; 46 | } 47 | 48 | /** Return the catalog of the static Database instance */ 49 | public static Catalog getCatalog() { 50 | return _instance.get()._catalog; 51 | } 52 | 53 | /** 54 | * Method used for testing -- create a new instance of the buffer pool and 55 | * return it 56 | */ 57 | public static BufferPool resetBufferPool(int pages) { 58 | java.lang.reflect.Field bufferPoolF=null; 59 | try { 60 | bufferPoolF = Database.class.getDeclaredField("_bufferpool"); 61 | bufferPoolF.setAccessible(true); 62 | bufferPoolF.set(_instance.get(), new BufferPool(pages)); 63 | } catch (NoSuchFieldException e) { 64 | e.printStackTrace(); 65 | } catch (SecurityException e) { 66 | e.printStackTrace(); 67 | } catch (IllegalArgumentException e) { 68 | e.printStackTrace(); 69 | } catch (IllegalAccessException e) { 70 | e.printStackTrace(); 71 | } 72 | // _instance._bufferpool = new BufferPool(pages); 73 | return _instance.get()._bufferpool; 74 | } 75 | 76 | // reset the database, used for unit tests only. 77 | public static void reset() { 78 | _instance.set(new Database()); 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/DbException.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.lang.Exception; 4 | 5 | /** Generic database exception class */ 6 | public class DbException extends Exception { 7 | private static final long serialVersionUID = 1L; 8 | 9 | public DbException(String s) { 10 | super(s); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/DbFileIterator.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | import java.util.*; 3 | 4 | /** 5 | * DbFileIterator is the iterator interface that all SimpleDB Dbfile should 6 | * implement. 7 | */ 8 | public interface DbFileIterator{ 9 | /** 10 | * Opens the iterator 11 | * @throws DbException when there are problems opening/accessing the database. 12 | */ 13 | public void open() 14 | throws DbException, TransactionAbortedException; 15 | 16 | /** @return true if there are more tuples available, false if no more tuples or iterator isn't open. */ 17 | public boolean hasNext() 18 | throws DbException, TransactionAbortedException; 19 | 20 | /** 21 | * Gets the next tuple from the operator (typically implementing by reading 22 | * from a child operator or an access method). 23 | * 24 | * @return The next tuple in the iterator. 25 | * @throws NoSuchElementException if there are no more tuples 26 | */ 27 | public Tuple next() 28 | throws DbException, TransactionAbortedException, NoSuchElementException; 29 | 30 | /** 31 | * Resets the iterator to the start. 32 | * @throws DbException When rewind is unsupported. 33 | */ 34 | public void rewind() throws DbException, TransactionAbortedException; 35 | 36 | /** 37 | * Closes the iterator. 38 | */ 39 | public void close(); 40 | } 41 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/DeadlockException.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.lang.Exception; 4 | 5 | /** Exception that is thrown when a deadlock occurs. */ 6 | public class DeadlockException extends Exception { 7 | private static final long serialVersionUID = 1L; 8 | 9 | public DeadlockException() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Debug.java: -------------------------------------------------------------------------------- 1 | 2 | package simpledb; 3 | 4 | /** 5 | * Debug is a utility class that wraps println statements and allows 6 | * more or less command line output to be turned on. 7 | *

8 | * Change the value of the DEBUG_LEVEL constant using a system property: 9 | * simpledb.Debug. For example, on the command line, use -Dsimpledb.Debug=x, 10 | * or simply -Dsimpledb.Debug to enable it at level 0. 11 | * The log(level, message, ...) method will print to standard output if the 12 | * level number is less than or equal to the currently set DEBUG_LEVEL. 13 | */ 14 | 15 | public class Debug { 16 | private static final int DEBUG_LEVEL; 17 | static { 18 | String debug = System.getProperty("simpledb.Debug"); 19 | if (debug == null) { 20 | // No system property = disabled 21 | DEBUG_LEVEL = -1; 22 | } else if (debug.length() == 0) { 23 | // Empty property = level 0 24 | DEBUG_LEVEL = 0; 25 | } else { 26 | DEBUG_LEVEL = Integer.parseInt(debug); 27 | } 28 | } 29 | 30 | private static final int DEFAULT_LEVEL = 0; 31 | 32 | /** Log message if the log level >= level. Uses printf. */ 33 | public static void log(int level, String message, Object... args) { 34 | if (isEnabled(level)) { 35 | System.out.printf(message, args); 36 | System.out.println(); 37 | } 38 | } 39 | 40 | /** @return true if level is being logged. */ 41 | public static boolean isEnabled(int level) { 42 | return level <= DEBUG_LEVEL; 43 | } 44 | 45 | /** @return true if the default level is being logged. */ 46 | public static boolean isEnabled() { 47 | return isEnabled(DEFAULT_LEVEL); 48 | } 49 | 50 | /** Logs message at the default log level. */ 51 | public static void log(String message, Object... args) { 52 | log(DEFAULT_LEVEL, message, args); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Delete.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The delete operator. Delete reads tuples from its child operator and removes 7 | * them from the table they belong to. 8 | */ 9 | public class Delete extends Operator { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | /** 14 | * Constructor specifying the transaction that this delete belongs to as 15 | * well as the child to read from. 16 | * 17 | * @param t 18 | * The transaction this delete runs in 19 | * @param child 20 | * The child operator from which to read tuples for deletion 21 | */ 22 | private TransactionId tid; 23 | private OpIterator child; 24 | private OpIterator[] opIterators; 25 | private TupleDesc td = new TupleDesc(new Type[]{Type.INT_TYPE}); 26 | private boolean deleted; 27 | public Delete(TransactionId t, OpIterator child) { 28 | tid = t; 29 | this.child = child; 30 | deleted = false; 31 | } 32 | 33 | public TupleDesc getTupleDesc() { 34 | return td; 35 | } 36 | 37 | public void open() throws DbException, TransactionAbortedException { 38 | child.open(); 39 | super.open(); 40 | } 41 | 42 | public void close() { 43 | super.close(); 44 | child.close(); 45 | } 46 | 47 | public void rewind() throws DbException, TransactionAbortedException { 48 | close(); 49 | open(); 50 | } 51 | 52 | /** 53 | * Deletes tuples as they are read from the child operator. Deletes are 54 | * processed via the buffer pool (which can be accessed via the 55 | * Database.getBufferPool() method. 56 | * 57 | * @return A 1-field tuple containing the number of deleted records. 58 | * @see Database#getBufferPool 59 | * @see BufferPool#deleteTuple 60 | */ 61 | protected Tuple fetchNext() throws TransactionAbortedException, DbException { 62 | if(deleted) return null; 63 | int num = 0; 64 | while(child.hasNext()) 65 | { 66 | Tuple tuple = child.next(); 67 | try { 68 | Database.getBufferPool().deleteTuple(tid, tuple); 69 | } catch (IOException e) { 70 | e.printStackTrace(); 71 | } 72 | num++; 73 | } 74 | deleted = true; 75 | Tuple t = new Tuple(td); 76 | t.setField(0, new IntField(num)); 77 | return t; 78 | } 79 | 80 | @Override 81 | public OpIterator[] getChildren() { 82 | opIterators[0] = child; 83 | return opIterators; 84 | } 85 | 86 | @Override 87 | public void setChildren(OpIterator[] children) { 88 | opIterators = children; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Field.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.*; 4 | 5 | /** 6 | * Interface for values of fields in tuples in SimpleDB. 7 | */ 8 | public interface Field extends Serializable{ 9 | /** 10 | * Write the bytes representing this field to the specified 11 | * DataOutputStream. 12 | * @see DataOutputStream 13 | * @param dos The DataOutputStream to write to. 14 | */ 15 | void serialize(DataOutputStream dos) throws IOException; 16 | 17 | /** 18 | * Compare the value of this field object to the passed in value. 19 | * @param op The operator 20 | * @param value The value to compare this Field to 21 | * @return Whether or not the comparison yields true. 22 | */ 23 | public boolean compare(Predicate.Op op, Field value); 24 | 25 | /** 26 | * Returns the type of this field (see {@link Type#INT_TYPE} or {@link Type#STRING_TYPE} 27 | * @return type of this field 28 | */ 29 | public Type getType(); 30 | 31 | /** 32 | * Hash code. 33 | * Different Field objects representing the same value should probably 34 | * return the same hashCode. 35 | */ 36 | public int hashCode(); 37 | public boolean equals(Object field); 38 | 39 | public String toString(); 40 | } 41 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Filter.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.util.*; 4 | 5 | /** 6 | * Filter is an operator that implements a relational select. 7 | */ 8 | public class Filter extends Operator { 9 | 10 | private static final long serialVersionUID = 1L; 11 | private Predicate predicate; 12 | private OpIterator child; 13 | private OpIterator[] opIterators; 14 | /** 15 | * Constructor accepts a predicate to apply and a child operator to read 16 | * tuples to filter from. 17 | * 18 | * @param p 19 | * The predicate to filter tuples with 20 | * @param child 21 | * The child operator 22 | */ 23 | public Filter(Predicate p, OpIterator child) { 24 | predicate = p; 25 | this.child = child; 26 | opIterators = new OpIterator[1]; 27 | } 28 | 29 | public Predicate getPredicate() { 30 | return predicate; 31 | } 32 | 33 | public TupleDesc getTupleDesc() { 34 | return child.getTupleDesc(); 35 | } 36 | 37 | public void open() throws DbException, NoSuchElementException, 38 | TransactionAbortedException { 39 | child.open(); 40 | super.open(); 41 | } 42 | 43 | public void close() { 44 | super.close(); 45 | child.close(); 46 | } 47 | 48 | public void rewind() throws DbException, TransactionAbortedException { 49 | close(); 50 | open(); 51 | } 52 | 53 | /** 54 | * AbstractDbIterator.readNext implementation. Iterates over tuples from the 55 | * child operator, applying the predicate to them and returning those that 56 | * pass the predicate (i.e. for which the Predicate.filter() returns true.) 57 | * 58 | * @return The next tuple that passes the filter, or null if there are no 59 | * more tuples 60 | * @see Predicate#filter 61 | */ 62 | protected Tuple fetchNext() throws NoSuchElementException, 63 | TransactionAbortedException, DbException { 64 | while (child.hasNext()){ 65 | Tuple tuple = child.next(); 66 | if(predicate.filter(tuple)) 67 | return tuple; 68 | } 69 | return null; 70 | } 71 | 72 | @Override 73 | public OpIterator[] getChildren() { 74 | opIterators[0] = child; 75 | return opIterators; 76 | } 77 | 78 | @Override 79 | public void setChildren(OpIterator[] children) { 80 | opIterators = children; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/HeapPageId.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** Unique identifier for HeapPage objects. */ 4 | public class HeapPageId implements PageId { 5 | 6 | /** 7 | * Constructor. Create a page id structure for a specific page of a 8 | * specific table. 9 | * 10 | * @param tableId The table that is being referenced 11 | * @param pgNo The page number in that table. 12 | */ 13 | private int tableId; 14 | private int pgNo; 15 | public HeapPageId(int tableId, int pgNo) { 16 | this.pgNo = pgNo; 17 | this.tableId = tableId; 18 | } 19 | 20 | /** @return the table associated with this PageId */ 21 | public int getTableId() { 22 | return tableId; 23 | } 24 | 25 | /** 26 | * @return the page number in the table getTableId() associated with 27 | * this PageId 28 | */ 29 | public int getPageNumber() { 30 | return pgNo; 31 | } 32 | 33 | /** 34 | * @return a hash code for this page, represented by the concatenation of 35 | * the table number and the page number (needed if a PageId is used as a 36 | * key in a hash table in the BufferPool, for example.) 37 | * @see BufferPool 38 | */ 39 | public int hashCode() { 40 | int res = 5; 41 | res = 7 * res + tableId; 42 | res = 7 * res + pgNo; 43 | return res; 44 | } 45 | 46 | /** 47 | * Compares one PageId to another. 48 | * 49 | * @param o The object to compare against (must be a PageId) 50 | * @return true if the objects are equal (e.g., page numbers and table 51 | * ids are the same) 52 | */ 53 | public boolean equals(Object o) { 54 | if(o==null) 55 | return false; 56 | if(!(o instanceof HeapPageId)) 57 | return false; 58 | if(o == this) 59 | return true; 60 | 61 | HeapPageId heapPageId = (HeapPageId)o; 62 | return pgNo == heapPageId.pgNo && tableId == heapPageId.tableId; 63 | } 64 | 65 | /** 66 | * Return a representation of this object as an array of 67 | * integers, for writing to disk. Size of returned array must contain 68 | * number of integers that corresponds to number of args to one of the 69 | * constructors. 70 | */ 71 | public int[] serialize() { 72 | int data[] = new int[2]; 73 | 74 | data[0] = getTableId(); 75 | data[1] = getPageNumber(); 76 | return data; 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/IndexOpIterator.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | import java.util.*; 3 | 4 | /** IndexDBIterator is the interface that index access methods 5 | implement in SimpleDb. 6 | */ 7 | public interface IndexOpIterator extends OpIterator { 8 | /** Open the access method such that when getNext is called, it 9 | iterates through the tuples that satisfy ipred. 10 | @param ipred The predicate that is used to scan the index. 11 | */ 12 | public void open(IndexPredicate ipred) 13 | throws NoSuchElementException, DbException, TransactionAbortedException; 14 | 15 | /** Begin a new index scan with the specified predicate. 16 | @param ipred The predicate that is used to scan the index. 17 | */ 18 | public void rewind(IndexPredicate ipred) 19 | throws DbException, TransactionAbortedException; 20 | } 21 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/IndexPredicate.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * IndexPredicate compares a field which has index on it against a given value 7 | * @see IndexOpIterator 8 | */ 9 | public class IndexPredicate implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | private Predicate.Op op; 14 | private Field fieldvalue; 15 | 16 | /** 17 | * Constructor. 18 | * 19 | * @param fvalue The value that the predicate compares against. 20 | * @param op The operation to apply (as defined in Predicate.Op); either 21 | * Predicate.Op.GREATER_THAN, Predicate.Op.LESS_THAN, Predicate.Op.EQUAL, 22 | * Predicate.Op.GREATER_THAN_OR_EQ, or Predicate.Op.LESS_THAN_OR_EQ 23 | * @see Predicate 24 | */ 25 | public IndexPredicate(Predicate.Op op, Field fvalue) { 26 | this.op = op; 27 | this.fieldvalue = fvalue; 28 | } 29 | 30 | public Field getField() { 31 | return fieldvalue; 32 | } 33 | 34 | public Predicate.Op getOp() { 35 | return op; 36 | } 37 | 38 | /** Return true if the fieldvalue in the supplied predicate 39 | is satisfied by this predicate's fieldvalue and 40 | operator. 41 | @param ipd The field to compare against. 42 | */ 43 | public boolean equals(IndexPredicate ipd) { 44 | if (ipd == null) 45 | return false; 46 | return (op.equals(ipd.op) && fieldvalue.equals(ipd.fieldvalue)); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/IntField.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.*; 4 | 5 | /** 6 | * Instance of Field that stores a single integer. 7 | */ 8 | public class IntField implements Field { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | private final int value; 13 | 14 | public int getValue() { 15 | return value; 16 | } 17 | 18 | /** 19 | * Constructor. 20 | * 21 | * @param i The value of this field. 22 | */ 23 | public IntField(int i) { 24 | value = i; 25 | } 26 | 27 | public String toString() { 28 | return Integer.toString(value); 29 | } 30 | 31 | public int hashCode() { 32 | return value; 33 | } 34 | 35 | public boolean equals(Object field) { 36 | return ((IntField) field).value == value; 37 | } 38 | 39 | public void serialize(DataOutputStream dos) throws IOException { 40 | dos.writeInt(value); 41 | } 42 | 43 | /** 44 | * Compare the specified field to the value of this Field. 45 | * Return semantics are as specified by Field.compare 46 | * 47 | * @throws IllegalCastException if val is not an IntField 48 | * @see Field#compare 49 | */ 50 | public boolean compare(Predicate.Op op, Field val) { 51 | 52 | IntField iVal = (IntField) val; 53 | 54 | switch (op) { 55 | case EQUALS: 56 | return value == iVal.value; 57 | case NOT_EQUALS: 58 | return value != iVal.value; 59 | 60 | case GREATER_THAN: 61 | return value > iVal.value; 62 | 63 | case GREATER_THAN_OR_EQ: 64 | return value >= iVal.value; 65 | 66 | case LESS_THAN: 67 | return value < iVal.value; 68 | 69 | case LESS_THAN_OR_EQ: 70 | return value <= iVal.value; 71 | 72 | case LIKE: 73 | return value == iVal.value; 74 | } 75 | 76 | return false; 77 | } 78 | 79 | /** 80 | * Return the Type of this field. 81 | * @return Type.INT_TYPE 82 | */ 83 | public Type getType() { 84 | return Type.INT_TYPE; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/JoinPredicate.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * JoinPredicate compares fields of two tuples using a predicate. JoinPredicate 7 | * is most likely used by the Join operator. 8 | */ 9 | public class JoinPredicate implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | /** 14 | * Constructor -- create a new predicate over two fields of two tuples. 15 | * 16 | * @param field1 17 | * The field index into the first tuple in the predicate 18 | * @param field2 19 | * The field index into the second tuple in the predicate 20 | * @param op 21 | * The operation to apply (as defined in Predicate.Op); either 22 | * Predicate.Op.GREATER_THAN, Predicate.Op.LESS_THAN, 23 | * Predicate.Op.EQUAL, Predicate.Op.GREATER_THAN_OR_EQ, or 24 | * Predicate.Op.LESS_THAN_OR_EQ 25 | * @see Predicate 26 | */ 27 | int field1; 28 | int field2; 29 | Predicate.Op op; 30 | public JoinPredicate(int field1, Predicate.Op op, int field2) { 31 | this.field1 = field1; 32 | this.field2 = field2; 33 | this.op = op; 34 | } 35 | 36 | /** 37 | * Apply the predicate to the two specified tuples. The comparison can be 38 | * made through Field's compare method. 39 | * 40 | * @return true if the tuples satisfy the predicate. 41 | */ 42 | public boolean filter(Tuple t1, Tuple t2) { 43 | 44 | return t1.getField(field1).compare(op, t2.getField(field2)); 45 | } 46 | 47 | public int getField1() 48 | { 49 | return field1; 50 | } 51 | 52 | public int getField2() 53 | { 54 | return field2; 55 | } 56 | 57 | public Predicate.Op getOperator() 58 | { 59 | return op; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/LogicalFilterNode.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** A LogicalFilterNode represents the parameters of a filter in the WHERE clause of a query. 4 |

5 | Filter is of the form t.f p c 6 |

7 | Where t is a table, f is a field in t, p is a predicate, and c is a constant 8 | */ 9 | public class LogicalFilterNode { 10 | /** The alias of a table (or the name if no alias) over which the filter ranges */ 11 | public String tableAlias; 12 | 13 | /** The predicate in the filter */ 14 | public Predicate.Op p; 15 | 16 | /* The constant on the right side of the filter */ 17 | public String c; 18 | 19 | /** The field from t which is in the filter. The pure name, without alias or tablename*/ 20 | public String fieldPureName; 21 | 22 | public String fieldQuantifiedName; 23 | 24 | public LogicalFilterNode(String table, String field, Predicate.Op pred, String constant) { 25 | tableAlias = table; 26 | p = pred; 27 | c = constant; 28 | String[] tmps = field.split("[.]"); 29 | if (tmps.length>1) 30 | fieldPureName = tmps[tmps.length-1]; 31 | else 32 | fieldPureName=field; 33 | this.fieldQuantifiedName = tableAlias+"."+fieldPureName; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/LogicalJoinNode.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** A LogicalJoinNode represens the state needed of a join of two 4 | * tables in a LogicalQueryPlan */ 5 | public class LogicalJoinNode { 6 | 7 | /** The first table to join (may be null). It's the alias of the table (if no alias, the true table name) */ 8 | public String t1Alias; 9 | 10 | /** The second table to join (may be null). It's the alias of the table, (if no alias, the true table name).*/ 11 | public String t2Alias; 12 | 13 | /** The name of the field in t1 to join with. It's the pure name of a field, rather that alias.field. */ 14 | public String f1PureName; 15 | 16 | public String f1QuantifiedName; 17 | 18 | /** The name of the field in t2 to join with. It's the pure name of a field.*/ 19 | public String f2PureName; 20 | 21 | public String f2QuantifiedName; 22 | 23 | /** The join predicate */ 24 | public Predicate.Op p; 25 | 26 | public LogicalJoinNode() { 27 | } 28 | 29 | public LogicalJoinNode(String table1, String table2, String joinField1, String joinField2, Predicate.Op pred) { 30 | t1Alias = table1; 31 | t2Alias = table2; 32 | String[] tmps = joinField1.split("[.]"); 33 | if (tmps.length>1) 34 | f1PureName = tmps[tmps.length-1]; 35 | else 36 | f1PureName=joinField1; 37 | tmps = joinField2.split("[.]"); 38 | if (tmps.length>1) 39 | f2PureName = tmps[tmps.length-1]; 40 | else 41 | f2PureName = joinField2; 42 | p = pred; 43 | this.f1QuantifiedName = t1Alias+"."+this.f1PureName; 44 | this.f2QuantifiedName = t2Alias+"."+this.f2PureName; 45 | } 46 | 47 | /** Return a new LogicalJoinNode with the inner and outer (t1.f1 48 | * and t2.f2) tables swapped. */ 49 | public LogicalJoinNode swapInnerOuter() { 50 | Predicate.Op newp; 51 | if (p == Predicate.Op.GREATER_THAN) 52 | newp = Predicate.Op.LESS_THAN; 53 | else if (p == Predicate.Op.GREATER_THAN_OR_EQ) 54 | newp = Predicate.Op.LESS_THAN_OR_EQ; 55 | else if (p == Predicate.Op.LESS_THAN) 56 | newp = Predicate.Op.GREATER_THAN; 57 | else if (p == Predicate.Op.LESS_THAN_OR_EQ) 58 | newp = Predicate.Op.GREATER_THAN_OR_EQ; 59 | else 60 | newp = p; 61 | 62 | LogicalJoinNode j2 = new LogicalJoinNode(t2Alias,t1Alias,f2PureName,f1PureName, newp); 63 | return j2; 64 | } 65 | 66 | @Override public boolean equals(Object o) { 67 | LogicalJoinNode j2 =(LogicalJoinNode)o; 68 | return (j2.t1Alias.equals(t1Alias) || j2.t1Alias.equals(t2Alias)) && (j2.t2Alias.equals(t1Alias) || j2.t2Alias.equals(t2Alias)); 69 | } 70 | 71 | @Override public String toString() { 72 | return t1Alias + ":" + t2Alias ;//+ ";" + f1 + " " + p + " " + f2; 73 | } 74 | 75 | @Override public int hashCode() { 76 | return t1Alias.hashCode() + t2Alias.hashCode() + f1PureName.hashCode() + f2PureName.hashCode(); 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/LogicalScanNode.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** A LogicalScanNode represents table in the FROM list in a 4 | * LogicalQueryPlan */ 5 | public class LogicalScanNode { 6 | 7 | /** The name (alias) of the table as it is used in the query */ 8 | public String alias; 9 | 10 | /** The table identifier (can be passed to {@link Catalog#getDatabaseFile}) 11 | * to retrieve a DbFile */ 12 | public int t; 13 | 14 | public LogicalScanNode(int table, String tableAlias) { 15 | this.alias = tableAlias; 16 | this.t = table; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/LogicalSelectListNode.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** A LogicalSelectListNode represents a clause in the select list in 4 | * a LogicalQueryPlan 5 | */ 6 | public class LogicalSelectListNode { 7 | /** The field name being selected; the name may be (optionally) be 8 | * qualified with a table name or alias. 9 | */ 10 | public String fname; 11 | 12 | /** The aggregation operation over the field (if any) */ 13 | public String aggOp; 14 | 15 | public LogicalSelectListNode(String aggOp, String fname) { 16 | this.aggOp = aggOp; 17 | this.fname = fname; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/LogicalSubplanJoinNode.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** A LogicalSubplanJoinNode represens the state needed of a join of a 4 | * table to a subplan in a LogicalQueryPlan -- inherits state from 5 | * {@link LogicalJoinNode}; t2 and f2 should always be null 6 | */ 7 | public class LogicalSubplanJoinNode extends LogicalJoinNode { 8 | 9 | /** The subplan (used on the inner) of the join */ 10 | OpIterator subPlan; 11 | 12 | public LogicalSubplanJoinNode(String table1, String joinField1, OpIterator sp, Predicate.Op pred) { 13 | t1Alias = table1; 14 | String[] tmps = joinField1.split("[.]"); 15 | if (tmps.length>1) 16 | f1PureName = tmps[tmps.length-1]; 17 | else 18 | f1PureName=joinField1; 19 | f1QuantifiedName=t1Alias+"."+f1PureName; 20 | subPlan = sp; 21 | p = pred; 22 | } 23 | 24 | @Override public int hashCode() { 25 | return t1Alias.hashCode() + f1PureName.hashCode() + subPlan.hashCode(); 26 | } 27 | 28 | @Override public boolean equals(Object o) { 29 | LogicalJoinNode j2 =(LogicalJoinNode)o; 30 | if (!(o instanceof LogicalSubplanJoinNode)) 31 | return false; 32 | 33 | return (j2.t1Alias.equals(t1Alias) && j2.f1PureName.equals(f1PureName) && ((LogicalSubplanJoinNode)o).subPlan.equals(subPlan)); 34 | } 35 | 36 | public LogicalSubplanJoinNode swapInnerOuter() { 37 | LogicalSubplanJoinNode j2 = new LogicalSubplanJoinNode(t1Alias,f1PureName,subPlan, p); 38 | return j2; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/OpIterator.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | import java.io.Serializable; 3 | import java.util.*; 4 | 5 | /** 6 | * OpIterator is the iterator interface that all SimpleDB operators should 7 | * implement. If the iterator is not open, none of the methods should work, 8 | * and should throw an IllegalStateException. In addition to any 9 | * resource allocation/deallocation, an open method should call any 10 | * child iterator open methods, and in a close method, an iterator 11 | * should call its children's close methods. 12 | */ 13 | public interface OpIterator extends Serializable{ 14 | /** 15 | * Opens the iterator. This must be called before any of the other methods. 16 | * @throws DbException when there are problems opening/accessing the database. 17 | */ 18 | public void open() 19 | throws DbException, TransactionAbortedException; 20 | 21 | /** Returns true if the iterator has more tuples. 22 | * @return true f the iterator has more tuples. 23 | * @throws IllegalStateException If the iterator has not been opened 24 | */ 25 | public boolean hasNext() throws DbException, TransactionAbortedException; 26 | 27 | /** 28 | * Returns the next tuple from the operator (typically implementing by reading 29 | * from a child operator or an access method). 30 | * 31 | * @return the next tuple in the iteration. 32 | * @throws NoSuchElementException if there are no more tuples. 33 | * @throws IllegalStateException If the iterator has not been opened 34 | */ 35 | public Tuple next() throws DbException, TransactionAbortedException, NoSuchElementException; 36 | 37 | /** 38 | * Resets the iterator to the start. 39 | * @throws DbException when rewind is unsupported. 40 | * @throws IllegalStateException If the iterator has not been opened 41 | */ 42 | public void rewind() throws DbException, TransactionAbortedException; 43 | 44 | /** 45 | * Returns the TupleDesc associated with this OpIterator. 46 | * @return the TupleDesc associated with this OpIterator. 47 | */ 48 | public TupleDesc getTupleDesc(); 49 | 50 | /** 51 | * Closes the iterator. When the iterator is closed, calling next(), 52 | * hasNext(), or rewind() should fail by throwing IllegalStateException. 53 | */ 54 | public void close(); 55 | 56 | } 57 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Page.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** 4 | * Page is the interface used to represent pages that are resident in the 5 | * BufferPool. Typically, DbFiles will read and write pages from disk. 6 | *

7 | * Pages may be "dirty", indicating that they have been modified since they 8 | * were last written out to disk. 9 | * 10 | * For recovery purposes, pages MUST have a single constructor of the form: 11 | * Page(PageId id, byte[] data) 12 | */ 13 | public interface Page { 14 | 15 | /** 16 | * Return the id of this page. The id is a unique identifier for a page 17 | * that can be used to look up the page on disk or determine if the page 18 | * is resident in the buffer pool. 19 | * 20 | * @return the id of this page 21 | */ 22 | public PageId getId(); 23 | 24 | /** 25 | * Get the id of the transaction that last dirtied this page, or null if the page is clean.. 26 | * 27 | * @return The id of the transaction that last dirtied this page, or null 28 | */ 29 | public TransactionId isDirty(); 30 | 31 | /** 32 | * Set the dirty state of this page as dirtied by a particular transaction 33 | */ 34 | public void markDirty(boolean dirty, TransactionId tid); 35 | 36 | /** 37 | * Generates a byte array representing the contents of this page. 38 | * Used to serialize this page to disk. 39 | *

40 | * The invariant here is that it should be possible to pass the byte array 41 | * generated by getPageData to the Page constructor and have it produce 42 | * an identical Page object. 43 | * 44 | * @return A byte array correspond to the bytes of this page. 45 | */ 46 | 47 | public byte[] getPageData(); 48 | 49 | /** Provide a representation of this page before any modifications were made 50 | to it. Used by recovery. 51 | */ 52 | public Page getBeforeImage(); 53 | 54 | /* 55 | * a transaction that wrote this page just committed it. 56 | * copy current content to the before image. 57 | */ 58 | public void setBeforeImage(); 59 | } 60 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/PageId.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** PageId is an interface to a specific page of a specific table. */ 4 | public interface PageId { 5 | 6 | /** Return a representation of this page id object as a collection of 7 | integers (used for logging) 8 | 9 | This class MUST have a constructor that accepts n integer parameters, 10 | where n is the number of integers returned in the array from serialize. 11 | */ 12 | public int[] serialize(); 13 | 14 | /** @return the unique tableid hashcode with this PageId */ 15 | public int getTableId(); 16 | 17 | /** 18 | * @return a hash code for this page, represented by the concatenation of 19 | * the table number and the page number (needed if a PageId is used as a 20 | * key in a hash table in the BufferPool, for example.) 21 | * @see BufferPool 22 | */ 23 | public int hashCode(); 24 | 25 | /** 26 | * Compares one PageId to another. 27 | * 28 | * @param o The object to compare against (must be a PageId) 29 | * @return true if the objects are equal (e.g., page numbers and table 30 | * ids are the same) 31 | */ 32 | public boolean equals(Object o); 33 | 34 | public int getPageNumber(); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/ParsingException.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | import java.lang.Exception; 3 | 4 | public class ParsingException extends Exception { 5 | public ParsingException(String string) { 6 | super(string); 7 | } 8 | 9 | public ParsingException(Exception e) { 10 | super(e); 11 | } 12 | 13 | /** 14 | * 15 | */ 16 | private static final long serialVersionUID = 1L; 17 | } 18 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Permissions.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** 4 | * Class representing requested permissions to a relation/file. 5 | * Private constructor with two static objects READ_ONLY and READ_WRITE that 6 | * represent the two levels of permission. 7 | */ 8 | public class Permissions { 9 | int permLevel; 10 | 11 | private Permissions(int permLevel) { 12 | this.permLevel = permLevel; 13 | } 14 | 15 | public String toString() { 16 | if (permLevel == 0) 17 | return "READ_ONLY"; 18 | if (permLevel == 1) 19 | return "READ_WRITE"; 20 | return "UNKNOWN"; 21 | } 22 | 23 | public static final Permissions READ_ONLY = new Permissions(0); 24 | public static final Permissions READ_WRITE = new Permissions(1); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/PlanCache.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | import java.util.HashMap; 3 | import java.util.Set; 4 | import java.util.Vector; 5 | 6 | /** A PlanCache is a helper class that can be used to store the best 7 | * way to order a given set of joins */ 8 | public class PlanCache { 9 | HashMap,Vector> bestOrders= new HashMap,Vector>(); 10 | HashMap,Double> bestCosts= new HashMap,Double>(); 11 | HashMap,Integer> bestCardinalities = new HashMap,Integer>(); 12 | 13 | /** Add a new cost, cardinality and ordering for a particular join set. Does not verify that the 14 | new cost is less than any previously added cost -- simply adds or replaces an existing plan for the 15 | specified join set 16 | @param s the set of joins for which a new ordering (plan) is being added 17 | @param cost the estimated cost of the specified plan 18 | @param card the estimatied cardinality of the specified plan 19 | @param order the ordering of the joins in the plan 20 | */ 21 | void addPlan(Set s, double cost, int card, Vector order) { 22 | bestOrders.put(s,order); 23 | bestCosts.put(s,cost); 24 | bestCardinalities.put(s,card); 25 | } 26 | 27 | /** Find the best join order in the cache for the specified plan 28 | @param s the set of joins to look up the best order for 29 | @return the best order for s in the cache 30 | */ 31 | Vector getOrder(Set s) { 32 | return bestOrders.get(s); 33 | } 34 | 35 | /** Find the cost of the best join order in the cache for the specified plan 36 | @param s the set of joins to look up the best cost for 37 | @return the cost of the best order for s in the cache 38 | */ 39 | double getCost(Set s) { 40 | return bestCosts.get(s); 41 | } 42 | 43 | /** Find the cardinality of the best join order in the cache for the specified plan 44 | @param s the set of joins to look up the best cardinality for 45 | @return the cardinality of the best order for s in the cache 46 | */ 47 | int getCard(Set s) { 48 | return bestCardinalities.get(s); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Project.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.util.*; 4 | 5 | /** 6 | * Project is an operator that implements a relational projection. 7 | */ 8 | public class Project extends Operator { 9 | 10 | private static final long serialVersionUID = 1L; 11 | private OpIterator child; 12 | private TupleDesc td; 13 | private ArrayList outFieldIds; 14 | 15 | /** 16 | * Constructor accepts a child operator to read tuples to apply projection 17 | * to and a list of fields in output tuple 18 | * 19 | * @param fieldList 20 | * The ids of the fields child's tupleDesc to project out 21 | * @param typesList 22 | * the types of the fields in the final projection 23 | * @param child 24 | * The child operator 25 | */ 26 | public Project(ArrayList fieldList, ArrayList typesList, 27 | OpIterator child) { 28 | this(fieldList,typesList.toArray(new Type[]{}),child); 29 | } 30 | 31 | public Project(ArrayList fieldList, Type[] types, 32 | OpIterator child) { 33 | this.child = child; 34 | outFieldIds = fieldList; 35 | String[] fieldAr = new String[fieldList.size()]; 36 | TupleDesc childtd = child.getTupleDesc(); 37 | 38 | for (int i = 0; i < fieldAr.length; i++) { 39 | fieldAr[i] = childtd.getFieldName(fieldList.get(i)); 40 | } 41 | td = new TupleDesc(types, fieldAr); 42 | } 43 | 44 | public TupleDesc getTupleDesc() { 45 | return td; 46 | } 47 | 48 | public void open() throws DbException, NoSuchElementException, 49 | TransactionAbortedException { 50 | child.open(); 51 | super.open(); 52 | } 53 | 54 | public void close() { 55 | super.close(); 56 | child.close(); 57 | } 58 | 59 | public void rewind() throws DbException, TransactionAbortedException { 60 | child.rewind(); 61 | } 62 | 63 | /** 64 | * Operator.fetchNext implementation. Iterates over tuples from the child 65 | * operator, projecting out the fields from the tuple 66 | * 67 | * @return The next tuple, or null if there are no more tuples 68 | */ 69 | protected Tuple fetchNext() throws NoSuchElementException, 70 | TransactionAbortedException, DbException { 71 | while (child.hasNext()) { 72 | Tuple t = child.next(); 73 | Tuple newTuple = new Tuple(td); 74 | newTuple.setRecordId(t.getRecordId()); 75 | for (int i = 0; i < td.numFields(); i++) { 76 | newTuple.setField(i, t.getField(outFieldIds.get(i))); 77 | } 78 | return newTuple; 79 | } 80 | return null; 81 | } 82 | 83 | @Override 84 | public OpIterator[] getChildren() { 85 | return new OpIterator[] { this.child }; 86 | } 87 | 88 | @Override 89 | public void setChildren(OpIterator[] children) { 90 | if (this.child!=children[0]) 91 | { 92 | this.child = children[0]; 93 | } 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/RecordId.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * A RecordId is a reference to a specific tuple on a specific page of a 7 | * specific table. 8 | */ 9 | public class RecordId implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | /** 14 | * Creates a new RecordId referring to the specified PageId and tuple 15 | * number. 16 | * 17 | * @param pid 18 | * the pageid of the page on which the tuple resides 19 | * @param tupleno 20 | * the tuple number within the page. 21 | */ 22 | private PageId pid; 23 | private int tupleNum; 24 | public RecordId(PageId pid, int tupleno) { 25 | this.pid = pid; 26 | this.tupleNum = tupleno; 27 | } 28 | 29 | /** 30 | * @return the tuple number this RecordId references. 31 | */ 32 | public int getTupleNumber() { 33 | return tupleNum; 34 | } 35 | 36 | /** 37 | * @return the page id this RecordId references. 38 | */ 39 | public PageId getPageId() { 40 | return pid; 41 | } 42 | 43 | /** 44 | * Two RecordId objects are considered equal if they represent the same 45 | * tuple. 46 | * 47 | * @return True if this and o represent the same tuple 48 | */ 49 | @Override 50 | public boolean equals(Object o) { 51 | if(o==null) 52 | return false; 53 | if(o==this) 54 | return true; 55 | if(!(o instanceof RecordId)) 56 | return false; 57 | RecordId recordId = (RecordId)o; 58 | return recordId.hashCode() == this.hashCode(); 59 | } 60 | 61 | /** 62 | * You should implement the hashCode() so that two equal RecordId instances 63 | * (with respect to equals()) have the same hashCode(). 64 | * 65 | * @return An int that is the same for equal RecordId objects. 66 | */ 67 | @Override 68 | public int hashCode() { 69 | return pid.hashCode() + tupleNum; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/StringField.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.*; 4 | 5 | /** 6 | * Instance of Field that stores a single String of a fixed length. 7 | */ 8 | public class StringField implements Field { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | private final String value; 13 | private final int maxSize; 14 | 15 | public String getValue() { 16 | return value; 17 | } 18 | 19 | /** 20 | * Constructor. 21 | * 22 | * @param s 23 | * The value of this field. 24 | * @param maxSize 25 | * The maximum size of this string 26 | */ 27 | public StringField(String s, int maxSize) { 28 | this.maxSize = maxSize; 29 | 30 | if (s.length() > maxSize) 31 | value = s.substring(0, maxSize); 32 | else 33 | value = s; 34 | } 35 | 36 | public String toString() { 37 | return value; 38 | } 39 | 40 | public int hashCode() { 41 | return value.hashCode(); 42 | } 43 | 44 | public boolean equals(Object field) { 45 | return ((StringField) field).value.equals(value); 46 | } 47 | 48 | /** 49 | * Write this string to dos. Always writes maxSize + 4 bytes to the passed 50 | * in dos. First four bytes are string length, next bytes are string, with 51 | * remainder padded with 0 to maxSize. 52 | * 53 | * @param dos 54 | * Where the string is written 55 | */ 56 | public void serialize(DataOutputStream dos) throws IOException { 57 | String s = value; 58 | int overflow = maxSize - s.length(); 59 | if (overflow < 0) { 60 | String news = s.substring(0, maxSize); 61 | s = news; 62 | } 63 | dos.writeInt(s.length()); 64 | dos.writeBytes(s); 65 | while (overflow-- > 0) 66 | dos.write((byte) 0); 67 | } 68 | 69 | /** 70 | * Compare the specified field to the value of this Field. Return semantics 71 | * are as specified by Field.compare 72 | * 73 | * @throws IllegalCastException 74 | * if val is not a StringField 75 | * @see Field#compare 76 | */ 77 | public boolean compare(Predicate.Op op, Field val) { 78 | 79 | StringField iVal = (StringField) val; 80 | int cmpVal = value.compareTo(iVal.value); 81 | 82 | switch (op) { 83 | case EQUALS: 84 | return cmpVal == 0; 85 | 86 | case NOT_EQUALS: 87 | return cmpVal != 0; 88 | 89 | case GREATER_THAN: 90 | return cmpVal > 0; 91 | 92 | case GREATER_THAN_OR_EQ: 93 | return cmpVal >= 0; 94 | 95 | case LESS_THAN: 96 | return cmpVal < 0; 97 | 98 | case LESS_THAN_OR_EQ: 99 | return cmpVal <= 0; 100 | 101 | case LIKE: 102 | return value.indexOf(iVal.value) >= 0; 103 | } 104 | 105 | return false; 106 | } 107 | 108 | /** 109 | * @return the Type for this Field 110 | */ 111 | public Type getType() { 112 | 113 | return Type.STRING_TYPE; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/StringHistogram.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | /** 4 | * A class to represent a fixed-width histogram over a single String-based 5 | * field. 6 | */ 7 | public class StringHistogram { 8 | final IntHistogram hist; 9 | 10 | /** 11 | * Create a new StringHistogram with a specified number of buckets. 12 | *

13 | * Our implementation is written in terms of an IntHistogram by converting 14 | * each String to an integer. 15 | * 16 | * @param buckets 17 | * the number of buckets 18 | */ 19 | public StringHistogram(int buckets) { 20 | hist = new IntHistogram(buckets, minVal(), maxVal()); 21 | } 22 | 23 | /** 24 | * Convert a string to an integer, with the property that if the return 25 | * value(s1) < return value(s2), then s1 < s2 26 | */ 27 | private int stringToInt(String s) { 28 | int i; 29 | int v = 0; 30 | for (i = 3; i >= 0; i--) { 31 | if (s.length() > 3 - i) { 32 | int ci = (int) s.charAt(3 - i); 33 | v += (ci) << (i * 8); 34 | } 35 | } 36 | 37 | // XXX: hack to avoid getting wrong results for 38 | // strings which don't output in the range min to max 39 | if (!(s.equals("") || s.equals("zzzz"))) { 40 | if (v < minVal()) { 41 | v = minVal(); 42 | } 43 | 44 | if (v > maxVal()) { 45 | v = maxVal(); 46 | } 47 | } 48 | 49 | return v; 50 | } 51 | 52 | /** @return the maximum value indexed by the histogram */ 53 | int maxVal() { 54 | return stringToInt("zzzz"); 55 | } 56 | 57 | /** @return the minimum value indexed by the histogram */ 58 | int minVal() { 59 | return stringToInt(""); 60 | } 61 | 62 | /** Add a new value to thte histogram */ 63 | public void addValue(String s) { 64 | int val = stringToInt(s); 65 | hist.addValue(val); 66 | } 67 | 68 | /** 69 | * Estimate the selectivity (as a double between 0 and 1) of the specified 70 | * predicate over the specified string 71 | * 72 | * @param op 73 | * The operation being applied 74 | * @param s 75 | * The string to apply op to 76 | */ 77 | public double estimateSelectivity(Predicate.Op op, String s) { 78 | int val = stringToInt(s); 79 | return hist.estimateSelectivity(op, val); 80 | } 81 | 82 | /** 83 | * @return the average selectivity of this histogram. 84 | * 85 | * This is not an indispensable method to implement the basic join 86 | * optimization. It may be needed if you want to implement a more 87 | * efficient optimization 88 | * */ 89 | public double avgSelectivity() { 90 | return hist.avgSelectivity(); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Transaction.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.*; 4 | 5 | /** 6 | * Transaction encapsulates information about the state of 7 | * a transaction and manages transaction commit / abort. 8 | */ 9 | 10 | public class Transaction { 11 | private final TransactionId tid; 12 | volatile boolean started = false; 13 | 14 | public Transaction() { 15 | tid = new TransactionId(); 16 | } 17 | 18 | /** Start the transaction running */ 19 | public void start() { 20 | started = true; 21 | try { 22 | Database.getLogFile().logXactionBegin(tid); 23 | } catch (IOException e) { 24 | e.printStackTrace(); 25 | } 26 | } 27 | 28 | public TransactionId getId() { 29 | return tid; 30 | } 31 | 32 | /** Finish the transaction */ 33 | public void commit() throws IOException { 34 | transactionComplete(false); 35 | } 36 | 37 | /** Finish the transaction */ 38 | public void abort() throws IOException { 39 | transactionComplete(true); 40 | } 41 | 42 | /** Handle the details of transaction commit / abort */ 43 | public void transactionComplete(boolean abort) throws IOException { 44 | 45 | if (started) { 46 | //write commit / abort records 47 | if (abort) { 48 | Database.getLogFile().logAbort(tid); //does rollback too 49 | } else { 50 | //write all the dirty pages for this transaction out 51 | Database.getBufferPool().flushPages(tid); 52 | Database.getLogFile().logCommit(tid); 53 | } 54 | 55 | try { 56 | Database.getBufferPool().transactionComplete(tid, !abort); // release locks 57 | } catch (IOException e) { 58 | e.printStackTrace(); 59 | } 60 | 61 | //setting this here means we could possibly write multiple abort records -- OK? 62 | started = false; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/TransactionAbortedException.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.lang.Exception; 4 | 5 | /** Exception that is thrown when a transaction has aborted. */ 6 | public class TransactionAbortedException extends Exception { 7 | private static final long serialVersionUID = 1L; 8 | 9 | public TransactionAbortedException() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/TransactionId.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.io.Serializable; 4 | import java.util.concurrent.atomic.AtomicLong; 5 | 6 | /** 7 | * TransactionId is a class that contains the identifier of a transaction. 8 | */ 9 | public class TransactionId implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | static AtomicLong counter = new AtomicLong(0); 14 | final long myid; 15 | 16 | public TransactionId() { 17 | myid = counter.getAndIncrement(); 18 | } 19 | 20 | public long getId() { 21 | return myid; 22 | } 23 | 24 | @Override 25 | public boolean equals(Object obj) { 26 | if (this == obj) 27 | return true; 28 | if (obj == null) 29 | return false; 30 | if (getClass() != obj.getClass()) 31 | return false; 32 | TransactionId other = (TransactionId) obj; 33 | if (myid != other.myid) 34 | return false; 35 | return true; 36 | } 37 | 38 | @Override 39 | public int hashCode() { 40 | final int prime = 31; 41 | int result = 1; 42 | result = prime * result + (int) (myid ^ (myid >>> 32)); 43 | return result; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/TupleIterator.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.util.*; 4 | 5 | /** 6 | * Implements a OpIterator by wrapping an Iterable. 7 | */ 8 | public class TupleIterator implements OpIterator { 9 | /** 10 | * 11 | */ 12 | private static final long serialVersionUID = 1L; 13 | Iterator i = null; 14 | TupleDesc td = null; 15 | Iterable tuples = null; 16 | 17 | /** 18 | * Constructs an iterator from the specified Iterable, and the specified 19 | * descriptor. 20 | * 21 | * @param tuples 22 | * The set of tuples to iterate over 23 | */ 24 | public TupleIterator(TupleDesc td, Iterable tuples) { 25 | this.td = td; 26 | this.tuples = tuples; 27 | 28 | // check that all tuples are the right TupleDesc 29 | for (Tuple t : tuples) { 30 | if (!t.getTupleDesc().equals(td)) 31 | throw new IllegalArgumentException( 32 | "incompatible tuple in tuple set"); 33 | } 34 | } 35 | 36 | public void open() { 37 | i = tuples.iterator(); 38 | } 39 | 40 | public boolean hasNext() { 41 | return i.hasNext(); 42 | } 43 | 44 | public Tuple next() { 45 | return i.next(); 46 | } 47 | 48 | public void rewind() { 49 | close(); 50 | open(); 51 | } 52 | 53 | public TupleDesc getTupleDesc() { 54 | return td; 55 | } 56 | 57 | public void close() { 58 | i = null; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /simple-db/src/simpledb/Type.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import java.text.ParseException; 4 | import java.io.*; 5 | 6 | /** 7 | * Class representing a type in SimpleDB. 8 | * Types are static objects defined by this class; hence, the Type 9 | * constructor is private. 10 | */ 11 | public enum Type implements Serializable { 12 | INT_TYPE() { 13 | @Override 14 | public int getLen() { 15 | return 4; 16 | } 17 | 18 | @Override 19 | public Field parse(DataInputStream dis) throws ParseException { 20 | try { 21 | return new IntField(dis.readInt()); 22 | } catch (IOException e) { 23 | throw new ParseException("couldn't parse", 0); 24 | } 25 | } 26 | 27 | }, STRING_TYPE() { 28 | @Override 29 | public int getLen() { 30 | return STRING_LEN+4; 31 | } 32 | 33 | @Override 34 | public Field parse(DataInputStream dis) throws ParseException { 35 | try { 36 | int strLen = dis.readInt(); 37 | byte bs[] = new byte[strLen]; 38 | dis.read(bs); 39 | dis.skipBytes(STRING_LEN-strLen); 40 | return new StringField(new String(bs), STRING_LEN); 41 | } catch (IOException e) { 42 | throw new ParseException("couldn't parse", 0); 43 | } 44 | } 45 | }; 46 | 47 | public static final int STRING_LEN = 128; 48 | 49 | /** 50 | * @return the number of bytes required to store a field of this type. 51 | */ 52 | public abstract int getLen(); 53 | 54 | /** 55 | * @return a Field object of the same type as this object that has contents 56 | * read from the specified DataInputStream. 57 | * @param dis The input stream to read from 58 | * @throws ParseException if the data read from the input stream is not 59 | * of the appropriate type. 60 | */ 61 | public abstract Field parse(DataInputStream dis) throws ParseException; 62 | 63 | } 64 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/HeapFileWriteTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import org.junit.After; 4 | import org.junit.Before; 5 | import org.junit.Test; 6 | 7 | import static org.junit.Assert.*; 8 | import junit.framework.JUnit4TestAdapter; 9 | 10 | public class HeapFileWriteTest extends TestUtil.CreateHeapFile { 11 | private TransactionId tid; 12 | 13 | /** 14 | * Set up initial resources for each unit test. 15 | */ 16 | @Before public void setUp() throws Exception { 17 | super.setUp(); 18 | tid = new TransactionId(); 19 | } 20 | 21 | @After public void tearDown() throws Exception { 22 | Database.getBufferPool().transactionComplete(tid); 23 | } 24 | 25 | /** 26 | * Unit test for HeapFile.addTuple() 27 | */ 28 | @Test public void addTuple() throws Exception { 29 | // we should be able to add 504 tuples on an empty page. 30 | for (int i = 0; i < 504; ++i) { 31 | empty.insertTuple(tid, Utility.getHeapTuple(i, 2)); 32 | assertEquals(1, empty.numPages()); 33 | } 34 | 35 | // the next 512 additions should live on a new page 36 | for (int i = 0; i < 504; ++i) { 37 | empty.insertTuple(tid, Utility.getHeapTuple(i, 2)); 38 | assertEquals(2, empty.numPages()); 39 | } 40 | 41 | // and one more, just for fun... 42 | empty.insertTuple(tid, Utility.getHeapTuple(0, 2)); 43 | assertEquals(3, empty.numPages()); 44 | } 45 | 46 | /** 47 | * JUnit suite target 48 | */ 49 | public static junit.framework.Test suite() { 50 | return new JUnit4TestAdapter(HeapFileWriteTest.class); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/HeapPageIdTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertFalse; 5 | import static org.junit.Assert.assertTrue; 6 | import junit.framework.JUnit4TestAdapter; 7 | 8 | import org.junit.Before; 9 | import org.junit.Test; 10 | 11 | import simpledb.systemtest.SimpleDbTestBase; 12 | 13 | public class HeapPageIdTest extends SimpleDbTestBase { 14 | 15 | private HeapPageId pid; 16 | 17 | @Before public void createPid() { 18 | pid = new HeapPageId(1, 1); 19 | } 20 | 21 | /** 22 | * Unit test for HeapPageId.getTableId() 23 | */ 24 | @Test public void getTableId() { 25 | assertEquals(1, pid.getTableId()); 26 | } 27 | 28 | /** 29 | * Unit test for HeapPageId.pageno() 30 | */ 31 | @Test public void pageno() { 32 | assertEquals(1, pid.getPageNumber()); 33 | } 34 | 35 | /** 36 | * Unit test for HeapPageId.hashCode() 37 | */ 38 | @Test public void testHashCode() { 39 | int code1, code2; 40 | 41 | // NOTE(ghuo): the hashCode could be anything. test determinism, 42 | // at least. 43 | pid = new HeapPageId(1, 1); 44 | code1 = pid.hashCode(); 45 | assertEquals(code1, pid.hashCode()); 46 | assertEquals(code1, pid.hashCode()); 47 | 48 | pid = new HeapPageId(2, 2); 49 | code2 = pid.hashCode(); 50 | assertEquals(code2, pid.hashCode()); 51 | assertEquals(code2, pid.hashCode()); 52 | } 53 | 54 | /** 55 | * Unit test for HeapPageId.equals() 56 | */ 57 | @Test public void equals() { 58 | HeapPageId pid1 = new HeapPageId(1, 1); 59 | HeapPageId pid1Copy = new HeapPageId(1, 1); 60 | HeapPageId pid2 = new HeapPageId(2, 2); 61 | 62 | // .equals() with null should return false 63 | assertFalse(pid1.equals(null)); 64 | 65 | // .equals() with the wrong type should return false 66 | assertFalse(pid1.equals(new Object())); 67 | 68 | assertTrue(pid1.equals(pid1)); 69 | assertTrue(pid1.equals(pid1Copy)); 70 | assertTrue(pid1Copy.equals(pid1)); 71 | assertTrue(pid2.equals(pid2)); 72 | 73 | assertFalse(pid1.equals(pid2)); 74 | assertFalse(pid1Copy.equals(pid2)); 75 | assertFalse(pid2.equals(pid1)); 76 | assertFalse(pid2.equals(pid1Copy)); 77 | } 78 | 79 | /** 80 | * JUnit suite target 81 | */ 82 | public static junit.framework.Test suite() { 83 | return new JUnit4TestAdapter(HeapPageIdTest.class); 84 | } 85 | } 86 | 87 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/InsertTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import org.junit.Before; 4 | import org.junit.Test; 5 | 6 | import static org.junit.Assert.assertEquals; 7 | import static org.junit.Assert.assertTrue; 8 | import junit.framework.JUnit4TestAdapter; 9 | 10 | /** 11 | * We reserve more heavy-duty insertion testing for HeapFile and HeapPage. 12 | * This suite is superficial. 13 | */ 14 | public class InsertTest extends TestUtil.CreateHeapFile { 15 | 16 | private OpIterator scan1; 17 | private TransactionId tid; 18 | 19 | /** 20 | * Initialize each unit test 21 | */ 22 | @Before public void setUp() throws Exception { 23 | super.setUp(); 24 | this.scan1 = TestUtil.createTupleList(2, 25 | new int[] { 1, 2, 26 | 1, 4, 27 | 1, 6, 28 | 3, 2, 29 | 3, 4, 30 | 3, 6, 31 | 5, 7 }); 32 | tid = new TransactionId(); 33 | } 34 | 35 | /** 36 | * Unit test for Insert.getTupleDesc() 37 | */ 38 | @Test public void getTupleDesc() throws Exception { 39 | Insert op = new Insert(tid,scan1, empty.getId()); 40 | TupleDesc expected = Utility.getTupleDesc(1); 41 | TupleDesc actual = op.getTupleDesc(); 42 | assertEquals(expected, actual); 43 | } 44 | 45 | /** 46 | * Unit test for Insert.getNext(), inserting elements into an empty file 47 | */ 48 | @Test public void getNext() throws Exception { 49 | Insert op = new Insert(tid,scan1, empty.getId()); 50 | op.open(); 51 | assertTrue(TestUtil.compareTuples( 52 | Utility.getHeapTuple(7, 1), // the length of scan1 53 | op.next())); 54 | 55 | // we should fit on one page 56 | assertEquals(1, empty.numPages()); 57 | } 58 | 59 | /** 60 | * JUnit suite target 61 | */ 62 | public static junit.framework.Test suite() { 63 | return new JUnit4TestAdapter(InsertTest.class); 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/JoinPredicateTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import org.junit.Test; 4 | 5 | import simpledb.systemtest.SimpleDbTestBase; 6 | import static org.junit.Assert.assertTrue; 7 | import static org.junit.Assert.assertFalse; 8 | import junit.framework.JUnit4TestAdapter; 9 | 10 | public class JoinPredicateTest extends SimpleDbTestBase { 11 | 12 | /** 13 | * Unit test for JoinPredicate.filter() 14 | */ 15 | @Test public void filterVaryingVals() { 16 | int[] vals = new int[] { -1, 0, 1 }; 17 | 18 | for (int i : vals) { 19 | JoinPredicate p = new JoinPredicate(0, 20 | Predicate.Op.EQUALS, 0); 21 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i - 1))); 22 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i))); 23 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i + 1))); 24 | } 25 | 26 | for (int i : vals) { 27 | JoinPredicate p = new JoinPredicate(0, 28 | Predicate.Op.GREATER_THAN, 0); 29 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i - 1))); 30 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i))); 31 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i + 1))); 32 | } 33 | 34 | for (int i : vals) { 35 | JoinPredicate p = new JoinPredicate(0, 36 | Predicate.Op.GREATER_THAN_OR_EQ, 0); 37 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i - 1))); 38 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i))); 39 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i + 1))); 40 | } 41 | 42 | for (int i : vals) { 43 | JoinPredicate p = new JoinPredicate(0, 44 | Predicate.Op.LESS_THAN, 0); 45 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i - 1))); 46 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i))); 47 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i + 1))); 48 | } 49 | 50 | for (int i : vals) { 51 | JoinPredicate p = new JoinPredicate(0, 52 | Predicate.Op.LESS_THAN_OR_EQ, 0); 53 | assertFalse(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i - 1))); 54 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i))); 55 | assertTrue(p.filter(Utility.getHeapTuple(i), Utility.getHeapTuple(i + 1))); 56 | } 57 | } 58 | 59 | /** 60 | * JUnit suite target 61 | */ 62 | public static junit.framework.Test suite() { 63 | return new JUnit4TestAdapter(JoinPredicateTest.class); 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/PredicateTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import org.junit.Test; 4 | 5 | import simpledb.systemtest.SimpleDbTestBase; 6 | import static org.junit.Assert.assertTrue; 7 | import static org.junit.Assert.assertFalse; 8 | import junit.framework.JUnit4TestAdapter; 9 | 10 | public class PredicateTest extends SimpleDbTestBase{ 11 | 12 | /** 13 | * Unit test for Predicate.filter() 14 | */ 15 | @Test public void filter() { 16 | int[] vals = new int[] { -1, 0, 1 }; 17 | 18 | for (int i : vals) { 19 | Predicate p = new Predicate(0, Predicate.Op.EQUALS, TestUtil.getField(i)); 20 | assertFalse(p.filter(Utility.getHeapTuple(i - 1))); 21 | assertTrue(p.filter(Utility.getHeapTuple(i))); 22 | assertFalse(p.filter(Utility.getHeapTuple(i + 1))); 23 | } 24 | 25 | for (int i : vals) { 26 | Predicate p = new Predicate(0, Predicate.Op.GREATER_THAN, 27 | TestUtil.getField(i)); 28 | assertFalse(p.filter(Utility.getHeapTuple(i - 1))); 29 | assertFalse(p.filter(Utility.getHeapTuple(i))); 30 | assertTrue(p.filter(Utility.getHeapTuple(i + 1))); 31 | } 32 | 33 | for (int i : vals) { 34 | Predicate p = new Predicate(0, Predicate.Op.GREATER_THAN_OR_EQ, 35 | TestUtil.getField(i)); 36 | assertFalse(p.filter(Utility.getHeapTuple(i - 1))); 37 | assertTrue(p.filter(Utility.getHeapTuple(i))); 38 | assertTrue(p.filter(Utility.getHeapTuple(i + 1))); 39 | } 40 | 41 | for (int i : vals) { 42 | Predicate p = new Predicate(0, Predicate.Op.LESS_THAN, 43 | TestUtil.getField(i)); 44 | assertTrue(p.filter(Utility.getHeapTuple(i - 1))); 45 | assertFalse(p.filter(Utility.getHeapTuple(i))); 46 | assertFalse(p.filter(Utility.getHeapTuple(i + 1))); 47 | } 48 | 49 | for (int i : vals) { 50 | Predicate p = new Predicate(0, Predicate.Op.LESS_THAN_OR_EQ, 51 | TestUtil.getField(i)); 52 | assertTrue(p.filter(Utility.getHeapTuple(i - 1))); 53 | assertTrue(p.filter(Utility.getHeapTuple(i))); 54 | assertFalse(p.filter(Utility.getHeapTuple(i + 1))); 55 | } 56 | } 57 | 58 | /** 59 | * JUnit suite target 60 | */ 61 | public static junit.framework.Test suite() { 62 | return new JUnit4TestAdapter(PredicateTest.class); 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/RecordIdTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertFalse; 5 | import junit.framework.JUnit4TestAdapter; 6 | 7 | import org.junit.Before; 8 | import org.junit.Test; 9 | 10 | import simpledb.systemtest.SimpleDbTestBase; 11 | 12 | public class RecordIdTest extends SimpleDbTestBase { 13 | 14 | private static RecordId hrid; 15 | private static RecordId hrid2; 16 | private static RecordId hrid3; 17 | private static RecordId hrid4; 18 | 19 | @Before public void createPids() { 20 | HeapPageId hpid = new HeapPageId(-1, 2); 21 | HeapPageId hpid2 = new HeapPageId(-1, 2); 22 | HeapPageId hpid3 = new HeapPageId(-2, 2); 23 | hrid = new RecordId(hpid, 3); 24 | hrid2 = new RecordId(hpid2, 3); 25 | hrid3 = new RecordId(hpid, 4); 26 | hrid4 = new RecordId(hpid3, 3); 27 | 28 | } 29 | 30 | /** 31 | * Unit test for RecordId.getPageId() 32 | */ 33 | @Test public void getPageId() { 34 | HeapPageId hpid = new HeapPageId(-1, 2); 35 | assertEquals(hpid, hrid.getPageId()); 36 | 37 | } 38 | 39 | /** 40 | * Unit test for RecordId.getTupleNumber() 41 | */ 42 | @Test public void tupleno() { 43 | assertEquals(3, hrid.getTupleNumber()); 44 | } 45 | 46 | /** 47 | * Unit test for RecordId.equals() 48 | */ 49 | @Test public void equals() { 50 | assertEquals(hrid, hrid2); 51 | assertEquals(hrid2, hrid); 52 | assertFalse(hrid.equals(hrid3)); 53 | assertFalse(hrid3.equals(hrid)); 54 | assertFalse(hrid2.equals(hrid4)); 55 | assertFalse(hrid4.equals(hrid2)); 56 | } 57 | 58 | /** 59 | * Unit test for RecordId.hashCode() 60 | */ 61 | @Test public void hCode() { 62 | assertEquals(hrid.hashCode(), hrid2.hashCode()); 63 | } 64 | 65 | /** 66 | * JUnit suite target 67 | */ 68 | public static junit.framework.Test suite() { 69 | return new JUnit4TestAdapter(RecordIdTest.class); 70 | } 71 | } 72 | 73 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/TupleTest.java: -------------------------------------------------------------------------------- 1 | package simpledb; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import junit.framework.JUnit4TestAdapter; 5 | 6 | import org.junit.Test; 7 | 8 | import simpledb.systemtest.SimpleDbTestBase; 9 | 10 | public class TupleTest extends SimpleDbTestBase { 11 | 12 | /** 13 | * Unit test for Tuple.getField() and Tuple.setField() 14 | */ 15 | @Test public void modifyFields() { 16 | TupleDesc td = Utility.getTupleDesc(2); 17 | 18 | Tuple tup = new Tuple(td); 19 | tup.setField(0, new IntField(-1)); 20 | tup.setField(1, new IntField(0)); 21 | 22 | assertEquals(new IntField(-1), tup.getField(0)); 23 | assertEquals(new IntField(0), tup.getField(1)); 24 | 25 | tup.setField(0, new IntField(1)); 26 | tup.setField(1, new IntField(37)); 27 | 28 | assertEquals(new IntField(1), tup.getField(0)); 29 | assertEquals(new IntField(37), tup.getField(1)); 30 | } 31 | 32 | /** 33 | * Unit test for Tuple.getTupleDesc() 34 | */ 35 | @Test public void getTupleDesc() { 36 | TupleDesc td = Utility.getTupleDesc(5); 37 | Tuple tup = new Tuple(td); 38 | assertEquals(td, tup.getTupleDesc()); 39 | } 40 | 41 | /** 42 | * Unit test for Tuple.getRecordId() and Tuple.setRecordId() 43 | */ 44 | @Test public void modifyRecordId() { 45 | Tuple tup1 = new Tuple(Utility.getTupleDesc(1)); 46 | HeapPageId pid1 = new HeapPageId(0,0); 47 | RecordId rid1 = new RecordId(pid1, 0); 48 | tup1.setRecordId(rid1); 49 | 50 | try { 51 | assertEquals(rid1, tup1.getRecordId()); 52 | } catch (java.lang.UnsupportedOperationException e) { 53 | //rethrow the exception with an explanation 54 | throw new UnsupportedOperationException("modifyRecordId() test failed due to " + 55 | "RecordId.equals() not being implemented. This is not required for Lab 1, " + 56 | "but should pass when you do implement the RecordId class."); 57 | } 58 | } 59 | 60 | /** 61 | * JUnit suite target 62 | */ 63 | public static junit.framework.Test suite() { 64 | return new JUnit4TestAdapter(TupleTest.class); 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/systemtest/AbortEvictionTest.java: -------------------------------------------------------------------------------- 1 | package simpledb.systemtest; 2 | 3 | import java.io.IOException; 4 | 5 | import simpledb.*; 6 | 7 | import static org.junit.Assert.*; 8 | import org.junit.Test; 9 | 10 | public class AbortEvictionTest extends SimpleDbTestBase { 11 | /** Aborts a transaction and ensures that its effects were actually undone. 12 | * This requires dirty pages to not get flushed to disk. 13 | */ 14 | @Test public void testDoNotEvictDirtyPages() 15 | throws IOException, DbException, TransactionAbortedException { 16 | // Allocate a file with ~10 pages of data 17 | HeapFile f = SystemTestUtil.createRandomHeapFile(2, 512*10, null, null); 18 | Database.resetBufferPool(2); 19 | 20 | // BEGIN TRANSACTION 21 | Transaction t = new Transaction(); 22 | t.start(); 23 | 24 | // Insert a new row 25 | EvictionTest.insertRow(f, t); 26 | 27 | // The tuple must exist in the table 28 | boolean found = EvictionTest.findMagicTuple(f, t); 29 | assertTrue(found); 30 | // ABORT 31 | t.transactionComplete(true); 32 | 33 | // A second transaction must not find the tuple 34 | t = new Transaction(); 35 | t.start(); 36 | found = EvictionTest.findMagicTuple(f, t); 37 | assertFalse(found); 38 | t.commit(); 39 | } 40 | 41 | /** Make test compatible with older version of ant. */ 42 | public static junit.framework.Test suite() { 43 | return new junit.framework.JUnit4TestAdapter(AbortEvictionTest.class); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/systemtest/DeleteTest.java: -------------------------------------------------------------------------------- 1 | package simpledb.systemtest; 2 | 3 | import simpledb.*; 4 | 5 | import java.io.IOException; 6 | import java.util.ArrayList; 7 | 8 | import static org.junit.Assert.*; 9 | 10 | public class DeleteTest extends FilterBase { 11 | ArrayList> expectedTuples = null; 12 | 13 | @Override 14 | protected int applyPredicate(HeapFile table, TransactionId tid, Predicate predicate) 15 | throws DbException, TransactionAbortedException, IOException { 16 | SeqScan ss = new SeqScan(tid, table.getId(), ""); 17 | Filter filter = new Filter(predicate, ss); 18 | //System.out.println(filter); 19 | Delete deleteOperator = new Delete(tid, filter); 20 | // Query q = new Query(deleteOperator, tid); 21 | 22 | // q.start(); 23 | deleteOperator.open(); 24 | boolean hasResult = false; 25 | int result = -1; 26 | //System.out.println("?:"+deleteOperator.hasNext()); 27 | while (deleteOperator.hasNext()) { 28 | Tuple t = deleteOperator.next(); 29 | assertFalse(hasResult); 30 | hasResult = true; 31 | //System.out.println(1); 32 | assertEquals(SystemTestUtil.SINGLE_INT_DESCRIPTOR, t.getTupleDesc()); 33 | result = ((IntField) t.getField(0)).getValue(); 34 | } 35 | //System.out.println(hasResult); 36 | assertTrue(hasResult); 37 | 38 | deleteOperator.close(); 39 | 40 | // As part of the same transaction, scan the table 41 | if (result == 0) { 42 | // Deleted zero tuples: all tuples still in table 43 | expectedTuples = createdTuples; 44 | } else { 45 | assert result == createdTuples.size(); 46 | expectedTuples = new ArrayList>(); 47 | } 48 | SystemTestUtil.matchTuples(table, tid, expectedTuples); 49 | return result; 50 | } 51 | 52 | @Override 53 | protected void validateAfter(HeapFile table) 54 | throws DbException, TransactionAbortedException, IOException { 55 | // As part of a different transaction, scan the table 56 | SystemTestUtil.matchTuples(table, expectedTuples); 57 | } 58 | 59 | /** Make test compatible with older version of ant. */ 60 | public static junit.framework.Test suite() { 61 | return new junit.framework.JUnit4TestAdapter(DeleteTest.class); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/systemtest/FilterTest.java: -------------------------------------------------------------------------------- 1 | package simpledb.systemtest; 2 | 3 | import java.io.IOException; 4 | import static org.junit.Assert.*; 5 | import simpledb.*; 6 | 7 | public class FilterTest extends FilterBase { 8 | @Override 9 | protected int applyPredicate(HeapFile table, TransactionId tid, Predicate predicate) 10 | throws DbException, TransactionAbortedException, IOException { 11 | SeqScan ss = new SeqScan(tid, table.getId(), ""); 12 | Filter filter = new Filter(predicate, ss); 13 | filter.open(); 14 | 15 | int resultCount = 0; 16 | while (filter.hasNext()) { 17 | assertNotNull(filter.next()); 18 | resultCount += 1; 19 | } 20 | 21 | filter.close(); 22 | return resultCount; 23 | } 24 | 25 | /** Make test compatible with older version of ant. */ 26 | public static junit.framework.Test suite() { 27 | return new junit.framework.JUnit4TestAdapter(FilterTest.class); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/systemtest/InsertTest.java: -------------------------------------------------------------------------------- 1 | package simpledb.systemtest; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import simpledb.*; 6 | 7 | import static org.junit.Assert.*; 8 | import org.junit.Test; 9 | 10 | public class InsertTest extends SimpleDbTestBase { 11 | private void validateInsert(int columns, int sourceRows, int destinationRows) 12 | throws DbException, IOException, TransactionAbortedException { 13 | // Create the two tables 14 | ArrayList> sourceTuples = new ArrayList>(); 15 | HeapFile source = SystemTestUtil.createRandomHeapFile( 16 | columns, sourceRows, null, sourceTuples); 17 | assert sourceTuples.size() == sourceRows; 18 | ArrayList> destinationTuples = new ArrayList>(); 19 | HeapFile destination = SystemTestUtil.createRandomHeapFile( 20 | columns, destinationRows, null, destinationTuples); 21 | assert destinationTuples.size() == destinationRows; 22 | 23 | // Insert source into destination 24 | TransactionId tid = new TransactionId(); 25 | SeqScan ss = new SeqScan(tid, source.getId(), ""); 26 | Insert insOp = new Insert(tid, ss, destination.getId()); 27 | 28 | // Query q = new Query(insOp, tid); 29 | insOp.open(); 30 | boolean hasResult = false; 31 | while (insOp.hasNext()) { 32 | Tuple tup = insOp.next(); 33 | assertFalse(hasResult); 34 | hasResult = true; 35 | assertEquals(SystemTestUtil.SINGLE_INT_DESCRIPTOR, tup.getTupleDesc()); 36 | assertEquals(sourceRows, ((IntField) tup.getField(0)).getValue()); 37 | } 38 | assertTrue(hasResult); 39 | insOp.close(); 40 | 41 | // As part of the same transaction, scan the table 42 | sourceTuples.addAll(destinationTuples); 43 | SystemTestUtil.matchTuples(destination, tid, sourceTuples); 44 | 45 | // As part of a different transaction, scan the table 46 | Database.getBufferPool().transactionComplete(tid); 47 | Database.getBufferPool().flushAllPages(); 48 | SystemTestUtil.matchTuples(destination, sourceTuples); 49 | } 50 | 51 | @Test public void testEmptyToEmpty() 52 | throws IOException, DbException, TransactionAbortedException { 53 | validateInsert(3, 0, 0); 54 | } 55 | 56 | @Test public void testEmptyToOne() 57 | throws IOException, DbException, TransactionAbortedException { 58 | validateInsert(8, 0, 1); 59 | } 60 | 61 | @Test public void testOneToEmpty() 62 | throws IOException, DbException, TransactionAbortedException { 63 | validateInsert(3, 1, 0); 64 | } 65 | 66 | @Test public void testOneToOne() 67 | throws IOException, DbException, TransactionAbortedException { 68 | validateInsert(1, 1, 1); 69 | } 70 | 71 | /** Make test compatible with older version of ant. */ 72 | public static junit.framework.Test suite() { 73 | return new junit.framework.JUnit4TestAdapter(InsertTest.class); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/systemtest/JoinTest.java: -------------------------------------------------------------------------------- 1 | package simpledb.systemtest; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.HashMap; 6 | 7 | import org.junit.Test; 8 | 9 | import simpledb.*; 10 | 11 | public class JoinTest extends SimpleDbTestBase { 12 | private static final int COLUMNS = 2; 13 | public void validateJoin(int table1ColumnValue, int table1Rows, int table2ColumnValue, 14 | int table2Rows) 15 | throws IOException, DbException, TransactionAbortedException { 16 | // Create the two tables 17 | HashMap columnSpecification = new HashMap(); 18 | columnSpecification.put(0, table1ColumnValue); 19 | ArrayList> t1Tuples = new ArrayList>(); 20 | HeapFile table1 = SystemTestUtil.createRandomHeapFile( 21 | COLUMNS, table1Rows, columnSpecification, t1Tuples); 22 | assert t1Tuples.size() == table1Rows; 23 | 24 | columnSpecification.put(0, table2ColumnValue); 25 | ArrayList> t2Tuples = new ArrayList>(); 26 | HeapFile table2 = SystemTestUtil.createRandomHeapFile( 27 | COLUMNS, table2Rows, columnSpecification, t2Tuples); 28 | assert t2Tuples.size() == table2Rows; 29 | 30 | // Generate the expected results 31 | ArrayList> expectedResults = new ArrayList>(); 32 | for (ArrayList t1 : t1Tuples) { 33 | for (ArrayList t2 : t2Tuples) { 34 | // If the columns match, join the tuples 35 | if (t1.get(0).equals(t2.get(0))) { 36 | ArrayList out = new ArrayList(t1); 37 | out.addAll(t2); 38 | expectedResults.add(out); 39 | } 40 | } 41 | } 42 | 43 | // Begin the join 44 | TransactionId tid = new TransactionId(); 45 | SeqScan ss1 = new SeqScan(tid, table1.getId(), ""); 46 | SeqScan ss2 = new SeqScan(tid, table2.getId(), ""); 47 | JoinPredicate p = new JoinPredicate(0, Predicate.Op.EQUALS, 0); 48 | Join joinOp = new Join(p, ss1, ss2); 49 | 50 | // test the join results 51 | SystemTestUtil.matchTuples(joinOp, expectedResults); 52 | 53 | joinOp.close(); 54 | Database.getBufferPool().transactionComplete(tid); 55 | } 56 | 57 | @Test public void testSingleMatch() 58 | throws IOException, DbException, TransactionAbortedException { 59 | validateJoin(1, 1, 1, 1); 60 | } 61 | 62 | @Test public void testNoMatch() 63 | throws IOException, DbException, TransactionAbortedException { 64 | validateJoin(1, 2, 2, 10); 65 | } 66 | 67 | @Test public void testMultipleMatch() 68 | throws IOException, DbException, TransactionAbortedException { 69 | validateJoin(1, 3, 1, 3); 70 | } 71 | 72 | /** Make test compatible with older version of ant. */ 73 | public static junit.framework.Test suite() { 74 | return new junit.framework.JUnit4TestAdapter(JoinTest.class); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /simple-db/test/simpledb/systemtest/SimpleDbTestBase.java: -------------------------------------------------------------------------------- 1 | package simpledb.systemtest; 2 | 3 | import org.junit.Before; 4 | 5 | import simpledb.Database; 6 | 7 | /** 8 | * Base class for all SimpleDb test classes. 9 | * @author nizam 10 | * 11 | */ 12 | public class SimpleDbTestBase { 13 | /** 14 | * Reset the database before each test is run. 15 | */ 16 | @Before public void setUp() throws Exception { 17 | Database.reset(); 18 | } 19 | 20 | } 21 | --------------------------------------------------------------------------------