================================================================================ PROJECT 3: QUERY EXECUTION ENGINE & QUERY OPTIMIZER SQLLogicTest Execution Log Timestamp: Sun Nov 1 10:14:56 UTC 2026 ================================================================================ >>> Running CTest for Project 3 Targets (p3.01 - p3.19): UpdateCTestConfiguration from :/mnt/c/Users/nares/Workspace/bustub/build/DartConfiguration.tcl Test project /mnt/c/Users/nares/Workspace/bustub/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 75 Start 75: SQLLogicTest.p3.01-seqscan 75: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.01-seqscan.slt" "--verbose" "-d" "--in-memory" 75: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 75: Test timeout computed to be: 10000000 75:
:3 75: select * from test_simple_seq_1; 75: --- YOUR RESULT --- 75: 0 75: 1 75: 2 75: 3 75: 4 75: 5 75: 6 75: 7 75: 8 75: 9 75: 75: --- EXPECTED RESULT --- 75: 0 75: 1 75: 2 75: 3 75: 4 75: 5 75: 6 75: 7 75: 8 75: 9 75: 75:
:17 75: select * from test_simple_seq_2; 75: --- YOUR RESULT --- 75: 0 10 75: 1 11 75: 2 12 75: 3 13 75: 4 14 75: 5 15 75: 6 16 75: 7 17 75: 8 18 75: 9 19 75: 75: --- EXPECTED RESULT --- 75: 0 10 75: 1 11 75: 2 12 75: 3 13 75: 4 14 75: 5 15 75: 6 16 75: 7 17 75: 8 18 75: 9 19 75: 75:
:31 75: select col2, col1 from test_simple_seq_2; 75: --- YOUR RESULT --- 75: 10 0 75: 11 1 75: 12 2 75: 13 3 75: 14 4 75: 15 5 75: 16 6 75: 17 7 75: 18 8 75: 19 9 75: 75: --- EXPECTED RESULT --- 75: 10 0 75: 11 1 75: 12 2 75: 13 3 75: 14 4 75: 15 5 75: 16 6 75: 17 7 75: 18 8 75: 19 9 75: 75:
:45 75: select col2 + col1 from test_simple_seq_2; 75: --- YOUR RESULT --- 75: 10 75: 12 75: 14 75: 16 75: 18 75: 20 75: 22 75: 24 75: 26 75: 28 75: 75: --- EXPECTED RESULT --- 75: 10 75: 12 75: 14 75: 16 75: 18 75: 20 75: 22 75: 24 75: 26 75: 28 75: 1/19 Test #75: SQLLogicTest.p3.01-seqscan ............... Passed 0.22 sec test 76 Start 76: SQLLogicTest.p3.02-insert 76: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.02-insert.slt" "--verbose" "-d" "--in-memory" 76: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 76: Test timeout computed to be: 10000000 76:
:4 76: create table t1(v1 int, v2 varchar(128), v3 int); 76: ---- 76: Table created with id = 32 76: 76:
:8 76: insert into t1 values (0, '🥰', 10), (1, '🥰🥰', 11), (2, '🥰🥰🥰', 12), (3, '🥰🥰🥰🥰', 13), (4, '🥰🥰🥰🥰🥰', 14); 76: --- YOUR RESULT --- 76: 5 76: 76: --- EXPECTED RESULT --- 76: 5 76: 76:
:13 76: select * from t1; 76: --- YOUR RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76: --- EXPECTED RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76:
:23 76: insert into t1 values (0, '🥰', 10), (1, '🥰🥰', 11), (2, '🥰🥰🥰', 12), (3, '🥰🥰🥰🥰', 13), (4, '🥰🥰🥰🥰🥰', 14); 76: --- YOUR RESULT --- 76: 5 76: 76: --- EXPECTED RESULT --- 76: 5 76: 76:
:28 76: select * from t1; 76: --- YOUR RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76: --- EXPECTED RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76:
:43 76: create table t2(v1 int, v2 varchar(128), v3 int); 76: ---- 76: Table created with id = 33 76: 76:
:46 76: insert into t2 select * from t1; 76: --- YOUR RESULT --- 76: 10 76: 76: --- EXPECTED RESULT --- 76: 10 76: 76:
:51 76: select * from t2; 76: --- YOUR RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76: --- EXPECTED RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76:
:66 76: insert into t2 select * from t1 where v1 != v1; 76: --- YOUR RESULT --- 76: 0 76: 76: --- EXPECTED RESULT --- 76: 0 76: 76:
:71 76: select * from t2; 76: --- YOUR RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76: --- EXPECTED RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 76:
:87 76: insert into t2 select * from t1 where v1 <= 2; 76: --- YOUR RESULT --- 76: 6 76: 76: --- EXPECTED RESULT --- 76: 6 76: 76:
:92 76: select * from t2; 76: --- YOUR RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 76: --- EXPECTED RESULT --- 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 3 🥰🥰🥰🥰 13 76: 4 🥰🥰🥰🥰🥰 14 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 0 🥰 10 76: 1 🥰🥰 11 76: 2 🥰🥰🥰 12 76: 76:
:113 76: create table t3(v1 int, v2 varchar(128), v3 int); 76: ---- 76: Table created with id = 34 76: 76:
:117 76: insert into t3 select v1+233, v2, v3+v1 from t1; 76: --- YOUR RESULT --- 76: 10 76: 76: --- EXPECTED RESULT --- 76: 10 76: 76:
:122 76: select * from t3; 76: --- YOUR RESULT --- 76: 233 🥰 10 76: 234 🥰🥰 12 76: 235 🥰🥰🥰 14 76: 236 🥰🥰🥰🥰 16 76: 237 🥰🥰🥰🥰🥰 18 76: 233 🥰 10 76: 234 🥰🥰 12 76: 235 🥰🥰🥰 14 76: 236 🥰🥰🥰🥰 16 76: 237 🥰🥰🥰🥰🥰 18 76: 76: --- EXPECTED RESULT --- 76: 233 🥰 10 76: 234 🥰🥰 12 76: 235 🥰🥰🥰 14 76: 236 🥰🥰🥰🥰 16 76: 237 🥰🥰🥰🥰🥰 18 76: 233 🥰 10 76: 234 🥰🥰 12 76: 235 🥰🥰🥰 14 76: 236 🥰🥰🥰🥰 16 76: 237 🥰🥰🥰🥰🥰 18 76: 2/19 Test #76: SQLLogicTest.p3.02-insert ................ Passed 0.32 sec test 77 Start 77: SQLLogicTest.p3.03-update 77: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.03-update.slt" "--verbose" "-d" "--in-memory" 77: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 77: Test timeout computed to be: 10000000 77:
:4 77: create table t1(v1 int, v2 varchar(128), v3 int); 77: ---- 77: Table created with id = 32 77: 77:
:8 77: insert into t1 values (0, '🥰', 10), (1, '🥰🥰', 11), (2, '🥰🥰🥰', 12), (3, '🥰🥰🥰🥰', 13), (4, '🥰🥰🥰🥰🥰', 14); 77: --- YOUR RESULT --- 77: 5 77: 77: --- EXPECTED RESULT --- 77: 5 77: 77:
:13 77: select * from t1; 77: --- YOUR RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 13 77: 4 🥰🥰🥰🥰🥰 14 77: 77: --- EXPECTED RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 13 77: 4 🥰🥰🥰🥰🥰 14 77: 77:
:23 77: update t1 set v3 = 445 where v1 >= 3; 77: --- YOUR RESULT --- 77: 2 77: 77: --- EXPECTED RESULT --- 77: 2 77: 77:
:28 77: select * from t1; 77: --- YOUR RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 445 77: 4 🥰🥰🥰🥰🥰 445 77: 77: --- EXPECTED RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 445 77: 4 🥰🥰🥰🥰🥰 445 77: 77:
:39 77: insert into t1 values (0, '🥰', 10), (1, '🥰🥰', 11), (2, '🥰🥰🥰', 12), (3, '🥰🥰🥰🥰', 13), (4, '🥰🥰🥰🥰🥰', 14); 77: --- YOUR RESULT --- 77: 5 77: 77: --- EXPECTED RESULT --- 77: 5 77: 77:
:45 77: select * from t1; 77: --- YOUR RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 445 77: 4 🥰🥰🥰🥰🥰 445 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 13 77: 4 🥰🥰🥰🥰🥰 14 77: 77: --- EXPECTED RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 445 77: 4 🥰🥰🥰🥰🥰 445 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 13 77: 4 🥰🥰🥰🥰🥰 14 77: 77:
:60 77: update t1 set v3 = 645 where v1 >= 3; 77: --- YOUR RESULT --- 77: 4 77: 77: --- EXPECTED RESULT --- 77: 4 77: 77:
:65 77: select * from t1; 77: --- YOUR RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 77: --- EXPECTED RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 77:
:80 77: update t1 set v3 = 645 where v1 >= 5; 77: --- YOUR RESULT --- 77: 0 77: 77: --- EXPECTED RESULT --- 77: 0 77: 77:
:85 77: select * from t1; 77: --- YOUR RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 77: --- EXPECTED RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 0 🥰 10 77: 1 🥰🥰 11 77: 2 🥰🥰🥰 12 77: 3 🥰🥰🥰🥰 645 77: 4 🥰🥰🥰🥰🥰 645 77: 77:
:99 77: update t1 set v3 = v3 + v1; 77: --- YOUR RESULT --- 77: 10 77: 77: --- EXPECTED RESULT --- 77: 10 77: 77:
:104 77: select * from t1; 77: --- YOUR RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 12 77: 2 🥰🥰🥰 14 77: 3 🥰🥰🥰🥰 648 77: 4 🥰🥰🥰🥰🥰 649 77: 0 🥰 10 77: 1 🥰🥰 12 77: 2 🥰🥰🥰 14 77: 3 🥰🥰🥰🥰 648 77: 4 🥰🥰🥰🥰🥰 649 77: 77: --- EXPECTED RESULT --- 77: 0 🥰 10 77: 1 🥰🥰 12 77: 2 🥰🥰🥰 14 77: 3 🥰🥰🥰🥰 648 77: 4 🥰🥰🥰🥰🥰 649 77: 0 🥰 10 77: 1 🥰🥰 12 77: 2 🥰🥰🥰 14 77: 3 🥰🥰🥰🥰 648 77: 4 🥰🥰🥰🥰🥰 649 77: 3/19 Test #77: SQLLogicTest.p3.03-update ................ Passed 0.18 sec test 78 Start 78: SQLLogicTest.p3.04-delete 78: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.04-delete.slt" "--verbose" "-d" "--in-memory" 78: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 78: Test timeout computed to be: 10000000 78:
:4 78: create table t1(v1 int, v2 varchar(128), v3 int); 78: ---- 78: Table created with id = 32 78: 78:
:8 78: insert into t1 values (0, '🥰', 10), (1, '🥰🥰', 11), (2, '🥰🥰🥰', 12), (3, '🥰🥰🥰🥰', 13), (4, '🥰🥰🥰🥰🥰', 14); 78: --- YOUR RESULT --- 78: 5 78: 78: --- EXPECTED RESULT --- 78: 5 78: 78:
:13 78: select * from t1; 78: --- YOUR RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 3 🥰🥰🥰🥰 13 78: 4 🥰🥰🥰🥰🥰 14 78: 78: --- EXPECTED RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 3 🥰🥰🥰🥰 13 78: 4 🥰🥰🥰🥰🥰 14 78: 78:
:23 78: delete from t1 where v1 >= 3 78: --- YOUR RESULT --- 78: 2 78: 78: --- EXPECTED RESULT --- 78: 2 78: 78:
:28 78: select * from t1; 78: --- YOUR RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 78: --- EXPECTED RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 78:
:36 78: delete from t1; 78: --- YOUR RESULT --- 78: 3 78: 78: --- EXPECTED RESULT --- 78: 3 78: 78:
:41 78: select * from t1; 78: --- YOUR RESULT --- 78: 78: --- EXPECTED RESULT --- 78: 78:
:46 78: insert into t1 values (0, '🥰', 10), (1, '🥰🥰', 11), (2, '🥰🥰🥰', 12), (3, '🥰🥰🥰🥰', 13), (4, '🥰🥰🥰🥰🥰', 14); 78: --- YOUR RESULT --- 78: 5 78: 78: --- EXPECTED RESULT --- 78: 5 78: 78:
:51 78: select * from t1; 78: --- YOUR RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 3 🥰🥰🥰🥰 13 78: 4 🥰🥰🥰🥰🥰 14 78: 78: --- EXPECTED RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 3 🥰🥰🥰🥰 13 78: 4 🥰🥰🥰🥰🥰 14 78: 78:
:61 78: delete from t1 where v1 >= 3 78: --- YOUR RESULT --- 78: 2 78: 78: --- EXPECTED RESULT --- 78: 2 78: 78:
:66 78: select * from t1; 78: --- YOUR RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 78: --- EXPECTED RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 78:
:74 78: delete from t1 where v1 != v1; 78: --- YOUR RESULT --- 78: 0 78: 78: --- EXPECTED RESULT --- 78: 0 78: 78:
:79 78: select * from t1; 78: --- YOUR RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 78: --- EXPECTED RESULT --- 78: 0 🥰 10 78: 1 🥰🥰 11 78: 2 🥰🥰🥰 12 78: 78:
:87 78: delete from t1; 78: --- YOUR RESULT --- 78: 3 78: 78: --- EXPECTED RESULT --- 78: 3 78: 78:
:92 78: select * from t1; 78: --- YOUR RESULT --- 78: 78: --- EXPECTED RESULT --- 78: 4/19 Test #78: SQLLogicTest.p3.04-delete ................ Passed 0.22 sec test 79 Start 79: SQLLogicTest.p3.05-index-scan-btree 79: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.05-index-scan-btree.slt" "--verbose" "-d" "--in-memory" 79: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 79: Test timeout computed to be: 10000000 79:
:4 79: set force_optimizer_starter_rule=yes 79: ---- 79: 79:
:8 79: create table t1(v1 int, v2 int, v3 int); 79: ---- 79: Table created with id = 32 79: 79:
:11 79: insert into t1 values (1, 50, 645), (2, 40, 721), (4, 20, 445), (5, 10, 445), (3, 30, 645); 79: --- YOUR RESULT --- 79: 5 79: 79: --- EXPECTED RESULT --- 79: 5 79: 79:
:17 79: create index t1v1 on t1(v1); 79: ---- 79: Index created with id = 0 with type = BPlusTree 79: 79:
:20 79: create index t1v2 on t1(v2); 79: ---- 79: Index created with id = 1 with type = BPlusTree 79: 79:
:23 79: explain select * from t1 order by v1; 79: ---- 79: === BINDER === 79: BoundSelect { 79: table=BoundBaseTableRef { table=t1, oid=32 }, 79: columns=["t1.v1", "t1.v2", "t1.v3"], 79: groupBy=[], 79: having=, 79: where=, 79: limit=, 79: offset=, 79: order_by=["BoundOrderBy { type=Default, nulls=Default, expr=t1.v1 }"], 79: is_distinct=false, 79: ctes=, 79: } 79: === PLANNER === 79: ExternalMergeSort { order_bys=[("Default", "Default", "#0.0")] } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: Projection { exprs=["#0.0", "#0.1", "#0.2"] } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: SeqScan { table=t1 } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: === OPTIMIZER === 79: IndexScan { index_oid=0 } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: 79: 79:
:26 79: explain select * from t1 order by v2; 79: ---- 79: === BINDER === 79: BoundSelect { 79: table=BoundBaseTableRef { table=t1, oid=32 }, 79: columns=["t1.v1", "t1.v2", "t1.v3"], 79: groupBy=[], 79: having=, 79: where=, 79: limit=, 79: offset=, 79: order_by=["BoundOrderBy { type=Default, nulls=Default, expr=t1.v2 }"], 79: is_distinct=false, 79: ctes=, 79: } 79: === PLANNER === 79: ExternalMergeSort { order_bys=[("Default", "Default", "#0.1")] } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: Projection { exprs=["#0.0", "#0.1", "#0.2"] } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: SeqScan { table=t1 } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: === OPTIMIZER === 79: IndexScan { index_oid=1 } | (t1.v1:INTEGER, t1.v2:INTEGER, t1.v3:INTEGER) 79: 79: 79:
:29 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 50 645 79: 2 40 721 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 79: --- EXPECTED RESULT --- 79: 1 50 645 79: 2 40 721 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 79:
:38 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 2 40 721 79: 1 50 645 79: 79: --- EXPECTED RESULT --- 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 2 40 721 79: 1 50 645 79: 79:
:47 79: select * from t1 where v1 = 2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 2 40 721 79: 79: --- EXPECTED RESULT --- 79: 2 40 721 79: 79:
:52 79: select * from t1 where 4 = v1 or v1 = 7; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 4 20 445 79: 79: --- EXPECTED RESULT --- 79: 4 20 445 79: 79:
:58 79: insert into t1 values (6, 0, 721), (7, -10, 645); 79: --- YOUR RESULT --- 79: 2 79: 79: --- EXPECTED RESULT --- 79: 2 79: 79:
:63 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 50 645 79: 2 40 721 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 79: --- EXPECTED RESULT --- 79: 1 50 645 79: 2 40 721 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 79:
:74 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 2 40 721 79: 1 50 645 79: 79: --- EXPECTED RESULT --- 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 2 40 721 79: 1 50 645 79: 79:
:85 79: select * from t1 where 4 = v1 or v1 = 7; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 4 20 445 79: 7 -10 645 79: 79: --- EXPECTED RESULT --- 79: 4 20 445 79: 7 -10 645 79: 79:
:92 79: update t1 set v3 = 645, v1 = 8, v2 = -20 where v1 = 2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 79: 79: --- EXPECTED RESULT --- 79: 1 79: 79:
:97 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 50 645 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 8 -20 645 79: 79: --- EXPECTED RESULT --- 79: 1 50 645 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 8 -20 645 79: 79:
:108 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 8 -20 645 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 1 50 645 79: 79: --- EXPECTED RESULT --- 79: 8 -20 645 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 1 50 645 79: 79:
:119 79: select * from t1 where 8 = v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 8 -20 645 79: 79: --- EXPECTED RESULT --- 79: 8 -20 645 79: 79:
:124 79: select * from t1 where v2 = 10 or v2 = 20 or v2 = 30 or v2 = 40; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 79: --- EXPECTED RESULT --- 79: 4 20 445 79: 5 10 445 79: 3 30 645 79: 79:
:131 79: update t1 set v1 = 2 where v1 = 8; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 79: 79: --- EXPECTED RESULT --- 79: 1 79: 79:
:137 79: delete from t1 where v1 = 2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 79: 79: --- EXPECTED RESULT --- 79: 1 79: 79:
:142 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 50 645 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 79: --- EXPECTED RESULT --- 79: 1 50 645 79: 3 30 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 79:
:152 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 1 50 645 79: 79: --- EXPECTED RESULT --- 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 3 30 645 79: 1 50 645 79: 79:
:162 79: select * from t1 where 3 = v1 or v1 = 0 or 7 = v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 3 30 645 79: 7 -10 645 79: 79: --- EXPECTED RESULT --- 79: 7 -10 645 79: 3 30 645 79: 79:
:168 79: select * from t1 where v1 = 8 or v2 = 30; 79: --- YOUR RESULT --- 79: 3 30 645 79: 79: --- EXPECTED RESULT --- 79: 3 30 645 79: 79:
:173 79: select * from t1 where v1 = 5 and v2 = 10; 79: --- YOUR RESULT --- 79: 5 10 445 79: 79: --- EXPECTED RESULT --- 79: 5 10 445 79: 79:
:179 79: delete from t1 where v2 = 30; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 79: 79: --- EXPECTED RESULT --- 79: 1 79: 79:
:184 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 1 50 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 79: --- EXPECTED RESULT --- 79: 1 50 645 79: 4 20 445 79: 5 10 445 79: 6 0 721 79: 7 -10 645 79: 79:
:193 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 1 50 645 79: 79: --- EXPECTED RESULT --- 79: 7 -10 645 79: 6 0 721 79: 5 10 445 79: 4 20 445 79: 1 50 645 79: 79:
:203 79: delete from t1; 79: --- YOUR RESULT --- 79: 5 79: 79: --- EXPECTED RESULT --- 79: 5 79: 79:
:208 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 79: --- EXPECTED RESULT --- 79: 79:
:213 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 79: --- EXPECTED RESULT --- 79: 79:
:219 79: insert into t1 values (6, 0, 445), (7, -10, 645), (8, 10, 445); 79: --- YOUR RESULT --- 79: 3 79: 79: --- EXPECTED RESULT --- 79: 3 79: 79:
:224 79: select * from t1 order by v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 6 0 445 79: 7 -10 645 79: 8 10 445 79: 79: --- EXPECTED RESULT --- 79: 6 0 445 79: 7 -10 645 79: 8 10 445 79: 79:
:231 79: select * from t1 order by v2; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 7 -10 645 79: 6 0 445 79: 8 10 445 79: 79: --- EXPECTED RESULT --- 79: 7 -10 645 79: 6 0 445 79: 8 10 445 79: 79:
:238 79: select * from t1 where 3 = v1 or v1 = 4 or v1 = 6 or 9 = v1; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 6 0 445 79: 79: --- EXPECTED RESULT --- 79: 6 0 445 79: 79:
:243 79: select * from t1 where v2 = 0; 79: Extra checks: ["ensure:index_scan"] 79: [PASS] extra check: ensure:index_scan 79: --- YOUR RESULT --- 79: 6 0 445 79: 79: --- EXPECTED RESULT --- 79: 6 0 445 79: 79:
:248 79: select * from t1 where v3 = 445; 79: --- YOUR RESULT --- 79: 6 0 445 79: 8 10 445 79: 79: --- EXPECTED RESULT --- 79: 6 0 445 79: 8 10 445 79: 5/19 Test #79: SQLLogicTest.p3.05-index-scan-btree ...... Passed 0.33 sec test 80 Start 80: SQLLogicTest.p3.06-empty-table 80: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.06-empty-table.slt" "--verbose" "-d" "--in-memory" 80: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 80: Test timeout computed to be: 10000000 80:
:4 80: create table t1(v1 int); 80: ---- 80: Table created with id = 32 80: 80:
:8 80: select * from t1; 80: --- YOUR RESULT --- 80: 80: --- EXPECTED RESULT --- 80: 80:
:14 80: delete from t1; 80: --- YOUR RESULT --- 80: 0 80: 80: --- EXPECTED RESULT --- 80: 0 80: 80:
:20 80: create index t1v1 on t1(v1); 80: ---- 80: Index created with id = 0 with type = BPlusTree 80: 80:
:24 80: select * from t1 where v1 = 1; 80: --- YOUR RESULT --- 80: 80: --- EXPECTED RESULT --- 80: 80:
:30 80: insert into t1 values (1); 80: --- YOUR RESULT --- 80: 1 80: 80: --- EXPECTED RESULT --- 80: 1 80: 80:
:36 80: select * from t1; 80: --- YOUR RESULT --- 80: 1 80: 80: --- EXPECTED RESULT --- 80: 1 80: 80:
:42 80: select * from t1 where v1 = 1; 80: --- YOUR RESULT --- 80: 1 80: 80: --- EXPECTED RESULT --- 80: 1 80: 80:
:49 80: delete from t1; 80: --- YOUR RESULT --- 80: 1 80: 80: --- EXPECTED RESULT --- 80: 1 80: 80:
:55 80: select * from t1; 80: --- YOUR RESULT --- 80: 80: --- EXPECTED RESULT --- 80: 80:
:60 80: select * from t1 where v1 = 1; 80: Extra checks: ["ensure:index_scan"] 80: [PASS] extra check: ensure:index_scan 80: --- YOUR RESULT --- 80: 80: --- EXPECTED RESULT --- 80: 6/19 Test #80: SQLLogicTest.p3.06-empty-table ........... Passed 0.22 sec test 81 Start 81: SQLLogicTest.p3.07-simple-agg 81: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.07-simple-agg.slt" "--verbose" "-d" "--in-memory" 81: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 81: Test timeout computed to be: 10000000 81:
:4 81: select count(*) from __mock_table_tas_2025_fall; 81: --- YOUR RESULT --- 81: 8 81: 81: --- EXPECTED RESULT --- 81: 8 81: 81:
:12 81: create table t1(v1 int); 81: ---- 81: Table created with id = 32 81: 81:
:16 81: insert into t1 values (-99999), (99999), (0), (1), (2), (3); 81: --- YOUR RESULT --- 81: 6 81: 81: --- EXPECTED RESULT --- 81: 6 81: 81:
:21 81: select count(*), min(v1), max(v1), count(v1), sum(v1) from t1; 81: --- YOUR RESULT --- 81: 6 -99999 99999 6 6 81: 81: --- EXPECTED RESULT --- 81: 6 -99999 99999 6 6 81: 81:
:26 81: insert into t1 values (null); 81: --- YOUR RESULT --- 81: 1 81: 81: --- EXPECTED RESULT --- 81: 1 81: 81:
:31 81: select count(*), min(v1), max(v1), count(v1), sum(v1) from t1; 81: --- YOUR RESULT --- 81: 7 -99999 99999 6 6 81: 81: --- EXPECTED RESULT --- 81: 7 -99999 99999 6 6 81: 81:
:37 81: create table t2(v1 int, v2 int); 81: ---- 81: Table created with id = 33 81: 81:
:41 81: insert into t2 values (1, 100), (2, 200), (3, 300), (4, 400), (5, 500); 81: --- YOUR RESULT --- 81: 5 81: 81: --- EXPECTED RESULT --- 81: 5 81: 81:
:47 81: select count(*), min(v1+v2-3), max(2+v2-v1), count(v1+v2+v2), sum(v1-v2+v2), sum(1), max(233), min(1), count(2) from t2; 81: --- YOUR RESULT --- 81: 5 98 497 5 15 5 233 1 5 81: 81: --- EXPECTED RESULT --- 81: 5 98 497 5 15 5 233 1 5 81: 81:
:53 81: delete from t1; 81: --- YOUR RESULT --- 81: 7 81: 81: --- EXPECTED RESULT --- 81: 7 81: 81:
:58 81: select count(*) from t1; 81: --- YOUR RESULT --- 81: 0 81: 81: --- EXPECTED RESULT --- 81: 0 81: 81:
:63 81: select min(v1) from t1; 81: --- YOUR RESULT --- 81: integer_null 81: 81: --- EXPECTED RESULT --- 81: integer_null 81: 81:
:68 81: select max(v1) from t1; 81: --- YOUR RESULT --- 81: integer_null 81: 81: --- EXPECTED RESULT --- 81: integer_null 81: 81:
:73 81: select count(v1) from t1; 81: --- YOUR RESULT --- 81: integer_null 81: 81: --- EXPECTED RESULT --- 81: integer_null 81: 81:
:78 81: select sum(v1) from t1; 81: --- YOUR RESULT --- 81: integer_null 81: 81: --- EXPECTED RESULT --- 81: integer_null 81: 7/19 Test #81: SQLLogicTest.p3.07-simple-agg ............ Passed 0.20 sec test 82 Start 82: SQLLogicTest.p3.08-group-agg-1 82: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.08-group-agg-1.slt" "--verbose" "-d" "--in-memory" 82: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 82: Test timeout computed to be: 10000000 82:
:6 82: select office_hour, count(*) from __mock_table_tas_2025_fall group by office_hour; 82: --- YOUR RESULT --- 82: Friday 2 82: Thursday 1 82: Wednesday 1 82: Monday 1 82: Tuesday 3 82: 82: --- EXPECTED RESULT --- 82: Tuesday 3 82: Friday 2 82: Monday 1 82: Wednesday 1 82: Thursday 1 82: 82:
:18 82: -- v1: (cursor + 2) % 10 82: -- v2: cursor 82: -- v3: (cursor + 50) % 100 82: -- v4: cursor / 100 82: -- v5: 233 82: -- v6: some magic string 82: create table t1(v1 int, v2 int, v3 int, v4 int, v5 int, v6 varchar(128)); 82: ---- 82: Table created with id = 32 82: 82:
:27 82: select v5, min(v1), sum(v2), count(*) from t1 group by v5; -- no groups, no output 82: --- YOUR RESULT --- 82: 82: --- EXPECTED RESULT --- 82: 82:
:31 82: insert into t1 select * from __mock_agg_input_small; 82: --- YOUR RESULT --- 82: 1000 82: 82: --- EXPECTED RESULT --- 82: 1000 82: 82:
:36 82: select v5, min(v1), sum(v2), count(*) from t1 group by v5; 82: --- YOUR RESULT --- 82: 233 0 499500 1000 82: 82: --- EXPECTED RESULT --- 82: 233 0 499500 1000 82: 82:
:41 82: select v4, min(v1) + sum(v2) + max(v3), count(*) from t1 group by v4; 82: --- YOUR RESULT --- 82: 9 95049 100 82: 8 85049 100 82: 7 75049 100 82: 6 65049 100 82: 5 55049 100 82: 4 45049 100 82: 3 35049 100 82: 2 25049 100 82: 1 15049 100 82: 0 5049 100 82: 82: --- EXPECTED RESULT --- 82: 9 95049 100 82: 7 75049 100 82: 8 85049 100 82: 6 65049 100 82: 5 55049 100 82: 3 35049 100 82: 4 45049 100 82: 2 25049 100 82: 1 15049 100 82: 0 5049 100 82: 82:
:55 82: select v6, sum(v1+v2), min(v3+v4), count(*) from t1 group by v6; 82: --- YOUR RESULT --- 82: 💩💩💩💩💩💩💩 63250 1 125 82: 💩💩💩💩💩💩 63250 3 125 82: 💩💩💩💩💩 63000 2 125 82: 💩💩💩💩 63000 1 125 82: 💩💩💩 62750 0 125 82: 💩💩 62750 4 125 82: 💩💩💩💩💩💩💩💩 63500 2 125 82: 💩 62500 3 125 82: 82: --- EXPECTED RESULT --- 82: 💩💩💩💩💩💩💩💩 63500 2 125 82: 💩💩💩💩💩💩💩 63250 1 125 82: 💩💩💩💩💩💩 63250 3 125 82: 💩💩💩 62750 0 125 82: 💩💩💩💩💩 63000 2 125 82: 💩💩💩💩 63000 1 125 82: 💩💩 62750 4 125 82: 💩 62500 3 125 82: 82:
:67 82: select v4, v5, v4+v5, sum(v1+v2), min(v3+v4), count(*) from t1 group by v4, v5; 82: --- YOUR RESULT --- 82: 9 233 242 95400 9 100 82: 8 233 241 85400 8 100 82: 5 233 238 55400 5 100 82: 4 233 237 45400 4 100 82: 3 233 236 35400 3 100 82: 2 233 235 25400 2 100 82: 7 233 240 75400 7 100 82: 1 233 234 15400 1 100 82: 6 233 239 65400 6 100 82: 0 233 233 5400 0 100 82: 82: --- EXPECTED RESULT --- 82: 9 233 242 95400 9 100 82: 8 233 241 85400 8 100 82: 6 233 239 65400 6 100 82: 5 233 238 55400 5 100 82: 4 233 237 45400 4 100 82: 3 233 236 35400 3 100 82: 7 233 240 75400 7 100 82: 2 233 235 25400 2 100 82: 1 233 234 15400 1 100 82: 0 233 233 5400 0 100 82: 82:
:81 82: select v4, v5, v4+v5+count(*), sum(v1+v2), min(v3+v4), count(*) from t1 group by v4, v5; 82: --- YOUR RESULT --- 82: 9 233 342 95400 9 100 82: 8 233 341 85400 8 100 82: 5 233 338 55400 5 100 82: 4 233 337 45400 4 100 82: 3 233 336 35400 3 100 82: 2 233 335 25400 2 100 82: 7 233 340 75400 7 100 82: 1 233 334 15400 1 100 82: 6 233 339 65400 6 100 82: 0 233 333 5400 0 100 82: 82: --- EXPECTED RESULT --- 82: 9 233 342 95400 9 100 82: 8 233 341 85400 8 100 82: 6 233 339 65400 6 100 82: 5 233 338 55400 5 100 82: 4 233 337 45400 4 100 82: 3 233 336 35400 3 100 82: 7 233 340 75400 7 100 82: 2 233 335 25400 2 100 82: 1 233 334 15400 1 100 82: 0 233 333 5400 0 100 82: 82:
:95 82: select v4, v5, v4+v5+count(*), sum(v1+v2), min(v3+v4), count(*) from t1 82: group by v4, v5 82: having v4 > 5 and sum(v2) < 80000; 82: --- YOUR RESULT --- 82: 7 233 340 75400 7 100 82: 6 233 339 65400 6 100 82: 82: --- EXPECTED RESULT --- 82: 6 233 339 65400 6 100 82: 7 233 340 75400 7 100 82: 82:
:103 82: select v4+v5+count(*), sum(v1+v2), min(v3+v4), count(*) from t1 82: group by v4, v5 82: having v4 > 5 and sum(v2) < 80000; 82: --- YOUR RESULT --- 82: 340 75400 7 100 82: 339 65400 6 100 82: 82: --- EXPECTED RESULT --- 82: 339 65400 6 100 82: 340 75400 7 100 82: 82:
:114 82: select colH, count(*) from __mock_table_4 group by colH; 82: --- YOUR RESULT --- 82: 💩💩💩 30 82: 💩💩 30 82: 💩 30 82: varlen_null 10 82: 82: --- EXPECTED RESULT --- 82: 💩 30 82: 💩💩💩 30 82: 💩💩 30 82: varlen_null 10 82: 82:
:122 82: select distinct count(*) from __mock_table_4 group by colG; 82: --- YOUR RESULT --- 82: 20 82: 82: --- EXPECTED RESULT --- 82: 20 82: 82:
:127 82: select colH, min(colG) from __mock_table_4 group by colH; 82: --- YOUR RESULT --- 82: 💩💩💩 1 82: 💩💩 1 82: 💩 1 82: varlen_null integer_null 82: 82: --- EXPECTED RESULT --- 82: 💩 1 82: 💩💩💩 1 82: 💩💩 1 82: varlen_null integer_null 82: 8/19 Test #82: SQLLogicTest.p3.08-group-agg-1 ........... Passed 0.64 sec test 83 Start 83: SQLLogicTest.p3.09-group-agg-2 83: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.09-group-agg-2.slt" "--verbose" "-d" "--in-memory" 83: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 83: Test timeout computed to be: 10000000 83:
:3 83: -- v1: (cursor + 2) % 10 83: -- v2: cursor 83: -- v3: (cursor + 50) % 100 83: -- v4: cursor / 1000 83: -- v5: 233 83: -- v6: some magic string 83: select count(*) from __mock_agg_input_big; 83: --- YOUR RESULT --- 83: 10000 83: 83: --- EXPECTED RESULT --- 83: 10000 83: 83:
:14 83: select v5, min(v1), sum(v2), count(*) from __mock_agg_input_big group by v5; 83: --- YOUR RESULT --- 83: 233 0 49995000 10000 83: 83: --- EXPECTED RESULT --- 83: 233 0 49995000 10000 83: 83:
:19 83: select sum(v1), min(v2), count(*) from __mock_agg_input_big group by v5 + v4; 83: --- YOUR RESULT --- 83: 4500 8000 1000 83: 4500 7000 1000 83: 4500 6000 1000 83: 4500 5000 1000 83: 4500 4000 1000 83: 4500 3000 1000 83: 4500 9000 1000 83: 4500 2000 1000 83: 4500 1000 1000 83: 4500 0 1000 83: 83: --- EXPECTED RESULT --- 83: 4500 9000 1000 83: 4500 8000 1000 83: 4500 7000 1000 83: 4500 6000 1000 83: 4500 5000 1000 83: 4500 4000 1000 83: 4500 3000 1000 83: 4500 2000 1000 83: 4500 1000 1000 83: 4500 0 1000 83: 83:
:33 83: select distinct v5 from __mock_agg_input_big; 83: --- YOUR RESULT --- 83: 233 83: 83: --- EXPECTED RESULT --- 83: 233 83: 83:
:38 83: select distinct v4, v5 from __mock_agg_input_big; 83: --- YOUR RESULT --- 83: 9 233 83: 8 233 83: 5 233 83: 4 233 83: 3 233 83: 2 233 83: 7 233 83: 1 233 83: 6 233 83: 0 233 83: 83: --- EXPECTED RESULT --- 83: 9 233 83: 8 233 83: 6 233 83: 5 233 83: 4 233 83: 3 233 83: 7 233 83: 2 233 83: 1 233 83: 0 233 83: 83:
:52 83: select distinct * from ( 83: select cnt, sum(sum_v1), sum(sum_v2), sum(v4) from ( 83: select v4 as v4, sum(v1) as sum_v1, sum(v2) as sum_v2, count(*) as cnt from __mock_agg_input_big group by v4 83: ) where v4 > 5 group by cnt 83: ); 83: --- YOUR RESULT --- 83: 1000 18000 31998000 30 83: 83: --- EXPECTED RESULT --- 83: 1000 18000 31998000 30 83: 83:
:61 83: select v6, count(v6) + count(*) from ( 83: select distinct v6 from __mock_agg_input_big 83: ) group by v6 83: --- YOUR RESULT --- 83: 💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩 2 83: 💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩 2 83: 💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩 2 83: 💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩 2 83: 83: --- EXPECTED RESULT --- 83: 💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩 2 83: 💩💩 2 83: 💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩 2 83: 💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩 2 83: 💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩 2 83: 9/19 Test #83: SQLLogicTest.p3.09-group-agg-2 ........... Passed 2.29 sec test 84 Start 84: SQLLogicTest.p3.10-simple-join 84: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.10-simple-join.slt" "--verbose" "-d" "--in-memory" 84: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 84: Test timeout computed to be: 10000000 84:
:6 84: set force_optimizer_starter_rule=yes 84: ---- 84: 84:
:9 84: select * from 84: __mock_table_tas_2025_spring inner join __mock_table_schedule 84: on office_hour = day_of_week 84: where has_lecture = 1; 84: --- YOUR RESULT --- 84: carpecodeum Monday Monday 1 84: ChrisLaspias Wednesday Wednesday 1 84: rmboyce Monday Monday 1 84: 84: --- EXPECTED RESULT --- 84: ChrisLaspias Wednesday Wednesday 1 84: carpecodeum Monday Monday 1 84: rmboyce Monday Monday 1 84: 84:
:21 84: select * from test_simple_seq_1 s1 inner join test_simple_seq_2 s2 on s1.col1 + 5 = s2.col1; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 0 5 15 84: 1 6 16 84: 2 7 17 84: 3 8 18 84: 4 9 19 84: 84: --- EXPECTED RESULT --- 84: 0 5 15 84: 1 6 16 84: 2 7 17 84: 3 8 18 84: 4 9 19 84: 84:
:31 84: select * from test_simple_seq_1 s1 left join test_simple_seq_2 s2 on s1.col1 + 5 = s2.col1; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 0 5 15 84: 1 6 16 84: 2 7 17 84: 3 8 18 84: 4 9 19 84: 5 integer_null integer_null 84: 6 integer_null integer_null 84: 7 integer_null integer_null 84: 8 integer_null integer_null 84: 9 integer_null integer_null 84: 84: --- EXPECTED RESULT --- 84: 0 5 15 84: 1 6 16 84: 2 7 17 84: 3 8 18 84: 4 9 19 84: 5 integer_null integer_null 84: 6 integer_null integer_null 84: 7 integer_null integer_null 84: 8 integer_null integer_null 84: 9 integer_null integer_null 84: 84:
:45 84: create table t1(v1 int); 84: ---- 84: Table created with id = 32 84: 84:
:48 84: insert into t1 (select * from __mock_table_123); 84: ---- 84: 3 84: 84:
:51 84: create index t1_v1 on t1(v1); 84: ---- 84: Index created with id = 0 with type = BPlusTree 84: 84:
:54 84: select * from test_simple_seq_2 t2 left join t1 on t1.v1 = t2.col1; 84: --- YOUR RESULT --- 84: 0 10 integer_null 84: 1 11 1 84: 2 12 2 84: 3 13 3 84: 4 14 integer_null 84: 5 15 integer_null 84: 6 16 integer_null 84: 7 17 integer_null 84: 8 18 integer_null 84: 9 19 integer_null 84: 84: --- EXPECTED RESULT --- 84: 0 10 integer_null 84: 1 11 1 84: 2 12 2 84: 3 13 3 84: 4 14 integer_null 84: 5 15 integer_null 84: 6 16 integer_null 84: 7 17 integer_null 84: 8 18 integer_null 84: 9 19 integer_null 84: 84:
:69 84: create table temp_1(colA int, colB int, colC int, colD int); 84: ---- 84: Table created with id = 33 84: 84:
:72 84: insert into temp_1 values 84: (0 , 1, 6113, 48270), 84: (1 , 5, 8005, 22497), 84: (2 , 0, 4476, 73541), 84: (3 , 2, 290 , 20860), 84: (4 , 0, 3362, 47696), 84: (5 , 8, 7022, 59586), 84: (6 , 2, 170 , 92798), 84: (7 , 2, 8524, 19746), 84: (8 , 8, 3074, 56174), 84: (9 , 2, 2600, 32938), 84: (10, 8, 398 , 60977), 84: (11, 1, 5472, 33166), 84: (12, 3, 1107, 94947), 84: (13, 0, 4153, 54624), 84: (14, 3, 1907, 48515), 84: (15, 6, 9754, 95830), 84: (16, 8, 5252, 96696), 84: (17, 3, 4819, 99411), 84: (18, 9, 666 , 86073), 84: (19, 3, 701 , 34675), 84: (20, 2, 2307, 97170), 84: (21, 4, 194 , 42522), 84: (22, 3, 4256, 54404), 84: (23, 7, 6037, 70355), 84: (24, 6, 1973, 98970), 84: (25, 3, 2090, 701 ), 84: (26, 2, 5392, 94519), 84: (27, 0, 8143, 47916), 84: (28, 5, 8710, 194 ), 84: (29, 5, 5519, 4256 ), 84: (30, 0, 3803, 18357), 84: (31, 6, 219 , 2090 ), 84: (32, 2, 3842, 38160), 84: (33, 8, 991 , 24527), 84: (34, 4, 1443, 41478), 84: (35, 2, 7564, 14242), 84: (36, 6, 2269, 54671), 84: (37, 3, 3582, 77724), 84: (38, 2, 5267, 69339), 84: (39, 0, 1180, 94216), 84: (40, 6, 3158, 16603), 84: (41, 3, 4878, 85762), 84: (42, 1, 34 , 95622), 84: (43, 6, 9359, 1443 ), 84: (44, 0, 2173, 31618), 84: (45, 3, 9616, 67805), 84: (46, 2, 2006, 92368), 84: (47, 0, 6785, 75686), 84: (48, 6, 2696, 19966), 84: (49, 1, 3313, 70803), 84: (50, 7, 4001, 99484), 84: (51, 8, 9106, 28177), 84: (52, 1, 8312, 52310), 84: (53, 1, 9567, 10624), 84: (54, 2, 6866, 15963), 84: (55, 1, 4956, 27755), 84: (56, 1, 4060, 16227), 84: (57, 9, 3683, 78077), 84: (58, 8, 483 , 86798), 84: (59, 6, 9742, 59516), 84: (60, 5, 4347, 34 ), 84: (61, 2, 9484, 25743), 84: (62, 2, 9506, 13806), 84: (63, 2, 7758, 44219), 84: (64, 2, 1999, 83926), 84: (65, 3, 3886, 72321), 84: (66, 3, 8020, 97035), 84: (67, 0, 4633, 68232), 84: (68, 4, 2699, 52465), 84: (69, 8, 755 , 20385), 84: (70, 2, 8311, 59841), 84: (71, 4, 7826, 97071), 84: (72, 7, 7027, 29049), 84: (73, 9, 499 , 73848), 84: (74, 1, 9088, 12950), 84: (75, 3, 3517, 94485), 84: (76, 7, 4339, 25951), 84: (77, 2, 5801, 59170), 84: (78, 3, 5737, 59426), 84: (79, 3, 4299, 97298), 84: (80, 3, 7683, 21340), 84: (81, 0, 2045, 3683 ), 84: (82, 8, 5290, 98787), 84: (83, 3, 2914, 91662), 84: (84, 9, 4626, 92192), 84: (85, 9, 849 , 11512), 84: (86, 3, 2697, 9484 ), 84: (87, 2, 3060, 25890), 84: (88, 2, 7329, 40526), 84: (89, 1, 9418, 34767), 84: (90, 9, 6826, 69422), 84: (91, 1, 1411, 8020 ), 84: (92, 9, 2110, 28695), 84: (93, 4, 2758, 27498), 84: (94, 5, 8802, 70169), 84: (95, 9, 5706, 15441), 84: (96, 1, 4733, 2699 ), 84: (97, 1, 2273, 63790), 84: (98, 3, 1394, 17139), 84: (99, 6, 4482, 57463); 84: ---- 84: 100 84: 84:
:176 84: create table temp_2(colA int, colB int, colC int); 84: ---- 84: Table created with id = 34 84: 84:
:179 84: insert into temp_2 values 84: (0, 142, 0), 84: (1, 993, 1), 84: (2, 837, 2), 84: (3, 380, 3), 84: (4, 240, 4), 84: (5, 290, 5), 84: (6, 592, 6), 84: (7, 88 , 7), 84: (8, 194, 8), 84: (9, 638, 9), 84: (10, 290, 0), 84: (11, 878, 1), 84: (12, 170, 2), 84: (13, 332, 3), 84: (14, 680, 4), 84: (15, 2, 5), 84: (16, 552, 6), 84: (17, 561, 7), 84: (18, 398, 8), 84: (19, 974, 9), 84: (20, 739, 0), 84: (21, 352, 1), 84: (22, 387, 2), 84: (23, 598, 3), 84: (24, 440, 4), 84: (25, 83, 5), 84: (26, 57, 6), 84: (27, 883, 7), 84: (28, 914, 8), 84: (29, 538, 9), 84: (30, 132, 0), 84: (31, 723, 1), 84: (32, 666, 2), 84: (33, 701, 3), 84: (34, 311, 4), 84: (35, 214, 5), 84: (36, 259, 6), 84: (37, 812, 7), 84: (38, 194, 8), 84: (39, 160, 9), 84: (40, 917, 0), 84: (41, 949, 1), 84: (42, 42 , 2), 84: (43, 272, 3), 84: (44, 975, 4), 84: (45, 518, 5), 84: (46, 930, 6), 84: (47, 399, 7), 84: (48, 924, 8), 84: (49, 731, 9), 84: (50, 8 , 0), 84: (51, 219, 1), 84: (52, 276, 2), 84: (53, 770, 3), 84: (54, 991, 4), 84: (55, 390, 5), 84: (56, 419, 6), 84: (57, 346, 7), 84: (58, 898, 8), 84: (59, 396, 9), 84: (60, 221, 0), 84: (61, 208, 1), 84: (62, 934, 2), 84: (63, 510, 3), 84: (64, 147, 4), 84: (65, 156, 5), 84: (66, 529, 6), 84: (67, 86 , 7), 84: (68, 384, 8), 84: (69, 603, 9), 84: (70, 107, 0), 84: (71, 867, 1), 84: (72, 253, 2), 84: (73, 782, 3), 84: (74, 124, 4), 84: (75, 879, 5), 84: (76, 34 , 6), 84: (77, 143, 7), 84: (78, 494, 8), 84: (79, 125, 9), 84: (80, 400, 0), 84: (81, 187, 1), 84: (82, 982, 2), 84: (83, 641, 3), 84: (84, 711, 4), 84: (85, 779, 5), 84: (86, 648, 6), 84: (87, 590, 7), 84: (88, 241, 8), 84: (89, 929, 9), 84: (90, 914, 0), 84: (91, 449, 1), 84: (92, 815, 2), 84: (93, 225, 3), 84: (94, 377, 4), 84: (95, 120, 5), 84: (96, 662, 6), 84: (97, 277, 7), 84: (98, 351, 8), 84: (99, 722, 9); 84: ---- 84: 100 84: 84:
:282 84: create table temp_3(colA int, colB int); 84: ---- 84: Table created with id = 35 84: 84:
:285 84: insert into temp_3 values 84: (5, 29), 84: (6, 52), 84: (0, 142), 84: (1, 993), 84: (2, 837), 84: (3, 52), 84: (4, 240), 84: (7, 88), 84: (8, 14), 84: (9, 52), 84: (10, 290), 84: (11, 878), 84: (12, 17), 84: (13, 52), 84: (14, 680), 84: (15, 2), 84: (16, 52), 84: (17, 561), 84: (18, 38), 84: (19, 974), 84: (20, 739); 84: ---- 84: 21 84: 84:
:309 84: select * from temp_1 t1 inner join test_simple_seq_2 seq on t1.colA = seq.col2 ; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 10 8 398 60977 0 10 84: 11 1 5472 33166 1 11 84: 12 3 1107 94947 2 12 84: 13 0 4153 54624 3 13 84: 14 3 1907 48515 4 14 84: 15 6 9754 95830 5 15 84: 16 8 5252 96696 6 16 84: 17 3 4819 99411 7 17 84: 18 9 666 86073 8 18 84: 19 3 701 34675 9 19 84: 84: --- EXPECTED RESULT --- 84: 10 8 398 60977 0 10 84: 11 1 5472 33166 1 11 84: 12 3 1107 94947 2 12 84: 13 0 4153 54624 3 13 84: 14 3 1907 48515 4 14 84: 15 6 9754 95830 5 15 84: 16 8 5252 96696 6 16 84: 17 3 4819 99411 7 17 84: 18 9 666 86073 8 18 84: 19 3 701 34675 9 19 84: 84:
:323 84: select * from temp_2 t2 inner join test_simple_seq_2 seq on t2.colA = seq.col2 ; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 10 290 0 0 10 84: 11 878 1 1 11 84: 12 170 2 2 12 84: 13 332 3 3 13 84: 14 680 4 4 14 84: 15 2 5 5 15 84: 16 552 6 6 16 84: 17 561 7 7 17 84: 18 398 8 8 18 84: 19 974 9 9 19 84: 84: --- EXPECTED RESULT --- 84: 10 290 0 0 10 84: 11 878 1 1 11 84: 12 170 2 2 12 84: 13 332 3 3 13 84: 14 680 4 4 14 84: 15 2 5 5 15 84: 16 552 6 6 16 84: 17 561 7 7 17 84: 18 398 8 8 18 84: 19 974 9 9 19 84: 84:
:338 84: select * from __mock_table_1 m1 inner join temp_1 t1 on t1.colA = m1.colB; 84: --- YOUR RESULT --- 84: 0 0 0 1 6113 48270 84: 84: --- EXPECTED RESULT --- 84: 0 0 0 1 6113 48270 84: 84:
:344 84: select * from temp_1 t1 inner join temp_2 t2 on t1.colD = t2.colA; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 60 5 4347 34 34 311 4 84: 84: --- EXPECTED RESULT --- 84: 60 5 4347 34 34 311 4 84: 84:
:350 84: select * from __mock_table_1 m1 inner join temp_2 t2 on t2.colA = m1.colB; 84: --- YOUR RESULT --- 84: 0 0 0 142 0 84: 84: --- EXPECTED RESULT --- 84: 0 0 0 142 0 84: 84:
:357 84: select * from temp_2 t2 inner join test_simple_seq_2 s2 on t2.colB < s2.col2; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 15 2 5 0 10 84: 15 2 5 1 11 84: 15 2 5 2 12 84: 15 2 5 3 13 84: 15 2 5 4 14 84: 15 2 5 5 15 84: 15 2 5 6 16 84: 15 2 5 7 17 84: 15 2 5 8 18 84: 15 2 5 9 19 84: 50 8 0 0 10 84: 50 8 0 1 11 84: 50 8 0 2 12 84: 50 8 0 3 13 84: 50 8 0 4 14 84: 50 8 0 5 15 84: 50 8 0 6 16 84: 50 8 0 7 17 84: 50 8 0 8 18 84: 50 8 0 9 19 84: 84: --- EXPECTED RESULT --- 84: 15 2 5 0 10 84: 15 2 5 1 11 84: 15 2 5 2 12 84: 15 2 5 3 13 84: 15 2 5 4 14 84: 15 2 5 5 15 84: 15 2 5 6 16 84: 15 2 5 7 17 84: 15 2 5 8 18 84: 15 2 5 9 19 84: 50 8 0 0 10 84: 50 8 0 1 11 84: 50 8 0 2 12 84: 50 8 0 3 13 84: 50 8 0 4 14 84: 50 8 0 5 15 84: 50 8 0 6 16 84: 50 8 0 7 17 84: 50 8 0 8 18 84: 50 8 0 9 19 84: 84:
:382 84: create table t2(v1 int, v2 int); 84: ---- 84: Table created with id = 36 84: 84:
:385 84: insert into t2 values (0, 45), (0, 45), (0, 65), (1, 45), (1, 45), (1, 65), (2, 45); 84: ---- 84: 7 84: 84:
:388 84: create table t3(v1 int, v2 int); 84: ---- 84: Table created with id = 37 84: 84:
:391 84: insert into t3 values 84: (0, 1), 84: (1, 1), 84: (2, 1), 84: (3, 1), 84: (4, 1), 84: (5, 1), 84: (6, 1), 84: (0, 2), 84: (1, 2), 84: (2, 2), 84: (3, 2), 84: (4, 2), 84: (5, 2), 84: (6, 2); 84: ---- 84: 14 84: 84:
:408 84: select * from temp_2 inner join t2 on v2 = colA; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 45 518 5 0 45 84: 45 518 5 0 45 84: 45 518 5 1 45 84: 45 518 5 1 45 84: 45 518 5 2 45 84: 65 156 5 0 65 84: 65 156 5 1 65 84: 84: --- EXPECTED RESULT --- 84: 45 518 5 0 45 84: 45 518 5 0 45 84: 65 156 5 0 65 84: 45 518 5 1 45 84: 45 518 5 1 45 84: 65 156 5 1 65 84: 45 518 5 2 45 84: 84:
:420 84: select * from t3 inner join t3 temp on t3.v1 = temp.v2; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 1 1 0 1 84: 1 1 1 1 84: 1 1 2 1 84: 1 1 3 1 84: 1 1 4 1 84: 1 1 5 1 84: 1 1 6 1 84: 2 1 0 2 84: 2 1 1 2 84: 2 1 2 2 84: 2 1 3 2 84: 2 1 4 2 84: 2 1 5 2 84: 2 1 6 2 84: 1 2 0 1 84: 1 2 1 1 84: 1 2 2 1 84: 1 2 3 1 84: 1 2 4 1 84: 1 2 5 1 84: 1 2 6 1 84: 2 2 0 2 84: 2 2 1 2 84: 2 2 2 2 84: 2 2 3 2 84: 2 2 4 2 84: 2 2 5 2 84: 2 2 6 2 84: 84: --- EXPECTED RESULT --- 84: 1 1 0 1 84: 1 2 0 1 84: 1 1 1 1 84: 1 2 1 1 84: 1 1 2 1 84: 1 2 2 1 84: 1 1 3 1 84: 1 2 3 1 84: 1 1 4 1 84: 1 2 4 1 84: 1 1 5 1 84: 1 2 5 1 84: 1 1 6 1 84: 1 2 6 1 84: 2 1 0 2 84: 2 2 0 2 84: 2 1 1 2 84: 2 2 1 2 84: 2 1 2 2 84: 2 2 2 2 84: 2 1 3 2 84: 2 2 3 2 84: 2 1 4 2 84: 2 2 4 2 84: 2 1 5 2 84: 2 2 5 2 84: 2 1 6 2 84: 2 2 6 2 84: 84:
:453 84: select * from t3 left join t3 temp on t3.v1 = temp.v2; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 0 1 integer_null integer_null 84: 1 1 0 1 84: 1 1 1 1 84: 1 1 2 1 84: 1 1 3 1 84: 1 1 4 1 84: 1 1 5 1 84: 1 1 6 1 84: 2 1 0 2 84: 2 1 1 2 84: 2 1 2 2 84: 2 1 3 2 84: 2 1 4 2 84: 2 1 5 2 84: 2 1 6 2 84: 3 1 integer_null integer_null 84: 4 1 integer_null integer_null 84: 5 1 integer_null integer_null 84: 6 1 integer_null integer_null 84: 0 2 integer_null integer_null 84: 1 2 0 1 84: 1 2 1 1 84: 1 2 2 1 84: 1 2 3 1 84: 1 2 4 1 84: 1 2 5 1 84: 1 2 6 1 84: 2 2 0 2 84: 2 2 1 2 84: 2 2 2 2 84: 2 2 3 2 84: 2 2 4 2 84: 2 2 5 2 84: 2 2 6 2 84: 3 2 integer_null integer_null 84: 4 2 integer_null integer_null 84: 5 2 integer_null integer_null 84: 6 2 integer_null integer_null 84: 84: --- EXPECTED RESULT --- 84: 1 1 0 1 84: 1 2 0 1 84: 1 1 1 1 84: 1 2 1 1 84: 1 1 2 1 84: 1 2 2 1 84: 1 1 3 1 84: 1 2 3 1 84: 1 1 4 1 84: 1 2 4 1 84: 1 1 5 1 84: 1 2 5 1 84: 1 1 6 1 84: 1 2 6 1 84: 2 1 0 2 84: 2 2 0 2 84: 2 1 1 2 84: 2 2 1 2 84: 2 1 2 2 84: 2 2 2 2 84: 2 1 3 2 84: 2 2 3 2 84: 2 1 4 2 84: 2 2 4 2 84: 2 1 5 2 84: 2 2 5 2 84: 2 1 6 2 84: 2 2 6 2 84: 6 1 integer_null integer_null 84: 6 2 integer_null integer_null 84: 5 1 integer_null integer_null 84: 5 2 integer_null integer_null 84: 3 1 integer_null integer_null 84: 3 2 integer_null integer_null 84: 4 1 integer_null integer_null 84: 4 2 integer_null integer_null 84: 0 1 integer_null integer_null 84: 0 2 integer_null integer_null 84: 84:
:496 84: select * from temp_3 t3 inner join temp_2 t2 on t3.colB = t2.colA; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 5 29 29 538 9 84: 6 52 52 276 2 84: 3 52 52 276 2 84: 7 88 88 241 8 84: 8 14 14 680 4 84: 9 52 52 276 2 84: 12 17 17 561 7 84: 13 52 52 276 2 84: 15 2 2 837 2 84: 16 52 52 276 2 84: 18 38 38 194 8 84: 84: --- EXPECTED RESULT --- 84: 5 29 29 538 9 84: 6 52 52 276 2 84: 3 52 52 276 2 84: 7 88 88 241 8 84: 8 14 14 680 4 84: 9 52 52 276 2 84: 12 17 17 561 7 84: 13 52 52 276 2 84: 15 2 2 837 2 84: 16 52 52 276 2 84: 18 38 38 194 8 84: 84:
:512 84: select * from temp_3 t3 left join temp_2 t2 on t3.colB = t2.colA; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 5 29 29 538 9 84: 6 52 52 276 2 84: 0 142 integer_null integer_null integer_null 84: 1 993 integer_null integer_null integer_null 84: 2 837 integer_null integer_null integer_null 84: 3 52 52 276 2 84: 4 240 integer_null integer_null integer_null 84: 7 88 88 241 8 84: 8 14 14 680 4 84: 9 52 52 276 2 84: 10 290 integer_null integer_null integer_null 84: 11 878 integer_null integer_null integer_null 84: 12 17 17 561 7 84: 13 52 52 276 2 84: 14 680 integer_null integer_null integer_null 84: 15 2 2 837 2 84: 16 52 52 276 2 84: 17 561 integer_null integer_null integer_null 84: 18 38 38 194 8 84: 19 974 integer_null integer_null integer_null 84: 20 739 integer_null integer_null integer_null 84: 84: --- EXPECTED RESULT --- 84: 5 29 29 538 9 84: 6 52 52 276 2 84: 3 52 52 276 2 84: 7 88 88 241 8 84: 8 14 14 680 4 84: 9 52 52 276 2 84: 12 17 17 561 7 84: 13 52 52 276 2 84: 15 2 2 837 2 84: 16 52 52 276 2 84: 18 38 38 194 8 84: 20 739 integer_null integer_null integer_null 84: 19 974 integer_null integer_null integer_null 84: 17 561 integer_null integer_null integer_null 84: 14 680 integer_null integer_null integer_null 84: 1 993 integer_null integer_null integer_null 84: 4 240 integer_null integer_null integer_null 84: 10 290 integer_null integer_null integer_null 84: 2 837 integer_null integer_null integer_null 84: 11 878 integer_null integer_null integer_null 84: 0 142 integer_null integer_null integer_null 84: 84:
:538 84: select * from 84: (select * from temp_2 where colB < 10) t2 inner join 84: (select distinct(temp_2.colA) from temp_1 inner join temp_2 on temp_1.colC = temp_2.colA) t3 84: on t2.colB < t3.colA; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 15 2 5 34 84: 50 8 0 34 84: 84: --- EXPECTED RESULT --- 84: 15 2 5 34 84: 50 8 0 34 84: 84:
:549 84: select * from temp_1 t1 inner join temp_2 t2 on t1.colB = t2.colA and t1.colA = t2.colC ; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 8 8 3074 56174 8 194 8 84: 84: --- EXPECTED RESULT --- 84: 8 8 3074 56174 8 194 8 84: 84:
:555 84: select * from temp_1 t1 inner join temp_2 t2 on t1.colC = t2.colB and t1.colB = t2.colC; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 6 2 170 92798 12 170 2 84: 10 8 398 60977 18 398 8 84: 19 3 701 34675 33 701 3 84: 84: --- EXPECTED RESULT --- 84: 6 2 170 92798 12 170 2 84: 10 8 398 60977 18 398 8 84: 19 3 701 34675 33 701 3 84: 84:
:564 84: select * from temp_1 t1 inner join temp_2 t2 on t1.colB = t2.colA and t2.colC = t1.colA ; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 8 8 3074 56174 8 194 8 84: 84: --- EXPECTED RESULT --- 84: 8 8 3074 56174 8 194 8 84: 84:
:570 84: select * from temp_1 t1 inner join temp_2 t2 on t1.colC = t2.colB and t2.colC = t1.colB ; 84: Extra checks: ["ensure:nlj_init_check"] 84: [PASS] extra check: ensure:nlj_init_check 84: --- YOUR RESULT --- 84: 6 2 170 92798 12 170 2 84: 10 8 398 60977 18 398 8 84: 19 3 701 34675 33 701 3 84: 84: --- EXPECTED RESULT --- 84: 6 2 170 92798 12 170 2 84: 10 8 398 60977 18 398 8 84: 19 3 701 34675 33 701 3 84: 10/19 Test #84: SQLLogicTest.p3.10-simple-join ........... Passed 2.41 sec test 85 Start 85: SQLLogicTest.p3.11-multi-way-join 85: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.11-multi-way-join.slt" "--verbose" "-d" "--in-memory" 85: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 85: Test timeout computed to be: 10000000 85:
:3 85: set force_optimizer_starter_rule=yes 85: ---- 85: 85:
:6 85: create table t1(v1 int); 85: ---- 85: Table created with id = 32 85: 85:
:9 85: insert into t1 values (1), (1); 85: ---- 85: 2 85: 85:
:12 85: select * from (t1 a inner join t1 b on a.v1 = b.v1) inner join t1 c on a.v1 = c.v1; 85: Extra checks: ["ensure:nlj_init_check"] 85: [PASS] extra check: ensure:nlj_init_check 85: --- YOUR RESULT --- 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 85: --- EXPECTED RESULT --- 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 1 1 1 85: 85:
:24 85: select * from __mock_table_123 a, __mock_table_123 b, __mock_table_123 c; 85: Extra checks: ["ensure:nlj_init_check"] 85: [PASS] extra check: ensure:nlj_init_check 85: --- YOUR RESULT --- 85: 1 1 1 85: 1 1 2 85: 1 1 3 85: 1 2 1 85: 1 2 2 85: 1 2 3 85: 1 3 1 85: 1 3 2 85: 1 3 3 85: 2 1 1 85: 2 1 2 85: 2 1 3 85: 2 2 1 85: 2 2 2 85: 2 2 3 85: 2 3 1 85: 2 3 2 85: 2 3 3 85: 3 1 1 85: 3 1 2 85: 3 1 3 85: 3 2 1 85: 3 2 2 85: 3 2 3 85: 3 3 1 85: 3 3 2 85: 3 3 3 85: 85: --- EXPECTED RESULT --- 85: 1 1 1 85: 1 1 2 85: 1 1 3 85: 1 2 1 85: 1 2 2 85: 1 2 3 85: 1 3 1 85: 1 3 2 85: 1 3 3 85: 2 1 1 85: 2 1 2 85: 2 1 3 85: 2 2 1 85: 2 2 2 85: 2 2 3 85: 2 3 1 85: 2 3 2 85: 2 3 3 85: 3 1 1 85: 3 1 2 85: 3 1 3 85: 3 2 1 85: 3 2 2 85: 3 2 3 85: 3 3 1 85: 3 3 2 85: 3 3 3 85: 85:
:55 85: create table temp_2(colA int, colB int, colC int); 85: ---- 85: Table created with id = 33 85: 85:
:58 85: insert into temp_2 values 85: (0, 142, 0), 85: (1, 993, 1), 85: (2, 837, 2), 85: (3, 380, 3), 85: (4, 240, 4), 85: (5, 290, 5), 85: (6, 592, 6), 85: (7, 88 , 7), 85: (8, 194, 8), 85: (9, 638, 9), 85: (10, 290, 0), 85: (11, 878, 1), 85: (12, 170, 2), 85: (13, 332, 3), 85: (14, 680, 4), 85: (15, 2, 5), 85: (16, 552, 6), 85: (17, 561, 7), 85: (18, 398, 8), 85: (19, 974, 9), 85: (20, 739, 0), 85: (21, 352, 1), 85: (22, 387, 2), 85: (23, 598, 3), 85: (24, 440, 4), 85: (25, 83, 5), 85: (26, 57, 6), 85: (27, 883, 7), 85: (28, 914, 8), 85: (29, 538, 9), 85: (30, 132, 0), 85: (31, 723, 1), 85: (32, 666, 2), 85: (33, 701, 3), 85: (34, 311, 4), 85: (35, 214, 5), 85: (36, 259, 6), 85: (37, 812, 7), 85: (38, 194, 8), 85: (39, 160, 9), 85: (40, 917, 0), 85: (41, 949, 1), 85: (42, 42 , 2), 85: (43, 272, 3), 85: (44, 975, 4), 85: (45, 518, 5), 85: (46, 930, 6), 85: (47, 399, 7), 85: (48, 924, 8), 85: (49, 731, 9), 85: (50, 8 , 0), 85: (51, 219, 1), 85: (52, 276, 2), 85: (53, 770, 3), 85: (54, 991, 4), 85: (55, 390, 5), 85: (56, 419, 6), 85: (57, 346, 7), 85: (58, 898, 8), 85: (59, 396, 9), 85: (60, 221, 0), 85: (61, 208, 1), 85: (62, 934, 2), 85: (63, 510, 3), 85: (64, 147, 4), 85: (65, 156, 5), 85: (66, 529, 6), 85: (67, 86 , 7), 85: (68, 384, 8), 85: (69, 603, 9), 85: (70, 107, 0), 85: (71, 867, 1), 85: (72, 253, 2), 85: (73, 782, 3), 85: (74, 124, 4), 85: (75, 879, 5), 85: (76, 34 , 6), 85: (77, 143, 7), 85: (78, 494, 8), 85: (79, 125, 9), 85: (80, 400, 0), 85: (81, 187, 1), 85: (82, 982, 2), 85: (83, 641, 3), 85: (84, 711, 4), 85: (85, 779, 5), 85: (86, 648, 6), 85: (87, 590, 7), 85: (88, 241, 8), 85: (89, 929, 9), 85: (90, 914, 0), 85: (91, 449, 1), 85: (92, 815, 2), 85: (93, 225, 3), 85: (94, 377, 4), 85: (95, 120, 5), 85: (96, 662, 6), 85: (97, 277, 7), 85: (98, 351, 8), 85: (99, 722, 9); 85: ---- 85: 100 85: 85:
:161 85: select L.colC as colC, L.t1B, L.t2B, R.t3B, R.t4B from 85: ( 85: select t1.colC as colC, t1.colB as t1B, t2.colB as t2B from 85: (select colC, colB from temp_2 where colA > 10 and colA <= 30) t1 85: inner join 85: (select colC, colB from temp_2 where colA > 20 and colA <= 40) t2 85: on t1.colC = t2.colC 85: ) L 85: inner join 85: ( 85: select t3.colC as colC, t3.colB as t3B, t4.colB as t4B from 85: (select colC, colB from temp_2 where colA > 30 and colA <= 50) t3 85: inner join 85: (select colC, colB from temp_2 where colA > 40 and colA <= 60) t4 85: on t3.colC = t4.colC 85: ) R 85: on L.colC = R.colC; 85: --- YOUR RESULT --- 85: 1 878 352 723 949 85: 1 878 352 723 219 85: 1 878 352 949 949 85: 1 878 352 949 219 85: 1 878 723 723 949 85: 1 878 723 723 219 85: 1 878 723 949 949 85: 1 878 723 949 219 85: 2 170 387 666 42 85: 2 170 387 666 276 85: 2 170 387 42 42 85: 2 170 387 42 276 85: 2 170 666 666 42 85: 2 170 666 666 276 85: 2 170 666 42 42 85: 2 170 666 42 276 85: 3 332 598 701 272 85: 3 332 598 701 770 85: 3 332 598 272 272 85: 3 332 598 272 770 85: 3 332 701 701 272 85: 3 332 701 701 770 85: 3 332 701 272 272 85: 3 332 701 272 770 85: 4 680 440 311 975 85: 4 680 440 311 991 85: 4 680 440 975 975 85: 4 680 440 975 991 85: 4 680 311 311 975 85: 4 680 311 311 991 85: 4 680 311 975 975 85: 4 680 311 975 991 85: 5 2 83 214 518 85: 5 2 83 214 390 85: 5 2 83 518 518 85: 5 2 83 518 390 85: 5 2 214 214 518 85: 5 2 214 214 390 85: 5 2 214 518 518 85: 5 2 214 518 390 85: 6 552 57 259 930 85: 6 552 57 259 419 85: 6 552 57 930 930 85: 6 552 57 930 419 85: 6 552 259 259 930 85: 6 552 259 259 419 85: 6 552 259 930 930 85: 6 552 259 930 419 85: 7 561 883 812 399 85: 7 561 883 812 346 85: 7 561 883 399 399 85: 7 561 883 399 346 85: 7 561 812 812 399 85: 7 561 812 812 346 85: 7 561 812 399 399 85: 7 561 812 399 346 85: 8 398 914 194 924 85: 8 398 914 194 898 85: 8 398 914 924 924 85: 8 398 914 924 898 85: 8 398 194 194 924 85: 8 398 194 194 898 85: 8 398 194 924 924 85: 8 398 194 924 898 85: 9 974 538 160 731 85: 9 974 538 160 396 85: 9 974 538 731 731 85: 9 974 538 731 396 85: 9 974 160 160 731 85: 9 974 160 160 396 85: 9 974 160 731 731 85: 9 974 160 731 396 85: 0 739 132 917 8 85: 0 739 132 917 221 85: 0 739 132 8 8 85: 0 739 132 8 221 85: 0 739 917 917 8 85: 0 739 917 917 221 85: 0 739 917 8 8 85: 0 739 917 8 221 85: 1 352 352 723 949 85: 1 352 352 723 219 85: 1 352 352 949 949 85: 1 352 352 949 219 85: 1 352 723 723 949 85: 1 352 723 723 219 85: 1 352 723 949 949 85: 1 352 723 949 219 85: 2 387 387 666 42 85: 2 387 387 666 276 85: 2 387 387 42 42 85: 2 387 387 42 276 85: 2 387 666 666 42 85: 2 387 666 666 276 85: 2 387 666 42 42 85: 2 387 666 42 276 85: 3 598 598 701 272 85: 3 598 598 701 770 85: 3 598 598 272 272 85: 3 598 598 272 770 85: 3 598 701 701 272 85: 3 598 701 701 770 85: 3 598 701 272 272 85: 3 598 701 272 770 85: 4 440 440 311 975 85: 4 440 440 311 991 85: 4 440 440 975 975 85: 4 440 440 975 991 85: 4 440 311 311 975 85: 4 440 311 311 991 85: 4 440 311 975 975 85: 4 440 311 975 991 85: 5 83 83 214 518 85: 5 83 83 214 390 85: 5 83 83 518 518 85: 5 83 83 518 390 85: 5 83 214 214 518 85: 5 83 214 214 390 85: 5 83 214 518 518 85: 5 83 214 518 390 85: 6 57 57 259 930 85: 6 57 57 259 419 85: 6 57 57 930 930 85: 6 57 57 930 419 85: 6 57 259 259 930 85: 6 57 259 259 419 85: 6 57 259 930 930 85: 6 57 259 930 419 85: 7 883 883 812 399 85: 7 883 883 812 346 85: 7 883 883 399 399 85: 7 883 883 399 346 85: 7 883 812 812 399 85: 7 883 812 812 346 85: 7 883 812 399 399 85: 7 883 812 399 346 85: 8 914 914 194 924 85: 8 914 914 194 898 85: 8 914 914 924 924 85: 8 914 914 924 898 85: 8 914 194 194 924 85: 8 914 194 194 898 85: 8 914 194 924 924 85: 8 914 194 924 898 85: 9 538 538 160 731 85: 9 538 538 160 396 85: 9 538 538 731 731 85: 9 538 538 731 396 85: 9 538 160 160 731 85: 9 538 160 160 396 85: 9 538 160 731 731 85: 9 538 160 731 396 85: 0 132 132 917 8 85: 0 132 132 917 221 85: 0 132 132 8 8 85: 0 132 132 8 221 85: 0 132 917 917 8 85: 0 132 917 917 221 85: 0 132 917 8 8 85: 0 132 917 8 221 85: 85: --- EXPECTED RESULT --- 85: 1 878 352 723 949 85: 1 878 352 723 219 85: 1 878 352 949 949 85: 1 878 352 949 219 85: 1 878 723 723 949 85: 1 878 723 723 219 85: 1 878 723 949 949 85: 1 878 723 949 219 85: 2 170 387 666 42 85: 2 170 387 666 276 85: 2 170 387 42 42 85: 2 170 387 42 276 85: 2 170 666 666 42 85: 2 170 666 666 276 85: 2 170 666 42 42 85: 2 170 666 42 276 85: 3 332 598 701 272 85: 3 332 598 701 770 85: 3 332 598 272 272 85: 3 332 598 272 770 85: 3 332 701 701 272 85: 3 332 701 701 770 85: 3 332 701 272 272 85: 3 332 701 272 770 85: 4 680 440 311 975 85: 4 680 440 311 991 85: 4 680 440 975 975 85: 4 680 440 975 991 85: 4 680 311 311 975 85: 4 680 311 311 991 85: 4 680 311 975 975 85: 4 680 311 975 991 85: 5 2 83 214 518 85: 5 2 83 214 390 85: 5 2 83 518 518 85: 5 2 83 518 390 85: 5 2 214 214 518 85: 5 2 214 214 390 85: 5 2 214 518 518 85: 5 2 214 518 390 85: 6 552 57 259 930 85: 6 552 57 259 419 85: 6 552 57 930 930 85: 6 552 57 930 419 85: 6 552 259 259 930 85: 6 552 259 259 419 85: 6 552 259 930 930 85: 6 552 259 930 419 85: 7 561 883 812 399 85: 7 561 883 812 346 85: 7 561 883 399 399 85: 7 561 883 399 346 85: 7 561 812 812 399 85: 7 561 812 812 346 85: 7 561 812 399 399 85: 7 561 812 399 346 85: 8 398 914 194 924 85: 8 398 914 194 898 85: 8 398 914 924 924 85: 8 398 914 924 898 85: 8 398 194 194 924 85: 8 398 194 194 898 85: 8 398 194 924 924 85: 8 398 194 924 898 85: 9 974 538 160 731 85: 9 974 538 160 396 85: 9 974 538 731 731 85: 9 974 538 731 396 85: 9 974 160 160 731 85: 9 974 160 160 396 85: 9 974 160 731 731 85: 9 974 160 731 396 85: 0 739 132 917 8 85: 0 739 132 917 221 85: 0 739 132 8 8 85: 0 739 132 8 221 85: 0 739 917 917 8 85: 0 739 917 917 221 85: 0 739 917 8 8 85: 0 739 917 8 221 85: 1 352 352 723 949 85: 1 352 352 723 219 85: 1 352 352 949 949 85: 1 352 352 949 219 85: 1 352 723 723 949 85: 1 352 723 723 219 85: 1 352 723 949 949 85: 1 352 723 949 219 85: 2 387 387 666 42 85: 2 387 387 666 276 85: 2 387 387 42 42 85: 2 387 387 42 276 85: 2 387 666 666 42 85: 2 387 666 666 276 85: 2 387 666 42 42 85: 2 387 666 42 276 85: 3 598 598 701 272 85: 3 598 598 701 770 85: 3 598 598 272 272 85: 3 598 598 272 770 85: 3 598 701 701 272 85: 3 598 701 701 770 85: 3 598 701 272 272 85: 3 598 701 272 770 85: 4 440 440 311 975 85: 4 440 440 311 991 85: 4 440 440 975 975 85: 4 440 440 975 991 85: 4 440 311 311 975 85: 4 440 311 311 991 85: 4 440 311 975 975 85: 4 440 311 975 991 85: 5 83 83 214 518 85: 5 83 83 214 390 85: 5 83 83 518 518 85: 5 83 83 518 390 85: 5 83 214 214 518 85: 5 83 214 214 390 85: 5 83 214 518 518 85: 5 83 214 518 390 85: 6 57 57 259 930 85: 6 57 57 259 419 85: 6 57 57 930 930 85: 6 57 57 930 419 85: 6 57 259 259 930 85: 6 57 259 259 419 85: 6 57 259 930 930 85: 6 57 259 930 419 85: 7 883 883 812 399 85: 7 883 883 812 346 85: 7 883 883 399 399 85: 7 883 883 399 346 85: 7 883 812 812 399 85: 7 883 812 812 346 85: 7 883 812 399 399 85: 7 883 812 399 346 85: 8 914 914 194 924 85: 8 914 914 194 898 85: 8 914 914 924 924 85: 8 914 914 924 898 85: 8 914 194 194 924 85: 8 914 194 194 898 85: 8 914 194 924 924 85: 8 914 194 924 898 85: 9 538 538 160 731 85: 9 538 538 160 396 85: 9 538 538 731 731 85: 9 538 538 731 396 85: 9 538 160 160 731 85: 9 538 160 160 396 85: 9 538 160 731 731 85: 9 538 160 731 396 85: 0 132 132 917 8 85: 0 132 132 917 221 85: 0 132 132 8 8 85: 0 132 132 8 221 85: 0 132 917 917 8 85: 0 132 917 917 221 85: 0 132 917 8 8 85: 0 132 917 8 221 85: 85:
:341 85: create table t2(v1 int); insert into t2 values (1), (1), (2); 85: ---- 85: Table created with id = 34 85: 3 85: 85:
:344 85: create table t3(v1 int); insert into t3 values (1), (2), (3); 85: ---- 85: Table created with id = 35 85: 3 85: 85:
:347 85: create table t4(v1 int); insert into t4 values (2), (3), (3); 85: ---- 85: Table created with id = 36 85: 3 85: 85:
:350 85: select * from t3 left join t2 on t2.v1 = t3.v1; 85: Extra checks: ["ensure:nlj_init_check"] 85: [PASS] extra check: ensure:nlj_init_check 85: --- YOUR RESULT --- 85: 1 1 85: 1 1 85: 2 2 85: 3 integer_null 85: 85: --- EXPECTED RESULT --- 85: 1 1 85: 1 1 85: 2 2 85: 3 integer_null 85: 85:
:358 85: select * from (t3 left join t2 on t2.v1 = t3.v1) left join t4 on t3.v1 = t4.v1; 85: Extra checks: ["ensure:nlj_init_check"] 85: [PASS] extra check: ensure:nlj_init_check 85: --- YOUR RESULT --- 85: 1 1 integer_null 85: 1 1 integer_null 85: 2 2 2 85: 3 integer_null 3 85: 3 integer_null 3 85: 85: --- EXPECTED RESULT --- 85: 1 1 integer_null 85: 1 1 integer_null 85: 2 2 2 85: 3 integer_null 3 85: 3 integer_null 3 85: 85:
:367 85: create table t5(v1 int); 85: ---- 85: Table created with id = 37 85: 85:
:370 85: select * from ((t3 left join t5 on t3.v1 < t5.v1) left join t5 as t52 on t3.v1 < t52.v1) left join t5 as t53 on t3.v1 < t53.v1; 85: Extra checks: ["ensure:nlj_init_check"] 85: [PASS] extra check: ensure:nlj_init_check 85: --- YOUR RESULT --- 85: 1 integer_null integer_null integer_null 85: 2 integer_null integer_null integer_null 85: 3 integer_null integer_null integer_null 85: 85: --- EXPECTED RESULT --- 85: 1 integer_null integer_null integer_null 85: 2 integer_null integer_null integer_null 85: 3 integer_null integer_null integer_null 85: 11/19 Test #85: SQLLogicTest.p3.11-multi-way-join ........ Passed 1.75 sec test 86 Start 86: SQLLogicTest.p3.12-repeat-execute 86: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.12-repeat-execute.slt" "--verbose" "-d" "--in-memory" 86: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 86: Test timeout computed to be: 10000000 86:
:4 86: create table t1(v1 int, v2 varchar(128)); 86: ---- 86: Table created with id = 32 86: 86:
:7 86: insert into t1 values (0, '🥰'), (1, '🥰🥰'); 86: --- YOUR RESULT --- 86: 2 86: 86: --- EXPECTED RESULT --- 86: 2 86: 86:
:14 86: select * from __mock_table_123, t1; 86: Extra checks: ["ensure:nlj_init_check"] 86: [PASS] extra check: ensure:nlj_init_check 86: --- YOUR RESULT --- 86: 1 0 🥰 86: 1 1 🥰🥰 86: 2 0 🥰 86: 2 1 🥰🥰 86: 3 0 🥰 86: 3 1 🥰🥰 86: 86: --- EXPECTED RESULT --- 86: 1 0 🥰 86: 1 1 🥰🥰 86: 2 0 🥰 86: 2 1 🥰🥰 86: 3 0 🥰 86: 3 1 🥰🥰 86: 86:
:26 86: select * from __mock_table_123, (select count(*) as cnt from t1); 86: Extra checks: ["ensure:nlj_init_check"] 86: [PASS] extra check: ensure:nlj_init_check 86: --- YOUR RESULT --- 86: 1 2 86: 2 2 86: 3 2 86: 86: --- EXPECTED RESULT --- 86: 1 2 86: 2 2 86: 3 2 86: 86:
:35 86: select * from __mock_table_123, (select distinct v2 from t1); 86: Extra checks: ["ensure:nlj_init_check"] 86: [PASS] extra check: ensure:nlj_init_check 86: --- YOUR RESULT --- 86: 1 🥰🥰 86: 1 🥰 86: 2 🥰🥰 86: 2 🥰 86: 3 🥰🥰 86: 3 🥰 86: 86: --- EXPECTED RESULT --- 86: 1 🥰🥰 86: 1 🥰 86: 2 🥰🥰 86: 2 🥰 86: 3 🥰🥰 86: 3 🥰 86: 86:
:47 86: create index t1v1 on t1(v1); 86: ---- 86: Index created with id = 0 with type = BPlusTree 86: 86:
:50 86: select * from __mock_table_123, (select * from t1 where v1 = 1); 86: Extra checks: ["ensure:nlj_init_check"] 86: [PASS] extra check: ensure:nlj_init_check 86: --- YOUR RESULT --- 86: 1 1 🥰🥰 86: 2 1 🥰🥰 86: 3 1 🥰🥰 86: 86: --- EXPECTED RESULT --- 86: 1 1 🥰🥰 86: 2 1 🥰🥰 86: 3 1 🥰🥰 86: 12/19 Test #86: SQLLogicTest.p3.12-repeat-execute ........ Passed 0.22 sec test 87 Start 87: SQLLogicTest.p3.13-nested-index-join 87: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.13-nested-index-join.slt" "--verbose" "-d" "--in-memory" 87: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 87: Test timeout computed to be: 10000000 87:
:3 87: set force_optimizer_starter_rule=yes 87: ---- 87: 87:
:6 87: create table temp_1(colA int, colB int, colC int, colD int); 87: ---- 87: Table created with id = 32 87: 87:
:9 87: insert into temp_1 values 87: (0 , 1, 6113, 48270), 87: (1 , 5, 8005, 22497), 87: (2 , 0, 4476, 73541), 87: (9 , 2, 2600, 32938), 87: (10, 8, 398 , 60977), 87: (11, 1, 5472, 33166), 87: (12, 3, 1107, 94947), 87: (13, 0, 4153, 54624), 87: (14, 3, 1907, 48515), 87: (15, 6, 9754, 95830), 87: (16, 8, 5252, 96696), 87: (3 , 2, 290 , 20860), 87: (4 , 0, 3362, 47696), 87: (5 , 8, 7022, 59586), 87: (6 , 2, 170 , 92798), 87: (7 , 2, 8524, 19746), 87: (8 , 8, 3074, 56174), 87: (17, 3, 4819, 99411), 87: (18, 9, 666 , 86073), 87: (19, 3, 701 , 34675), 87: (20, 2, 2307, 97170), 87: (28, 5, 8710, 194 ), 87: (29, 5, 5519, 4256 ), 87: (30, 0, 3803, 18357), 87: (31, 6, 219 , 2090 ), 87: (32, 2, 3842, 38160), 87: (33, 8, 991 , 24527), 87: (34, 4, 1443, 41478), 87: (35, 2, 7564, 14242), 87: (21, 4, 194 , 42522), 87: (22, 3, 4256, 54404), 87: (23, 7, 6037, 70355), 87: (24, 6, 1973, 98970), 87: (25, 3, 2090, 701 ), 87: (26, 2, 5392, 94519), 87: (27, 0, 8143, 47916), 87: (36, 6, 2269, 54671), 87: (37, 3, 3582, 77724), 87: (38, 2, 5267, 69339), 87: (39, 0, 1180, 94216), 87: (40, 6, 3158, 16603), 87: (41, 3, 4878, 85762), 87: (42, 1, 34 , 95622), 87: (43, 6, 9359, 1443 ), 87: (44, 0, 2173, 31618), 87: (45, 3, 9616, 67805), 87: (46, 2, 2006, 92368), 87: (47, 0, 6785, 75686), 87: (48, 6, 2696, 19966), 87: (49, 1, 3313, 70803), 87: (50, 7, 4001, 99484), 87: (51, 8, 9106, 28177), 87: (52, 1, 8312, 52310), 87: (58, 8, 483 , 86798), 87: (59, 6, 9742, 59516), 87: (60, 5, 4347, 34 ), 87: (61, 2, 9484, 25743), 87: (53, 1, 9567, 10624), 87: (54, 2, 6866, 15963), 87: (55, 1, 4956, 27755), 87: (56, 1, 4060, 16227), 87: (57, 9, 3683, 78077), 87: (62, 2, 9506, 13806), 87: (63, 2, 7758, 44219), 87: (64, 2, 1999, 83926), 87: (65, 3, 3886, 72321), 87: (66, 3, 8020, 97035), 87: (67, 0, 4633, 68232), 87: (68, 4, 2699, 52465), 87: (69, 8, 755 , 20385), 87: (70, 2, 8311, 59841), 87: (71, 4, 7826, 97071), 87: (72, 7, 7027, 29049), 87: (73, 9, 499 , 73848), 87: (74, 1, 9088, 12950), 87: (75, 3, 3517, 94485), 87: (76, 7, 4339, 25951), 87: (77, 2, 5801, 59170), 87: (85, 9, 849 , 11512), 87: (86, 3, 2697, 9484 ), 87: (87, 2, 3060, 25890), 87: (88, 2, 7329, 40526), 87: (89, 1, 9418, 34767), 87: (90, 9, 6826, 69422), 87: (91, 1, 1411, 8020 ), 87: (92, 9, 2110, 28695), 87: (78, 3, 5737, 59426), 87: (79, 3, 4299, 97298), 87: (80, 3, 7683, 21340), 87: (81, 0, 2045, 3683 ), 87: (82, 8, 5290, 98787), 87: (96, 1, 4733, 2699 ), 87: (97, 1, 2273, 63790), 87: (98, 3, 1394, 17139), 87: (99, 6, 4482, 57463), 87: (83, 3, 2914, 91662), 87: (84, 9, 4626, 92192), 87: (93, 4, 2758, 27498), 87: (94, 5, 8802, 70169), 87: (95, 9, 5706, 15441); 87: ---- 87: 100 87: 87:
:113 87: create table temp_2(colA int, colB int, colC int); 87: ---- 87: Table created with id = 33 87: 87:
:116 87: insert into temp_2 values 87: (5, 290, 5), 87: (6, 592, 6), 87: (0, 142, 0), 87: (1, 993, 1), 87: (2, 837, 2), 87: (3, 380, 3), 87: (4, 240, 4), 87: (7, 88 , 7), 87: (8, 194, 8), 87: (9, 638, 9), 87: (10, 290, 0), 87: (11, 878, 1), 87: (12, 170, 2), 87: (13, 332, 3), 87: (14, 680, 4), 87: (15, 2, 5), 87: (16, 552, 6), 87: (17, 561, 7), 87: (18, 398, 8), 87: (19, 974, 9), 87: (20, 739, 0), 87: (21, 352, 1), 87: (53, 770, 3), 87: (39, 160, 9), 87: (40, 917, 0), 87: (41, 949, 1), 87: (36, 259, 6), 87: (37, 812, 7), 87: (38, 194, 8), 87: (47, 399, 7), 87: (48, 924, 8), 87: (49, 731, 9), 87: (50, 8 , 0), 87: (51, 219, 1), 87: (52, 276, 2), 87: (55, 390, 5), 87: (56, 419, 6), 87: (57, 346, 7), 87: (58, 898, 8), 87: (59, 396, 9), 87: (60, 221, 0), 87: (61, 208, 1), 87: (84, 711, 4), 87: (85, 779, 5), 87: (86, 648, 6), 87: (87, 590, 7), 87: (88, 241, 8), 87: (89, 929, 9), 87: (90, 914, 0), 87: (91, 449, 1), 87: (92, 815, 2), 87: (93, 225, 3), 87: (54, 991, 4), 87: (22, 387, 2), 87: (23, 598, 3), 87: (24, 440, 4), 87: (25, 83, 5), 87: (26, 57, 6), 87: (27, 883, 7), 87: (28, 914, 8), 87: (29, 538, 9), 87: (30, 132, 0), 87: (31, 723, 1), 87: (62, 934, 2), 87: (63, 510, 3), 87: (64, 147, 4), 87: (65, 156, 5), 87: (66, 529, 6), 87: (67, 86 , 7), 87: (68, 384, 8), 87: (69, 603, 9), 87: (70, 107, 0), 87: (71, 867, 1), 87: (42, 42 , 2), 87: (43, 272, 3), 87: (44, 975, 4), 87: (45, 518, 5), 87: (46, 930, 6), 87: (79, 125, 9), 87: (80, 400, 0), 87: (81, 187, 1), 87: (82, 982, 2), 87: (83, 641, 3), 87: (94, 377, 4), 87: (95, 120, 5), 87: (96, 662, 6), 87: (97, 277, 7), 87: (98, 351, 8), 87: (32, 666, 2), 87: (33, 701, 3), 87: (34, 311, 4), 87: (35, 214, 5), 87: (72, 253, 2), 87: (73, 782, 3), 87: (74, 124, 4), 87: (75, 879, 5), 87: (76, 34 , 6), 87: (77, 143, 7), 87: (78, 494, 8), 87: (99, 722, 9); 87: ---- 87: 100 87: 87:
:219 87: create table temp_3(colA int, colB int); 87: ---- 87: Table created with id = 34 87: 87:
:222 87: insert into temp_3 values 87: (5, 29), 87: (6, 52), 87: (0, 142), 87: (1, 993), 87: (2, 837), 87: (3, 52), 87: (4, 240), 87: (7, 88), 87: (8, 14), 87: (9, 52), 87: (10, 290), 87: (11, 878), 87: (12, 17), 87: (13, 52), 87: (14, 680), 87: (15, 2), 87: (16, 52), 87: (17, 561), 87: (18, 38), 87: (19, 974), 87: (20, 739); 87: ---- 87: 21 87: 87:
:246 87: create index temp_1_colA on temp_1(colA); 87: ---- 87: Index created with id = 0 with type = BPlusTree 87: 87:
:249 87: create index temp_2_colA on temp_2(colA); 87: ---- 87: Index created with id = 1 with type = BPlusTree 87: 87:
:252 87: select * from __mock_table_1 m1 inner join temp_1 t1 on t1.colA = m1.colB; 87: Extra checks: ["ensure:index_join"] 87: [PASS] extra check: ensure:index_join 87: --- YOUR RESULT --- 87: 0 0 0 1 6113 48270 87: 87: --- EXPECTED RESULT --- 87: 0 0 0 1 6113 48270 87: 87:
:258 87: select * from temp_3 t3 inner join temp_2 t2 on t3.colB = t2.colA; 87: Extra checks: ["ensure:index_join"] 87: [PASS] extra check: ensure:index_join 87: --- YOUR RESULT --- 87: 5 29 29 538 9 87: 6 52 52 276 2 87: 3 52 52 276 2 87: 7 88 88 241 8 87: 8 14 14 680 4 87: 9 52 52 276 2 87: 12 17 17 561 7 87: 13 52 52 276 2 87: 15 2 2 837 2 87: 16 52 52 276 2 87: 18 38 38 194 8 87: 87: --- EXPECTED RESULT --- 87: 5 29 29 538 9 87: 6 52 52 276 2 87: 3 52 52 276 2 87: 7 88 88 241 8 87: 8 14 14 680 4 87: 9 52 52 276 2 87: 12 17 17 561 7 87: 13 52 52 276 2 87: 15 2 2 837 2 87: 16 52 52 276 2 87: 18 38 38 194 8 87: 87:
:276 87: create table t1(v1 int); 87: ---- 87: Table created with id = 35 87: 87:
:279 87: insert into t1 (select * from __mock_table_123); 87: ---- 87: 3 87: 87:
:282 87: create index t1_v1 on t1(v1); 87: ---- 87: Index created with id = 2 with type = BPlusTree 87: 87:
:285 87: select * from test_simple_seq_2 t2 left join t1 on t1.v1 = t2.col1; 87: Extra checks: ["ensure:index_join"] 87: [PASS] extra check: ensure:index_join 87: --- YOUR RESULT --- 87: 0 10 integer_null 87: 1 11 1 87: 2 12 2 87: 3 13 3 87: 4 14 integer_null 87: 5 15 integer_null 87: 6 16 integer_null 87: 7 17 integer_null 87: 8 18 integer_null 87: 9 19 integer_null 87: 87: --- EXPECTED RESULT --- 87: 0 10 integer_null 87: 1 11 1 87: 2 12 2 87: 3 13 3 87: 4 14 integer_null 87: 5 15 integer_null 87: 6 16 integer_null 87: 7 17 integer_null 87: 8 18 integer_null 87: 9 19 integer_null 87: 87:
:301 87: select * from 87: temp_2 t2 inner join 87: (select distinct(temp_2.colA) from temp_1 inner join temp_2 on temp_1.colC = temp_2.colA) t3 87: on t2.colB < t3.colA; 87: Extra checks: ["ensure:index_join"] 87: [PASS] extra check: ensure:index_join 87: --- YOUR RESULT --- 87: 15 2 5 34 87: 50 8 0 34 87: 87: --- EXPECTED RESULT --- 87: 15 2 5 34 87: 50 8 0 34 87: 13/19 Test #87: SQLLogicTest.p3.13-nested-index-join ..... Passed 0.50 sec test 88 Start 88: SQLLogicTest.p3.14-hash-join 88: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.14-hash-join.slt" "--verbose" "-d" "--in-memory" 88: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 88: Test timeout computed to be: 10000000 88:
:6 88: select * from 88: __mock_table_tas_2025_spring inner join __mock_table_schedule 88: on office_hour = day_of_week 88: where has_lecture = 1; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: carpecodeum Monday Monday 1 88: ChrisLaspias Wednesday Wednesday 1 88: rmboyce Monday Monday 1 88: 88: --- EXPECTED RESULT --- 88: ChrisLaspias Wednesday Wednesday 1 88: carpecodeum Monday Monday 1 88: rmboyce Monday Monday 1 88: 88:
:19 88: select * from test_simple_seq_1 s1 inner join test_simple_seq_2 s2 on s1.col1 = s2.col1; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 0 0 10 88: 1 1 11 88: 2 2 12 88: 3 3 13 88: 4 4 14 88: 5 5 15 88: 6 6 16 88: 7 7 17 88: 8 8 18 88: 9 9 19 88: 88: --- EXPECTED RESULT --- 88: 0 0 10 88: 1 1 11 88: 2 2 12 88: 3 3 13 88: 4 4 14 88: 5 5 15 88: 6 6 16 88: 7 7 17 88: 8 8 18 88: 9 9 19 88: 88:
:34 88: create table t1(v1 int); 88: ---- 88: Table created with id = 32 88: 88:
:38 88: insert into t1 (select * from __mock_table_123); 88: ---- 88: 3 88: 88:
:42 88: select * from test_simple_seq_2 t2 left join t1 on t1.v1 = t2.col1; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 0 10 integer_null 88: 1 11 1 88: 2 12 2 88: 3 13 3 88: 4 14 integer_null 88: 5 15 integer_null 88: 6 16 integer_null 88: 7 17 integer_null 88: 8 18 integer_null 88: 9 19 integer_null 88: 88: --- EXPECTED RESULT --- 88: 0 10 integer_null 88: 1 11 1 88: 2 12 2 88: 3 13 3 88: 4 14 integer_null 88: 5 15 integer_null 88: 6 16 integer_null 88: 7 17 integer_null 88: 8 18 integer_null 88: 9 19 integer_null 88: 88:
:57 88: create table temp_1(colA int, colB int, colC int, colD int); 88: ---- 88: Table created with id = 33 88: 88:
:61 88: insert into temp_1 values 88: (0 , 1, 6113, 48270), 88: (1 , 5, 8005, 22497), 88: (2 , 0, 4476, 73541), 88: (3 , 2, 290 , 20860), 88: (4 , 0, 3362, 47696), 88: (5 , 8, 7022, 59586), 88: (6 , 2, 170 , 92798), 88: (7 , 2, 8524, 19746), 88: (8 , 8, 3074, 56174), 88: (9 , 2, 2600, 32938), 88: (10, 8, 398 , 60977), 88: (11, 1, 5472, 33166), 88: (12, 3, 1107, 94947), 88: (13, 0, 4153, 54624), 88: (14, 3, 1907, 48515), 88: (15, 6, 9754, 95830), 88: (16, 8, 5252, 96696), 88: (17, 3, 4819, 99411), 88: (18, 9, 666 , 86073), 88: (19, 3, 701 , 34675), 88: (20, 2, 2307, 97170), 88: (21, 4, 194 , 42522), 88: (22, 3, 4256, 54404), 88: (23, 7, 6037, 70355), 88: (24, 6, 1973, 98970), 88: (25, 3, 2090, 701 ), 88: (26, 2, 5392, 94519), 88: (27, 0, 8143, 47916), 88: (28, 5, 8710, 194 ), 88: (29, 5, 5519, 4256 ), 88: (30, 0, 3803, 18357), 88: (31, 6, 219 , 2090 ), 88: (32, 2, 3842, 38160), 88: (33, 8, 991 , 24527), 88: (34, 4, 1443, 41478), 88: (35, 2, 7564, 14242), 88: (36, 6, 2269, 54671), 88: (37, 3, 3582, 77724), 88: (38, 2, 5267, 69339), 88: (39, 0, 1180, 94216), 88: (40, 6, 3158, 16603), 88: (41, 3, 4878, 85762), 88: (42, 1, 34 , 95622), 88: (43, 6, 9359, 1443 ), 88: (44, 0, 2173, 31618), 88: (45, 3, 9616, 67805), 88: (46, 2, 2006, 92368), 88: (47, 0, 6785, 75686), 88: (48, 6, 2696, 19966), 88: (49, 1, 3313, 70803), 88: (50, 7, 4001, 99484), 88: (51, 8, 9106, 28177), 88: (52, 1, 8312, 52310), 88: (53, 1, 9567, 10624), 88: (54, 2, 6866, 15963), 88: (55, 1, 4956, 27755), 88: (56, 1, 4060, 16227), 88: (57, 9, 3683, 78077), 88: (58, 8, 483 , 86798), 88: (59, 6, 9742, 59516), 88: (60, 5, 4347, 34 ), 88: (61, 2, 9484, 25743), 88: (62, 2, 9506, 13806), 88: (63, 2, 7758, 44219), 88: (64, 2, 1999, 83926), 88: (65, 3, 3886, 72321), 88: (66, 3, 8020, 97035), 88: (67, 0, 4633, 68232), 88: (68, 4, 2699, 52465), 88: (69, 8, 755 , 20385), 88: (70, 2, 8311, 59841), 88: (71, 4, 7826, 97071), 88: (72, 7, 7027, 29049), 88: (73, 9, 499 , 73848), 88: (74, 1, 9088, 12950), 88: (75, 3, 3517, 94485), 88: (76, 7, 4339, 25951), 88: (77, 2, 5801, 59170), 88: (78, 3, 5737, 59426), 88: (79, 3, 4299, 97298), 88: (80, 3, 7683, 21340), 88: (81, 0, 2045, 3683 ), 88: (82, 8, 5290, 98787), 88: (83, 3, 2914, 91662), 88: (84, 9, 4626, 92192), 88: (85, 9, 849 , 11512), 88: (86, 3, 2697, 9484 ), 88: (87, 2, 3060, 25890), 88: (88, 2, 7329, 40526), 88: (89, 1, 9418, 34767), 88: (90, 9, 6826, 69422), 88: (91, 1, 1411, 8020 ), 88: (92, 9, 2110, 28695), 88: (93, 4, 2758, 27498), 88: (94, 5, 8802, 70169), 88: (95, 9, 5706, 15441), 88: (96, 1, 4733, 2699 ), 88: (97, 1, 2273, 63790), 88: (98, 3, 1394, 17139), 88: (99, 6, 4482, 57463); 88: ---- 88: 100 88: 88:
:165 88: create table temp_2(colA int, colB int, colC int); 88: ---- 88: Table created with id = 34 88: 88:
:169 88: insert into temp_2 values 88: (0, 142, 0), 88: (1, 993, 1), 88: (2, 837, 2), 88: (3, 380, 3), 88: (4, 240, 4), 88: (5, 290, 5), 88: (6, 592, 6), 88: (7, 88 , 7), 88: (8, 194, 8), 88: (9, 638, 9), 88: (10, 290, 0), 88: (11, 878, 1), 88: (12, 170, 2), 88: (13, 332, 3), 88: (14, 680, 4), 88: (15, 2, 5), 88: (16, 552, 6), 88: (17, 561, 7), 88: (18, 398, 8), 88: (19, 974, 9), 88: (20, 739, 0), 88: (21, 352, 1), 88: (22, 387, 2), 88: (23, 598, 3), 88: (24, 440, 4), 88: (25, 83, 5), 88: (26, 57, 6), 88: (27, 883, 7), 88: (28, 914, 8), 88: (29, 538, 9), 88: (30, 132, 0), 88: (31, 723, 1), 88: (32, 666, 2), 88: (33, 701, 3), 88: (34, 311, 4), 88: (35, 214, 5), 88: (36, 259, 6), 88: (37, 812, 7), 88: (38, 194, 8), 88: (39, 160, 9), 88: (40, 917, 0), 88: (41, 949, 1), 88: (42, 42 , 2), 88: (43, 272, 3), 88: (44, 975, 4), 88: (45, 518, 5), 88: (46, 930, 6), 88: (47, 399, 7), 88: (48, 924, 8), 88: (49, 731, 9), 88: (50, 8 , 0), 88: (51, 219, 1), 88: (52, 276, 2), 88: (53, 770, 3), 88: (54, 991, 4), 88: (55, 390, 5), 88: (56, 419, 6), 88: (57, 346, 7), 88: (58, 898, 8), 88: (59, 396, 9), 88: (60, 221, 0), 88: (61, 208, 1), 88: (62, 934, 2), 88: (63, 510, 3), 88: (64, 147, 4), 88: (65, 156, 5), 88: (66, 529, 6), 88: (67, 86 , 7), 88: (68, 384, 8), 88: (69, 603, 9), 88: (70, 107, 0), 88: (71, 867, 1), 88: (72, 253, 2), 88: (73, 782, 3), 88: (74, 124, 4), 88: (75, 879, 5), 88: (76, 34 , 6), 88: (77, 143, 7), 88: (78, 494, 8), 88: (79, 125, 9), 88: (80, 400, 0), 88: (81, 187, 1), 88: (82, 982, 2), 88: (83, 641, 3), 88: (84, 711, 4), 88: (85, 779, 5), 88: (86, 648, 6), 88: (87, 590, 7), 88: (88, 241, 8), 88: (89, 929, 9), 88: (90, 914, 0), 88: (91, 449, 1), 88: (92, 815, 2), 88: (93, 225, 3), 88: (94, 377, 4), 88: (95, 120, 5), 88: (96, 662, 6), 88: (97, 277, 7), 88: (98, 351, 8), 88: (99, 722, 9); 88: ---- 88: 100 88: 88:
:272 88: create table big_l(a int, b int, c int, d int); 88: ---- 88: Table created with id = 35 88: 88:
:275 88: insert into big_l 88: select t1.colA, t1.colB, t1.colC, t1.colD 88: from temp_1 t1, temp_2 t2; 88: ---- 88: 10000 88: 88:
:280 88: select count(*) from big_l b inner join temp_2 t2 on b.a = t2.colA; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 10000 88: 88: --- EXPECTED RESULT --- 88: 10000 88: 88:
:285 88: create table temp_3(colA int, colB int); 88: ---- 88: Table created with id = 36 88: 88:
:288 88: insert into temp_3 values 88: (5, 29), 88: (6, 52), 88: (0, 142), 88: (1, 993), 88: (2, 837), 88: (3, 52), 88: (4, 240), 88: (7, 88), 88: (8, 14), 88: (9, 52), 88: (10, 290), 88: (11, 878), 88: (12, 17), 88: (13, 52), 88: (14, 680), 88: (15, 2), 88: (16, 52), 88: (17, 561), 88: (18, 38), 88: (19, 974), 88: (20, 739); 88: ---- 88: 21 88: 88:
:312 88: select * from temp_1 t1 inner join test_simple_seq_2 seq on t1.colA = seq.col2 ; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 10 8 398 60977 0 10 88: 11 1 5472 33166 1 11 88: 12 3 1107 94947 2 12 88: 13 0 4153 54624 3 13 88: 14 3 1907 48515 4 14 88: 15 6 9754 95830 5 15 88: 16 8 5252 96696 6 16 88: 17 3 4819 99411 7 17 88: 18 9 666 86073 8 18 88: 19 3 701 34675 9 19 88: 88: --- EXPECTED RESULT --- 88: 10 8 398 60977 0 10 88: 11 1 5472 33166 1 11 88: 12 3 1107 94947 2 12 88: 13 0 4153 54624 3 13 88: 14 3 1907 48515 4 14 88: 15 6 9754 95830 5 15 88: 16 8 5252 96696 6 16 88: 17 3 4819 99411 7 17 88: 18 9 666 86073 8 18 88: 19 3 701 34675 9 19 88: 88:
:326 88: select * from temp_2 t2 inner join test_simple_seq_2 seq on t2.colA = seq.col2 ; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 10 290 0 0 10 88: 11 878 1 1 11 88: 12 170 2 2 12 88: 13 332 3 3 13 88: 14 680 4 4 14 88: 15 2 5 5 15 88: 16 552 6 6 16 88: 17 561 7 7 17 88: 18 398 8 8 18 88: 19 974 9 9 19 88: 88: --- EXPECTED RESULT --- 88: 10 290 0 0 10 88: 11 878 1 1 11 88: 12 170 2 2 12 88: 13 332 3 3 13 88: 14 680 4 4 14 88: 15 2 5 5 15 88: 16 552 6 6 16 88: 17 561 7 7 17 88: 18 398 8 8 18 88: 19 974 9 9 19 88: 88:
:341 88: select * from __mock_table_1 m1 inner join temp_1 t1 on t1.colA = m1.colB; 88: --- YOUR RESULT --- 88: 0 0 0 1 6113 48270 88: 88: --- EXPECTED RESULT --- 88: 0 0 0 1 6113 48270 88: 88:
:347 88: select * from __mock_table_1 m1 inner join temp_2 t2 on t2.colA = m1.colB; 88: --- YOUR RESULT --- 88: 0 0 0 142 0 88: 88: --- EXPECTED RESULT --- 88: 0 0 0 142 0 88: 88:
:353 88: select * from temp_1 t1 inner join temp_2 t2 on t1.colD = t2.colA; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 60 5 4347 34 34 311 4 88: 88: --- EXPECTED RESULT --- 88: 60 5 4347 34 34 311 4 88: 88:
:359 88: create table t2(v1 int, v2 int); 88: ---- 88: Table created with id = 37 88: 88:
:362 88: insert into t2 values (0, 45), (0, 45), (0, 65), (1, 45), (1, 45), (1, 65), (2, 45); 88: ---- 88: 7 88: 88:
:365 88: select * from temp_2 inner join t2 on v2 = colA; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 45 518 5 0 45 88: 45 518 5 0 45 88: 45 518 5 1 45 88: 45 518 5 1 45 88: 45 518 5 2 45 88: 65 156 5 0 65 88: 65 156 5 1 65 88: 88: --- EXPECTED RESULT --- 88: 45 518 5 0 45 88: 45 518 5 0 45 88: 65 156 5 0 65 88: 45 518 5 1 45 88: 45 518 5 1 45 88: 65 156 5 1 65 88: 45 518 5 2 45 88: 88:
:376 88: create table t3(v1 int, v2 int); 88: ---- 88: Table created with id = 38 88: 88:
:379 88: insert into t3 values 88: (0, 1), 88: (1, 1), 88: (2, 1), 88: (3, 1), 88: (4, 1), 88: (5, 1), 88: (6, 1), 88: (0, 2), 88: (1, 2), 88: (2, 2), 88: (3, 2), 88: (4, 2), 88: (5, 2), 88: (6, 2); 88: ---- 88: 14 88: 88:
:396 88: select * from t3 inner join t3 temp on t3.v1 = temp.v2; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 1 1 0 1 88: 1 1 1 1 88: 1 1 2 1 88: 1 1 3 1 88: 1 1 4 1 88: 1 1 5 1 88: 1 1 6 1 88: 2 1 0 2 88: 2 1 1 2 88: 2 1 2 2 88: 2 1 3 2 88: 2 1 4 2 88: 2 1 5 2 88: 2 1 6 2 88: 1 2 0 1 88: 1 2 1 1 88: 1 2 2 1 88: 1 2 3 1 88: 1 2 4 1 88: 1 2 5 1 88: 1 2 6 1 88: 2 2 0 2 88: 2 2 1 2 88: 2 2 2 2 88: 2 2 3 2 88: 2 2 4 2 88: 2 2 5 2 88: 2 2 6 2 88: 88: --- EXPECTED RESULT --- 88: 1 1 0 1 88: 1 2 0 1 88: 1 1 1 1 88: 1 2 1 1 88: 1 1 2 1 88: 1 2 2 1 88: 1 1 3 1 88: 1 2 3 1 88: 1 1 4 1 88: 1 2 4 1 88: 1 1 5 1 88: 1 2 5 1 88: 1 1 6 1 88: 1 2 6 1 88: 2 1 0 2 88: 2 2 0 2 88: 2 1 1 2 88: 2 2 1 2 88: 2 1 2 2 88: 2 2 2 2 88: 2 1 3 2 88: 2 2 3 2 88: 2 1 4 2 88: 2 2 4 2 88: 2 1 5 2 88: 2 2 5 2 88: 2 1 6 2 88: 2 2 6 2 88: 88:
:428 88: select * from t3 left join t3 temp on t3.v1 = temp.v2; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 0 1 integer_null integer_null 88: 1 1 0 1 88: 1 1 1 1 88: 1 1 2 1 88: 1 1 3 1 88: 1 1 4 1 88: 1 1 5 1 88: 1 1 6 1 88: 2 1 0 2 88: 2 1 1 2 88: 2 1 2 2 88: 2 1 3 2 88: 2 1 4 2 88: 2 1 5 2 88: 2 1 6 2 88: 3 1 integer_null integer_null 88: 4 1 integer_null integer_null 88: 5 1 integer_null integer_null 88: 6 1 integer_null integer_null 88: 0 2 integer_null integer_null 88: 1 2 0 1 88: 1 2 1 1 88: 1 2 2 1 88: 1 2 3 1 88: 1 2 4 1 88: 1 2 5 1 88: 1 2 6 1 88: 2 2 0 2 88: 2 2 1 2 88: 2 2 2 2 88: 2 2 3 2 88: 2 2 4 2 88: 2 2 5 2 88: 2 2 6 2 88: 3 2 integer_null integer_null 88: 4 2 integer_null integer_null 88: 5 2 integer_null integer_null 88: 6 2 integer_null integer_null 88: 88: --- EXPECTED RESULT --- 88: 1 1 0 1 88: 1 2 0 1 88: 1 1 1 1 88: 1 2 1 1 88: 1 1 2 1 88: 1 2 2 1 88: 1 1 3 1 88: 1 2 3 1 88: 1 1 4 1 88: 1 2 4 1 88: 1 1 5 1 88: 1 2 5 1 88: 1 1 6 1 88: 1 2 6 1 88: 2 1 0 2 88: 2 2 0 2 88: 2 1 1 2 88: 2 2 1 2 88: 2 1 2 2 88: 2 2 2 2 88: 2 1 3 2 88: 2 2 3 2 88: 2 1 4 2 88: 2 2 4 2 88: 2 1 5 2 88: 2 2 5 2 88: 2 1 6 2 88: 2 2 6 2 88: 6 1 integer_null integer_null 88: 6 2 integer_null integer_null 88: 5 1 integer_null integer_null 88: 5 2 integer_null integer_null 88: 3 1 integer_null integer_null 88: 3 2 integer_null integer_null 88: 4 1 integer_null integer_null 88: 4 2 integer_null integer_null 88: 0 1 integer_null integer_null 88: 0 2 integer_null integer_null 88: 88:
:470 88: select * from temp_3 t3 inner join temp_2 t2 on t3.colB = t2.colA; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 5 29 29 538 9 88: 6 52 52 276 2 88: 3 52 52 276 2 88: 7 88 88 241 8 88: 8 14 14 680 4 88: 9 52 52 276 2 88: 12 17 17 561 7 88: 13 52 52 276 2 88: 15 2 2 837 2 88: 16 52 52 276 2 88: 18 38 38 194 8 88: 88: --- EXPECTED RESULT --- 88: 5 29 29 538 9 88: 6 52 52 276 2 88: 3 52 52 276 2 88: 7 88 88 241 8 88: 8 14 14 680 4 88: 9 52 52 276 2 88: 12 17 17 561 7 88: 13 52 52 276 2 88: 15 2 2 837 2 88: 16 52 52 276 2 88: 18 38 38 194 8 88: 88:
:485 88: select * from temp_3 t3 inner join temp_2 t2 on t2.colA = t3.colB; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 5 29 29 538 9 88: 6 52 52 276 2 88: 3 52 52 276 2 88: 7 88 88 241 8 88: 8 14 14 680 4 88: 9 52 52 276 2 88: 12 17 17 561 7 88: 13 52 52 276 2 88: 15 2 2 837 2 88: 16 52 52 276 2 88: 18 38 38 194 8 88: 88: --- EXPECTED RESULT --- 88: 5 29 29 538 9 88: 6 52 52 276 2 88: 3 52 52 276 2 88: 7 88 88 241 8 88: 8 14 14 680 4 88: 9 52 52 276 2 88: 12 17 17 561 7 88: 13 52 52 276 2 88: 15 2 2 837 2 88: 16 52 52 276 2 88: 18 38 38 194 8 88: 88:
:500 88: select * from temp_3 t3 left join temp_2 t2 on t3.colB = t2.colA; 88: Extra checks: ["ensure:hash_join"] 88: [PASS] extra check: ensure:hash_join 88: --- YOUR RESULT --- 88: 5 29 29 538 9 88: 6 52 52 276 2 88: 0 142 integer_null integer_null integer_null 88: 1 993 integer_null integer_null integer_null 88: 2 837 integer_null integer_null integer_null 88: 3 52 52 276 2 88: 4 240 integer_null integer_null integer_null 88: 7 88 88 241 8 88: 8 14 14 680 4 88: 9 52 52 276 2 88: 10 290 integer_null integer_null integer_null 88: 11 878 integer_null integer_null integer_null 88: 12 17 17 561 7 88: 13 52 52 276 2 88: 14 680 integer_null integer_null integer_null 88: 15 2 2 837 2 88: 16 52 52 276 2 88: 17 561 integer_null integer_null integer_null 88: 18 38 38 194 8 88: 19 974 integer_null integer_null integer_null 88: 20 739 integer_null integer_null integer_null 88: 88: --- EXPECTED RESULT --- 88: 5 29 29 538 9 88: 6 52 52 276 2 88: 3 52 52 276 2 88: 7 88 88 241 8 88: 8 14 14 680 4 88: 9 52 52 276 2 88: 12 17 17 561 7 88: 13 52 52 276 2 88: 15 2 2 837 2 88: 16 52 52 276 2 88: 18 38 38 194 8 88: 20 739 integer_null integer_null integer_null 88: 19 974 integer_null integer_null integer_null 88: 17 561 integer_null integer_null integer_null 88: 14 680 integer_null integer_null integer_null 88: 1 993 integer_null integer_null integer_null 88: 4 240 integer_null integer_null integer_null 88: 10 290 integer_null integer_null integer_null 88: 2 837 integer_null integer_null integer_null 88: 11 878 integer_null integer_null integer_null 88: 0 142 integer_null integer_null integer_null 88: 88:
:527 88: select * from temp_1 t1 inner join temp_2 t2 on t1.colB = t2.colA and t1.colA = t2.colC ; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 8 8 3074 56174 8 194 8 88: 88: --- EXPECTED RESULT --- 88: 8 8 3074 56174 8 194 8 88: 88:
:533 88: select * from temp_1 t1 inner join temp_2 t2 on t1.colC = t2.colB and t1.colB = t2.colC; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 6 2 170 92798 12 170 2 88: 10 8 398 60977 18 398 8 88: 19 3 701 34675 33 701 3 88: 88: --- EXPECTED RESULT --- 88: 6 2 170 92798 12 170 2 88: 10 8 398 60977 18 398 8 88: 19 3 701 34675 33 701 3 88: 88:
:542 88: select * from temp_1 t1 inner join temp_2 t2 on t1.colB = t2.colA and t2.colC = t1.colA ; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 8 8 3074 56174 8 194 8 88: 88: --- EXPECTED RESULT --- 88: 8 8 3074 56174 8 194 8 88: 88:
:548 88: select * from temp_1 t1 inner join temp_2 t2 on t1.colC = t2.colB and t2.colC = t1.colB ; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 6 2 170 92798 12 170 2 88: 10 8 398 60977 18 398 8 88: 19 3 701 34675 33 701 3 88: 88: --- EXPECTED RESULT --- 88: 6 2 170 92798 12 170 2 88: 10 8 398 60977 18 398 8 88: 19 3 701 34675 33 701 3 88: 88:
:555 88: insert into temp_2 values 88: (19, 701, 3), 88: (6, 170, 2); 88: ---- 88: 2 88: 88:
:561 88: select * from temp_1 t1 inner join temp_2 t2 on t1.colC = t2.colB and t1.colB = t2.colC and t1.colA = t2.colA; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 6 2 170 92798 6 170 2 88: 19 3 701 34675 19 701 3 88: 88: --- EXPECTED RESULT --- 88: 19 3 701 34675 19 701 3 88: 6 2 170 92798 6 170 2 88: 88:
:567 88: select * from temp_1 t1, temp_2 t2 WHERE t1.colA = t2.colA and t1.colB = t2.colC and t1.colA = t2.colC; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 8 8 3074 56174 8 194 8 88: 88: --- EXPECTED RESULT --- 88: 8 8 3074 56174 8 194 8 88: 88:
:572 88: create table temp_4(colA int, colB int, colC int, colD int); 88: ---- 88: Table created with id = 39 88: 88:
:575 88: insert into temp_4 values 88: (0 , 5, 6133, 48270), 88: (1 , 5, 8075, 22497), 88: (2 , 0, 476 , 73541), 88: (3 , 2, 2908, 20860), 88: (4 , 0, 3962, 47696), 88: (5 , 8, 7022, 59596), 88: (6 , 2, 1700, 92798), 88: (7 , 2, 854 , 19746), 88: (8 , 8, 3074, 5617 ), 88: (9 , 2, 2600, 32938), 88: (10, 8, 398 , 60877), 88: (11, 1, 5472, 33166), 88: (12, 3, 117 , 94947), 88: (13, 0, 4143, 54624), 88: (14, 3, 1997, 48515), 88: (15, 6, 9754, 95430), 88: (16, 0, 5252, 66696), 88: (17, 2, 4819, 99311), 88: (18, 5, 6666, 86073), 88: (19, 3, 7010, 34675), 88: (20, 2, 2304, 97170), 88: (21, 4, 194 , 42322), 88: (22, 3, 4256, 54403), 88: (23, 7, 6037, 70355), 88: (24, 6, 1973, 98971), 88: (25, 3, 2090, 711 ), 88: (26, 2, 5392, 94515), 88: (27, 0, 8143, 47936), 88: (28, 5, 8710, 1943 ), 88: (29, 4, 5519, 4256 ), 88: (30, 0, 3803, 18357), 88: (31, 6, 2199, 20903), 88: (32, 2, 3849, 38160), 88: (33, 8, 9910, 24527), 88: (34, 1, 1443, 41478), 88: (35, 2, 7564, 14242); 88: ---- 88: 36 88: 88:
:614 88: select t1.colA from temp_1 t1 inner join temp_4 t4 on t1.colA = t4.colA and t1.colB = t4.colB and t1.colC = t4.colC and t1.colD = t4.colD; 88: Extra checks: ["ensure:hash_join_no_filter"] 88: [PASS] extra check: ensure:hash_join_no_filter 88: --- YOUR RESULT --- 88: 9 88: 11 88: 23 88: 30 88: 35 88: 88: --- EXPECTED RESULT --- 88: 9 88: 11 88: 23 88: 30 88: 35 88: 14/19 Test #88: SQLLogicTest.p3.14-hash-join ............. Passed 1.10 sec test 89 Start 89: SQLLogicTest.p3.15-multi-way-hash-join 89: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.15-multi-way-hash-join.slt" "--verbose" "-d" "--in-memory" 89: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 89: Test timeout computed to be: 10000000 89:
:3 89: create table t1(v1 int); 89: ---- 89: Table created with id = 32 89: 89:
:6 89: insert into t1 values (1), (1); 89: ---- 89: 2 89: 89:
:9 89: select * from (t1 a inner join t1 b on a.v1 = b.v1) inner join t1 c on a.v1 = c.v1; 89: Extra checks: ["ensure:hash_join*2"] 89: [PASS] extra check: ensure:hash_join*2 89: --- YOUR RESULT --- 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 89: --- EXPECTED RESULT --- 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 1 1 1 89: 89:
:21 89: select * from __mock_table_123 a, __mock_table_123 b, __mock_table_123 c; 89: --- YOUR RESULT --- 89: 1 1 1 89: 1 1 2 89: 1 1 3 89: 1 2 1 89: 1 2 2 89: 1 2 3 89: 1 3 1 89: 1 3 2 89: 1 3 3 89: 2 1 1 89: 2 1 2 89: 2 1 3 89: 2 2 1 89: 2 2 2 89: 2 2 3 89: 2 3 1 89: 2 3 2 89: 2 3 3 89: 3 1 1 89: 3 1 2 89: 3 1 3 89: 3 2 1 89: 3 2 2 89: 3 2 3 89: 3 3 1 89: 3 3 2 89: 3 3 3 89: 89: --- EXPECTED RESULT --- 89: 1 1 1 89: 1 1 2 89: 1 1 3 89: 1 2 1 89: 1 2 2 89: 1 2 3 89: 1 3 1 89: 1 3 2 89: 1 3 3 89: 2 1 1 89: 2 1 2 89: 2 1 3 89: 2 2 1 89: 2 2 2 89: 2 2 3 89: 2 3 1 89: 2 3 2 89: 2 3 3 89: 3 1 1 89: 3 1 2 89: 3 1 3 89: 3 2 1 89: 3 2 2 89: 3 2 3 89: 3 3 1 89: 3 3 2 89: 3 3 3 89: 89:
:52 89: create table temp_2(colA int, colB int, colC int); 89: ---- 89: Table created with id = 33 89: 89:
:55 89: insert into temp_2 values 89: (0, 142, 0), 89: (1, 993, 1), 89: (2, 837, 2), 89: (3, 380, 3), 89: (4, 240, 4), 89: (5, 290, 5), 89: (6, 592, 6), 89: (7, 88 , 7), 89: (8, 194, 8), 89: (9, 638, 9), 89: (10, 290, 0), 89: (11, 878, 1), 89: (12, 170, 2), 89: (13, 332, 3), 89: (14, 680, 4), 89: (15, 2, 5), 89: (16, 552, 6), 89: (17, 561, 7), 89: (18, 398, 8), 89: (19, 974, 9), 89: (20, 739, 0), 89: (21, 352, 1), 89: (22, 387, 2), 89: (23, 598, 3), 89: (24, 440, 4), 89: (25, 83, 5), 89: (26, 57, 6), 89: (27, 883, 7), 89: (28, 914, 8), 89: (29, 538, 9), 89: (30, 132, 0), 89: (31, 723, 1), 89: (32, 666, 2), 89: (33, 701, 3), 89: (34, 311, 4), 89: (35, 214, 5), 89: (36, 259, 6), 89: (37, 812, 7), 89: (38, 194, 8), 89: (39, 160, 9), 89: (40, 917, 0), 89: (41, 949, 1), 89: (42, 42 , 2), 89: (43, 272, 3), 89: (44, 975, 4), 89: (45, 518, 5), 89: (46, 930, 6), 89: (47, 399, 7), 89: (48, 924, 8), 89: (49, 731, 9), 89: (50, 8 , 0), 89: (51, 219, 1), 89: (52, 276, 2), 89: (53, 770, 3), 89: (54, 991, 4), 89: (55, 390, 5), 89: (56, 419, 6), 89: (57, 346, 7), 89: (58, 898, 8), 89: (59, 396, 9), 89: (60, 221, 0), 89: (61, 208, 1), 89: (62, 934, 2), 89: (63, 510, 3), 89: (64, 147, 4), 89: (65, 156, 5), 89: (66, 529, 6), 89: (67, 86 , 7), 89: (68, 384, 8), 89: (69, 603, 9), 89: (70, 107, 0), 89: (71, 867, 1), 89: (72, 253, 2), 89: (73, 782, 3), 89: (74, 124, 4), 89: (75, 879, 5), 89: (76, 34 , 6), 89: (77, 143, 7), 89: (78, 494, 8), 89: (79, 125, 9), 89: (80, 400, 0), 89: (81, 187, 1), 89: (82, 982, 2), 89: (83, 641, 3), 89: (84, 711, 4), 89: (85, 779, 5), 89: (86, 648, 6), 89: (87, 590, 7), 89: (88, 241, 8), 89: (89, 929, 9), 89: (90, 914, 0), 89: (91, 449, 1), 89: (92, 815, 2), 89: (93, 225, 3), 89: (94, 377, 4), 89: (95, 120, 5), 89: (96, 662, 6), 89: (97, 277, 7), 89: (98, 351, 8), 89: (99, 722, 9); 89: ---- 89: 100 89: 89:
:158 89: select L.colC as colC, L.t1B, L.t2B, R.t3B, R.t4B from 89: ( 89: select t1.colC as colC, t1.colB as t1B, t2.colB as t2B from 89: (select colC, colB from temp_2 where colA > 10 and colA <= 30) t1 89: inner join 89: (select colC, colB from temp_2 where colA > 20 and colA <= 40) t2 89: on t1.colC = t2.colC 89: ) L 89: inner join 89: ( 89: select t3.colC as colC, t3.colB as t3B, t4.colB as t4B from 89: (select colC, colB from temp_2 where colA > 30 and colA <= 50) t3 89: inner join 89: (select colC, colB from temp_2 where colA > 40 and colA <= 60) t4 89: on t3.colC = t4.colC 89: ) R 89: on L.colC = R.colC; 89: Extra checks: ["ensure:hash_join*3"] 89: [PASS] extra check: ensure:hash_join*3 89: --- YOUR RESULT --- 89: 1 878 352 723 949 89: 1 878 352 723 219 89: 1 878 352 949 949 89: 1 878 352 949 219 89: 1 878 723 723 949 89: 1 878 723 723 219 89: 1 878 723 949 949 89: 1 878 723 949 219 89: 2 170 387 666 42 89: 2 170 387 666 276 89: 2 170 387 42 42 89: 2 170 387 42 276 89: 2 170 666 666 42 89: 2 170 666 666 276 89: 2 170 666 42 42 89: 2 170 666 42 276 89: 3 332 598 701 272 89: 3 332 598 701 770 89: 3 332 598 272 272 89: 3 332 598 272 770 89: 3 332 701 701 272 89: 3 332 701 701 770 89: 3 332 701 272 272 89: 3 332 701 272 770 89: 4 680 440 311 975 89: 4 680 440 311 991 89: 4 680 440 975 975 89: 4 680 440 975 991 89: 4 680 311 311 975 89: 4 680 311 311 991 89: 4 680 311 975 975 89: 4 680 311 975 991 89: 5 2 83 214 518 89: 5 2 83 214 390 89: 5 2 83 518 518 89: 5 2 83 518 390 89: 5 2 214 214 518 89: 5 2 214 214 390 89: 5 2 214 518 518 89: 5 2 214 518 390 89: 6 552 57 259 930 89: 6 552 57 259 419 89: 6 552 57 930 930 89: 6 552 57 930 419 89: 6 552 259 259 930 89: 6 552 259 259 419 89: 6 552 259 930 930 89: 6 552 259 930 419 89: 7 561 883 812 399 89: 7 561 883 812 346 89: 7 561 883 399 399 89: 7 561 883 399 346 89: 7 561 812 812 399 89: 7 561 812 812 346 89: 7 561 812 399 399 89: 7 561 812 399 346 89: 8 398 914 194 924 89: 8 398 914 194 898 89: 8 398 914 924 924 89: 8 398 914 924 898 89: 8 398 194 194 924 89: 8 398 194 194 898 89: 8 398 194 924 924 89: 8 398 194 924 898 89: 9 974 538 160 731 89: 9 974 538 160 396 89: 9 974 538 731 731 89: 9 974 538 731 396 89: 9 974 160 160 731 89: 9 974 160 160 396 89: 9 974 160 731 731 89: 9 974 160 731 396 89: 0 739 132 917 8 89: 0 739 132 917 221 89: 0 739 132 8 8 89: 0 739 132 8 221 89: 0 739 917 917 8 89: 0 739 917 917 221 89: 0 739 917 8 8 89: 0 739 917 8 221 89: 1 352 352 723 949 89: 1 352 352 723 219 89: 1 352 352 949 949 89: 1 352 352 949 219 89: 1 352 723 723 949 89: 1 352 723 723 219 89: 1 352 723 949 949 89: 1 352 723 949 219 89: 2 387 387 666 42 89: 2 387 387 666 276 89: 2 387 387 42 42 89: 2 387 387 42 276 89: 2 387 666 666 42 89: 2 387 666 666 276 89: 2 387 666 42 42 89: 2 387 666 42 276 89: 3 598 598 701 272 89: 3 598 598 701 770 89: 3 598 598 272 272 89: 3 598 598 272 770 89: 3 598 701 701 272 89: 3 598 701 701 770 89: 3 598 701 272 272 89: 3 598 701 272 770 89: 4 440 440 311 975 89: 4 440 440 311 991 89: 4 440 440 975 975 89: 4 440 440 975 991 89: 4 440 311 311 975 89: 4 440 311 311 991 89: 4 440 311 975 975 89: 4 440 311 975 991 89: 5 83 83 214 518 89: 5 83 83 214 390 89: 5 83 83 518 518 89: 5 83 83 518 390 89: 5 83 214 214 518 89: 5 83 214 214 390 89: 5 83 214 518 518 89: 5 83 214 518 390 89: 6 57 57 259 930 89: 6 57 57 259 419 89: 6 57 57 930 930 89: 6 57 57 930 419 89: 6 57 259 259 930 89: 6 57 259 259 419 89: 6 57 259 930 930 89: 6 57 259 930 419 89: 7 883 883 812 399 89: 7 883 883 812 346 89: 7 883 883 399 399 89: 7 883 883 399 346 89: 7 883 812 812 399 89: 7 883 812 812 346 89: 7 883 812 399 399 89: 7 883 812 399 346 89: 8 914 914 194 924 89: 8 914 914 194 898 89: 8 914 914 924 924 89: 8 914 914 924 898 89: 8 914 194 194 924 89: 8 914 194 194 898 89: 8 914 194 924 924 89: 8 914 194 924 898 89: 9 538 538 160 731 89: 9 538 538 160 396 89: 9 538 538 731 731 89: 9 538 538 731 396 89: 9 538 160 160 731 89: 9 538 160 160 396 89: 9 538 160 731 731 89: 9 538 160 731 396 89: 0 132 132 917 8 89: 0 132 132 917 221 89: 0 132 132 8 8 89: 0 132 132 8 221 89: 0 132 917 917 8 89: 0 132 917 917 221 89: 0 132 917 8 8 89: 0 132 917 8 221 89: 89: --- EXPECTED RESULT --- 89: 1 878 352 723 949 89: 1 878 352 723 219 89: 1 878 352 949 949 89: 1 878 352 949 219 89: 1 878 723 723 949 89: 1 878 723 723 219 89: 1 878 723 949 949 89: 1 878 723 949 219 89: 2 170 387 666 42 89: 2 170 387 666 276 89: 2 170 387 42 42 89: 2 170 387 42 276 89: 2 170 666 666 42 89: 2 170 666 666 276 89: 2 170 666 42 42 89: 2 170 666 42 276 89: 3 332 598 701 272 89: 3 332 598 701 770 89: 3 332 598 272 272 89: 3 332 598 272 770 89: 3 332 701 701 272 89: 3 332 701 701 770 89: 3 332 701 272 272 89: 3 332 701 272 770 89: 4 680 440 311 975 89: 4 680 440 311 991 89: 4 680 440 975 975 89: 4 680 440 975 991 89: 4 680 311 311 975 89: 4 680 311 311 991 89: 4 680 311 975 975 89: 4 680 311 975 991 89: 5 2 83 214 518 89: 5 2 83 214 390 89: 5 2 83 518 518 89: 5 2 83 518 390 89: 5 2 214 214 518 89: 5 2 214 214 390 89: 5 2 214 518 518 89: 5 2 214 518 390 89: 6 552 57 259 930 89: 6 552 57 259 419 89: 6 552 57 930 930 89: 6 552 57 930 419 89: 6 552 259 259 930 89: 6 552 259 259 419 89: 6 552 259 930 930 89: 6 552 259 930 419 89: 7 561 883 812 399 89: 7 561 883 812 346 89: 7 561 883 399 399 89: 7 561 883 399 346 89: 7 561 812 812 399 89: 7 561 812 812 346 89: 7 561 812 399 399 89: 7 561 812 399 346 89: 8 398 914 194 924 89: 8 398 914 194 898 89: 8 398 914 924 924 89: 8 398 914 924 898 89: 8 398 194 194 924 89: 8 398 194 194 898 89: 8 398 194 924 924 89: 8 398 194 924 898 89: 9 974 538 160 731 89: 9 974 538 160 396 89: 9 974 538 731 731 89: 9 974 538 731 396 89: 9 974 160 160 731 89: 9 974 160 160 396 89: 9 974 160 731 731 89: 9 974 160 731 396 89: 0 739 132 917 8 89: 0 739 132 917 221 89: 0 739 132 8 8 89: 0 739 132 8 221 89: 0 739 917 917 8 89: 0 739 917 917 221 89: 0 739 917 8 8 89: 0 739 917 8 221 89: 1 352 352 723 949 89: 1 352 352 723 219 89: 1 352 352 949 949 89: 1 352 352 949 219 89: 1 352 723 723 949 89: 1 352 723 723 219 89: 1 352 723 949 949 89: 1 352 723 949 219 89: 2 387 387 666 42 89: 2 387 387 666 276 89: 2 387 387 42 42 89: 2 387 387 42 276 89: 2 387 666 666 42 89: 2 387 666 666 276 89: 2 387 666 42 42 89: 2 387 666 42 276 89: 3 598 598 701 272 89: 3 598 598 701 770 89: 3 598 598 272 272 89: 3 598 598 272 770 89: 3 598 701 701 272 89: 3 598 701 701 770 89: 3 598 701 272 272 89: 3 598 701 272 770 89: 4 440 440 311 975 89: 4 440 440 311 991 89: 4 440 440 975 975 89: 4 440 440 975 991 89: 4 440 311 311 975 89: 4 440 311 311 991 89: 4 440 311 975 975 89: 4 440 311 975 991 89: 5 83 83 214 518 89: 5 83 83 214 390 89: 5 83 83 518 518 89: 5 83 83 518 390 89: 5 83 214 214 518 89: 5 83 214 214 390 89: 5 83 214 518 518 89: 5 83 214 518 390 89: 6 57 57 259 930 89: 6 57 57 259 419 89: 6 57 57 930 930 89: 6 57 57 930 419 89: 6 57 259 259 930 89: 6 57 259 259 419 89: 6 57 259 930 930 89: 6 57 259 930 419 89: 7 883 883 812 399 89: 7 883 883 812 346 89: 7 883 883 399 399 89: 7 883 883 399 346 89: 7 883 812 812 399 89: 7 883 812 812 346 89: 7 883 812 399 399 89: 7 883 812 399 346 89: 8 914 914 194 924 89: 8 914 914 194 898 89: 8 914 914 924 924 89: 8 914 914 924 898 89: 8 914 194 194 924 89: 8 914 194 194 898 89: 8 914 194 924 924 89: 8 914 194 924 898 89: 9 538 538 160 731 89: 9 538 538 160 396 89: 9 538 538 731 731 89: 9 538 538 731 396 89: 9 538 160 160 731 89: 9 538 160 160 396 89: 9 538 160 731 731 89: 9 538 160 731 396 89: 0 132 132 917 8 89: 0 132 132 917 221 89: 0 132 132 8 8 89: 0 132 132 8 221 89: 0 132 917 917 8 89: 0 132 917 917 221 89: 0 132 917 8 8 89: 0 132 917 8 221 89: 89:
:338 89: create table t2(v1 int); insert into t2 values (1), (1), (2); 89: ---- 89: Table created with id = 34 89: 3 89: 89:
:341 89: create table t3(v1 int); insert into t3 values (1), (2), (3); 89: ---- 89: Table created with id = 35 89: 3 89: 89:
:344 89: create table t4(v1 int); insert into t4 values (2), (3), (3); 89: ---- 89: Table created with id = 36 89: 3 89: 89:
:347 89: select * from t3 left join t2 on t2.v1 = t3.v1; 89: Extra checks: ["ensure:hash_join"] 89: [PASS] extra check: ensure:hash_join 89: --- YOUR RESULT --- 89: 1 1 89: 1 1 89: 2 2 89: 3 integer_null 89: 89: --- EXPECTED RESULT --- 89: 1 1 89: 1 1 89: 2 2 89: 3 integer_null 89: 89:
:355 89: select * from (t3 left join t2 on t2.v1 = t3.v1) left join t4 on t3.v1 = t4.v1; 89: Extra checks: ["ensure:hash_join*2"] 89: [PASS] extra check: ensure:hash_join*2 89: --- YOUR RESULT --- 89: 1 1 integer_null 89: 1 1 integer_null 89: 2 2 2 89: 3 integer_null 3 89: 3 integer_null 3 89: 89: --- EXPECTED RESULT --- 89: 1 1 integer_null 89: 1 1 integer_null 89: 2 2 2 89: 3 integer_null 3 89: 3 integer_null 3 89: 15/19 Test #89: SQLLogicTest.p3.15-multi-way-hash-join ... Passed 0.37 sec test 90 Start 90: SQLLogicTest.p3.16-sort-limit 90: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.16-sort-limit.slt" "--verbose" "-d" "--in-memory" 90: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 90: Test timeout computed to be: 10000000 90:
:6 90: select * from __mock_table_1 order by colB desc limit 10; 90: --- YOUR RESULT --- 90: 99 9900 90: 98 9800 90: 97 9700 90: 96 9600 90: 95 9500 90: 94 9400 90: 93 9300 90: 92 9200 90: 91 9100 90: 90 9000 90: 90: --- EXPECTED RESULT --- 90: 99 9900 90: 98 9800 90: 97 9700 90: 96 9600 90: 95 9500 90: 94 9400 90: 93 9300 90: 92 9200 90: 91 9100 90: 90 9000 90: 90:
:22 90: select * from test_simple_seq_2 limit 5; 90: --- YOUR RESULT --- 90: 0 10 90: 1 11 90: 2 12 90: 3 13 90: 4 14 90: 90: --- EXPECTED RESULT --- 90: 0 10 90: 1 11 90: 2 12 90: 3 13 90: 4 14 90: 90:
:32 90: select * from test_simple_seq_2 limit 15; 90: --- YOUR RESULT --- 90: 0 10 90: 1 11 90: 2 12 90: 3 13 90: 4 14 90: 5 15 90: 6 16 90: 7 17 90: 8 18 90: 9 19 90: 90: --- EXPECTED RESULT --- 90: 0 10 90: 1 11 90: 2 12 90: 3 13 90: 4 14 90: 5 15 90: 6 16 90: 7 17 90: 8 18 90: 9 19 90: 90:
:49 90: create table temp_1(col1 int, col2 int, col3 int, col4 int, col5 int, col6 int, col7 int, col8 int); 90: ---- 90: Table created with id = 32 90: 90:
:53 90: select * from temp_1 order by col1; 90: --- YOUR RESULT --- 90: 90: --- EXPECTED RESULT --- 90: 90:
:59 90: select * from __mock_table_tas_2025_fall order by github_id limit 5; 90: --- YOUR RESULT --- 90: 17zhangw Tuesday 90: MrWhitezz Wednesday 90: notSaranshMalik Friday 90: quantumish Monday 90: rayhhome Friday 90: 90: --- EXPECTED RESULT --- 90: 17zhangw Tuesday 90: MrWhitezz Wednesday 90: notSaranshMalik Friday 90: quantumish Monday 90: rayhhome Friday 90: 90:
:68 90: select * from __mock_table_4 order by colH limit 3; 90: --- YOUR RESULT --- 90: integer_null varlen_null 90: integer_null varlen_null 90: integer_null varlen_null 90: 90: --- EXPECTED RESULT --- 90: integer_null varlen_null 90: integer_null varlen_null 90: integer_null varlen_null 90: 90:
:75 90: select * from __mock_table_4 order by colH desc, colG asc limit 3; 90: --- YOUR RESULT --- 90: integer_null 💩💩💩 90: integer_null 💩💩💩 90: integer_null 💩💩💩 90: 90: --- EXPECTED RESULT --- 90: integer_null 💩💩💩 90: integer_null 💩💩💩 90: integer_null 💩💩💩 90: 90:
:82 90: select * from __mock_table_4 order by colG desc nulls first, colH nulls last limit 3; 90: --- YOUR RESULT --- 90: integer_null 💩 90: integer_null 💩 90: integer_null 💩 90: 90: --- EXPECTED RESULT --- 90: integer_null 💩 90: integer_null 💩 90: integer_null 💩 90: 90:
:89 90: select * from __mock_table_4 order by colG asc nulls last, colH limit 3; 90: --- YOUR RESULT --- 90: 1 💩 90: 1 💩 90: 1 💩 90: 90: --- EXPECTED RESULT --- 90: 1 💩 90: 1 💩 90: 1 💩 90: 90:
:96 90: insert into temp_1 values 90: (196, 9, 79, 147, 766, 65018, 580420, 3460119), 90: (96, 9, 73, 674, 5266, 132, 141779, 9085955), 90: (5, 3, 21, 251, 2419, 4040, 454689, 8904729), 90: (87, 7, 29, 129, 5132, 30303, 378736, 2741233), 90: (18, 8, 10, 508, 1933, 54020, 125384, 813451), 90: (75, 2, 41, 901, 593, 14227, 586302, 462945), 90: (111, 3, 44, 700, 2024, 61402, 787437, 3015027), 90: (39, 9, 84, 243, 4208, 14273, 384043, 1263705), 90: (128, 6, 93, 735, 3749, 87702, 353590, 4995735), 90: (41, 7, 67, 859, 1630, 8890, 346654, 2642419), 90: (33, 2, 95, 120, 2284, 20382, 656992, 8703768), 90: (124, 8, 69, 351, 4670, 77529, 139759, 8776939), 90: (183, 5, 32, 390, 8718, 36152, 686749, 8919342), 90: (91, 3, 1, 613, 2964, 87648, 509069, 7536978), 90: (166, 8, 47, 552, 6515, 66148, 324278, 1957978), 90: (107, 3, 1, 594, 267, 7803, 11909, 366568), 90: (31, 0, 51, 921, 5840, 48429, 328862, 5960441), 90: (148, 0, 66, 139, 2130, 78439, 204429, 1286350), 90: (185, 9, 84, 831, 7327, 14708, 5597, 5096306), 90: (100, 3, 56, 856, 1409, 5704, 921859, 8296737), 90: (97, 1, 97, 644, 9674, 48009, 704186, 3668180), 90: (160, 8, 70, 571, 7936, 22902, 603269, 8680300), 90: (32, 9, 13, 285, 3097, 3996, 395731, 7687792), 90: (48, 8, 58, 516, 1321, 9104, 689086, 7547836), 90: (13, 7, 37, 597, 9695, 79132, 5913, 2729103), 90: (51, 2, 85, 748, 2277, 90946, 543930, 5704145), 90: (16, 7, 75, 814, 6433, 96606, 487369, 179266), 90: (131, 0, 95, 665, 6705, 68624, 389457, 1055001), 90: (110, 7, 94, 979, 7019, 26419, 268566, 9668807), 90: (108, 3, 1, 410, 6820, 33364, 580756, 1818944), 90: (156, 3, 48, 886, 4471, 7582, 242036, 5518578), 90: (14, 7, 84, 815, 9372, 76305, 936436, 5246864), 90: (168, 8, 7, 851, 2023, 46784, 687310, 4103789), 90: (158, 4, 58, 294, 2711, 93255, 610740, 3917117), 90: (176, 8, 34, 636, 7301, 47976, 569899, 9218292), 90: (189, 7, 13, 452, 8596, 94212, 682893, 9647479), 90: (151, 7, 94, 410, 6233, 91520, 940819, 7230491), 90: (102, 2, 72, 523, 4379, 94749, 544165, 348734), 90: (147, 6, 67, 708, 8020, 54656, 211346, 5425761), 90: (146, 6, 4, 393, 6835, 88911, 568402, 4590957), 90: (95, 0, 92, 180, 2635, 80737, 619176, 4947590), 90: (98, 2, 84, 36, 5383, 54686, 90558, 3135289), 90: (43, 2, 88, 577, 7009, 64800, 507828, 5295211), 90: (191, 3, 51, 117, 3103, 67268, 135031, 8950927), 90: (187, 1, 93, 803, 6104, 99815, 684391, 5519665), 90: (12, 5, 43, 767, 7501, 9636, 83576, 5070120), 90: (58, 4, 89, 871, 5347, 63473, 89035, 2890030), 90: (49, 1, 46, 286, 9426, 40720, 93086, 9399852), 90: (171, 1, 61, 381, 3526, 41471, 34075, 9185441), 90: (71, 0, 29, 448, 3800, 82369, 975429, 3874917), 90: (188, 1, 61, 916, 4058, 39604, 405586, 891694), 90: (133, 9, 66, 345, 4546, 17571, 408146, 8155891), 90: (80, 5, 48, 401, 6773, 66298, 835516, 5003483), 90: (65, 7, 46, 226, 4705, 84312, 973089, 4319545), 90: (132, 0, 44, 923, 7435, 1345, 783426, 5120786), 90: (55, 3, 99, 134, 63, 13196, 284220, 1931990), 90: (21, 3, 67, 366, 5218, 35569, 603781, 7963823), 90: (64, 3, 18, 562, 124, 82284, 413419, 7469541), 90: (115, 2, 57, 1, 2533, 10526, 806424, 6735507), 90: (86, 1, 72, 47, 1864, 37709, 250122, 7133555), 90: (165, 4, 80, 442, 2490, 73021, 924437, 7821936), 90: (59, 5, 90, 876, 4518, 71072, 16420, 6697862), 90: (123, 3, 92, 951, 9769, 96069, 331647, 2019560), 90: (19, 7, 8, 866, 3594, 59865, 860895, 1147124), 90: (37, 9, 44, 896, 6733, 59844, 347449, 4470115), 90: (145, 3, 21, 711, 223, 65113, 247776, 6286926), 90: (109, 5, 74, 631, 1617, 52223, 48765, 6012052), 90: (89, 2, 31, 525, 9975, 21923, 618183, 3074793), 90: (30, 8, 54, 165, 8934, 10717, 200689, 8326241), 90: (135, 0, 31, 533, 4479, 43225, 675685, 4584830), 90: (142, 8, 97, 665, 9823, 46844, 383619, 6444628), 90: (159, 5, 10, 347, 4333, 81149, 467131, 3495302), 90: (93, 4, 45, 49, 4327, 54773, 50210, 4033852), 90: (52, 6, 91, 411, 3138, 55061, 585468, 5056821), 90: (154, 6, 81, 983, 4486, 77159, 833103, 4968465), 90: (67, 3, 70, 226, 2823, 80004, 895654, 437490), 90: (60, 3, 61, 587, 3633, 53753, 972672, 9199994), 90: (155, 4, 62, 858, 1135, 34382, 494514, 2959301), 90: (61, 0, 21, 22, 5642, 21864, 313078, 9305193), 90: (24, 3, 74, 425, 117, 3468, 896998, 9109877), 90: (140, 1, 71, 21, 2828, 94610, 12838, 1212582), 90: (57, 5, 7, 617, 2743, 70578, 773995, 2744737), 90: (112, 8, 60, 77, 6057, 41809, 524022, 7077061), 90: (105, 5, 54, 290, 2563, 96935, 232157, 4499459), 90: (179, 7, 36, 79, 9115, 60534, 741330, 5927650), 90: (82, 4, 91, 302, 1292, 75026, 888084, 8742272), 90: (35, 3, 95, 13, 8753, 92210, 671499, 5205336), 90: (172, 9, 22, 546, 8088, 89284, 964185, 39966), 90: (198, 0, 99, 778, 1528, 52316, 726477, 8219397), 90: (121, 7, 81, 746, 3116, 71628, 235086, 5966098), 90: (77, 7, 89, 732, 5803, 94659, 898745, 7829986), 90: (73, 1, 27, 586, 1410, 43828, 466258, 1943103), 90: (0, 8, 5, 561, 9989, 87361, 494821, 5840702), 90: (162, 1, 42, 929, 9622, 39856, 518843, 9852745), 90: (116, 8, 77, 963, 5488, 30956, 928245, 7855578), 90: (68, 5, 52, 373, 1322, 7952, 755240, 4880763), 90: (120, 7, 16, 168, 6744, 9691, 204061, 4253805), 90: (23, 4, 5, 322, 7775, 4410, 961809, 3225009), 90: (1, 2, 31, 422, 4453, 7210, 206335, 2045026), 90: (137, 5, 1, 930, 6654, 83304, 304305, 9773858), 90: (186, 9, 78, 888, 7407, 52027, 924097, 8606329), 90: (53, 9, 42, 211, 9846, 61097, 684453, 4213854), 90: (169, 3, 81, 659, 3459, 2353, 207646, 9481338), 90: (9, 5, 93, 106, 5472, 88331, 755124, 9894953), 90: (177, 3, 37, 238, 8807, 29443, 358235, 7280614), 90: (7, 8, 11, 154, 8374, 74676, 497239, 7923921), 90: (27, 7, 8, 887, 4592, 68130, 997285, 8035102), 90: (193, 8, 65, 708, 9371, 99964, 37220, 3893300), 90: (126, 0, 98, 644, 8145, 5131, 900228, 86417), 90: (79, 9, 28, 823, 8590, 23300, 806801, 9298308), 90: (180, 4, 69, 230, 9161, 43700, 738588, 1671536), 90: (136, 9, 75, 565, 8630, 41623, 545551, 2020603), 90: (101, 5, 6, 338, 8983, 58203, 57330, 5788803), 90: (182, 6, 82, 244, 9558, 66182, 418917, 2008979), 90: (40, 4, 34, 178, 825, 60242, 621162, 8616326), 90: (84, 4, 47, 877, 3953, 83544, 622038, 4004697), 90: (106, 2, 40, 476, 1509, 76746, 787497, 5191618), 90: (90, 2, 96, 640, 8200, 91418, 944866, 8362182), 90: (143, 5, 34, 710, 1025, 13597, 292787, 1136995), 90: (10, 0, 97, 333, 1746, 98384, 770109, 7276590), 90: (22, 9, 4, 171, 8343, 36077, 87048, 4103074), 90: (125, 8, 37, 430, 8820, 88328, 137510, 2536831), 90: (167, 8, 36, 72, 6461, 4563, 892235, 4323669), 90: (88, 5, 21, 684, 6242, 16628, 688491, 2852785), 90: (127, 6, 94, 235, 9482, 23290, 494525, 32445), 90: (42, 6, 39, 379, 5631, 51474, 506563, 4082086), 90: (144, 5, 92, 158, 1891, 4846, 127501, 5091868), 90: (66, 8, 59, 388, 2509, 7229, 450773, 4992666), 90: (34, 7, 79, 669, 902, 89891, 435911, 1840339), 90: (81, 4, 4, 967, 1170, 92808, 244868, 6029276), 90: (25, 8, 35, 868, 8059, 52702, 124611, 2869517), 90: (175, 6, 71, 776, 4998, 92846, 340124, 915006), 90: (36, 1, 7, 485, 7138, 35984, 339740, 4215732), 90: (74, 7, 64, 386, 121, 77691, 547614, 3943836), 90: (3, 7, 23, 305, 3878, 93485, 43156, 3921438), 90: (129, 7, 59, 139, 2438, 98470, 904917, 7754852), 90: (149, 0, 52, 326, 7765, 24531, 959352, 7732143), 90: (163, 1, 68, 950, 8610, 35696, 579122, 3084354), 90: (153, 3, 68, 463, 5311, 94011, 82294, 1015581), 90: (11, 2, 76, 69, 8076, 81619, 312257, 1930656), 90: (46, 6, 9, 116, 5967, 41769, 283685, 4522930), 90: (161, 0, 63, 491, 2590, 14553, 151667, 1239028), 90: (152, 7, 66, 282, 4766, 22709, 526711, 7306101), 90: (170, 8, 55, 672, 3974, 45487, 823761, 428878), 90: (72, 2, 70, 903, 1712, 21708, 203630, 8093216), 90: (85, 4, 80, 75, 2539, 68936, 828987, 2365244), 90: (141, 6, 22, 289, 627, 56493, 111716, 2475428), 90: (99, 7, 11, 724, 3662, 46405, 260985, 6094229), 90: (17, 3, 8, 218, 7079, 29335, 522580, 1393348), 90: (138, 7, 44, 600, 8991, 26953, 187679, 2491217), 90: (114, 8, 32, 275, 6183, 44193, 380432, 1910962), 90: (173, 0, 83, 100, 3367, 16621, 640206, 2773136), 90: (50, 3, 46, 494, 6676, 50513, 230812, 8717166), 90: (139, 4, 84, 497, 7487, 66828, 809011, 3037040), 90: (150, 2, 98, 560, 6491, 73299, 766200, 2561789), 90: (54, 1, 92, 136, 7375, 1615, 874417, 8532832), 90: (62, 1, 52, 175, 7240, 70387, 28071, 3546585), 90: (92, 2, 86, 754, 8935, 77526, 810276, 1884535), 90: (194, 9, 84, 887, 8293, 57428, 13305, 4166625), 90: (117, 6, 55, 784, 4148, 32330, 182024, 9606542), 90: (104, 4, 74, 29, 8701, 73679, 99074, 6267512), 90: (63, 4, 4, 198, 9352, 99004, 734374, 7638195), 90: (118, 5, 61, 18, 6558, 77494, 823400, 7540500), 90: (83, 1, 1, 314, 128, 50974, 855262, 5617222), 90: (70, 9, 7, 631, 2287, 35350, 4649, 1123333), 90: (130, 3, 92, 678, 4290, 33394, 223241, 3461293), 90: (199, 9, 11, 91, 6896, 94319, 527602, 8222281), 90: (26, 1, 37, 126, 7323, 60028, 910446, 8299621), 90: (184, 1, 27, 665, 2372, 30282, 203725, 5814793), 90: (122, 9, 77, 585, 7558, 32215, 911472, 837405), 90: (44, 9, 19, 200, 2545, 70842, 89745, 3435765), 90: (103, 7, 93, 707, 2350, 18066, 780695, 5926799), 90: (78, 2, 36, 499, 7838, 6035, 419854, 6093766), 90: (94, 8, 58, 110, 4757, 42114, 598073, 9891358), 90: (134, 2, 25, 346, 9990, 97041, 996353, 6604388), 90: (195, 2, 47, 637, 2139, 66667, 317043, 4354233), 90: (56, 4, 8, 440, 7097, 29112, 428581, 405846), 90: (157, 6, 67, 789, 572, 52215, 294088, 3587193), 90: (20, 6, 88, 209, 7012, 96205, 849891, 8671682), 90: (28, 8, 92, 585, 2310, 41334, 545418, 1334792), 90: (4, 5, 2, 755, 2853, 34184, 414444, 171994), 90: (181, 3, 85, 915, 8122, 62571, 639142, 8752584), 90: (119, 5, 14, 618, 8072, 40581, 76034, 7244977), 90: (197, 9, 99, 623, 6246, 23617, 514078, 8376894), 90: (8, 0, 99, 699, 3253, 88194, 522672, 7341468), 90: (2, 9, 39, 499, 7022, 86936, 848301, 746939), 90: (192, 6, 74, 653, 2599, 52200, 760612, 7420299), 90: (190, 6, 44, 51, 184, 43594, 329767, 9381954), 90: (178, 0, 33, 773, 5278, 44429, 452382, 7142150), 90: (164, 5, 80, 615, 4826, 89334, 216827, 6267318), 90: (15, 4, 99, 43, 7336, 18702, 932476, 4751240), 90: (76, 3, 27, 181, 1112, 30392, 427843, 6401112), 90: (47, 7, 78, 119, 9233, 17182, 72665, 1921751), 90: (6, 8, 91, 259, 9318, 22573, 724639, 9856469), 90: (174, 7, 38, 163, 6614, 6389, 215981, 5410513), 90: (113, 5, 70, 719, 9300, 57448, 47709, 9456206), 90: (69, 7, 21, 434, 5673, 85399, 354546, 2362967), 90: (45, 4, 71, 397, 3677, 2556, 316835, 5636529), 90: (38, 1, 93, 307, 8805, 38987, 956976, 7329265), 90: (29, 1, 73, 173, 3972, 18059, 968740, 9895271); 90: ---- 90: 200 90: 90:
:300 90: create table temp_2(col1 int, col2 int, col3 int); 90: ---- 90: Table created with id = 33 90: 90:
:303 90: insert into temp_2 values 90: (5, 290, 5), 90: (6, 592, 6), 90: (0, 142, 0), 90: (1, 993, 1), 90: (2, 837, 2), 90: (3, 380, 3), 90: (4, 240, 4), 90: (7, 88 , 7), 90: (8, 194, 8), 90: (9, 638, 9), 90: (10, 290, 0), 90: (11, 878, 1), 90: (12, 170, 2), 90: (13, 332, 3), 90: (14, 680, 4), 90: (15, 2, 5), 90: (16, 552, 6), 90: (17, 561, 7), 90: (18, 398, 8), 90: (19, 974, 9), 90: (20, 739, 0), 90: (21, 352, 1), 90: (53, 770, 3), 90: (39, 160, 9), 90: (40, 917, 0), 90: (41, 949, 1), 90: (36, 259, 6), 90: (37, 812, 7), 90: (38, 194, 8), 90: (47, 399, 7), 90: (48, 924, 8), 90: (49, 731, 9), 90: (50, 8 , 0), 90: (51, 219, 1), 90: (52, 276, 2), 90: (55, 390, 5), 90: (56, 419, 6), 90: (57, 346, 7), 90: (58, 898, 8), 90: (59, 396, 9), 90: (60, 221, 0), 90: (61, 208, 1), 90: (84, 711, 4), 90: (85, 779, 5), 90: (86, 648, 6), 90: (87, 590, 7), 90: (88, 241, 8), 90: (89, 929, 9), 90: (90, 914, 0), 90: (91, 449, 1), 90: (92, 815, 2), 90: (93, 225, 3), 90: (54, 991, 4), 90: (22, 387, 2), 90: (23, 598, 3), 90: (24, 440, 4), 90: (25, 83, 5), 90: (26, 57, 6), 90: (27, 883, 7), 90: (28, 914, 8), 90: (29, 538, 9), 90: (30, 132, 0), 90: (31, 723, 1), 90: (62, 934, 2), 90: (63, 510, 3), 90: (64, 147, 4), 90: (65, 156, 5), 90: (66, 529, 6), 90: (67, 86 , 7), 90: (68, 384, 8), 90: (69, 603, 9), 90: (70, 107, 0), 90: (71, 867, 1), 90: (42, 42 , 2), 90: (43, 272, 3), 90: (44, 975, 4), 90: (45, 518, 5), 90: (46, 930, 6), 90: (79, 125, 9), 90: (80, 400, 0), 90: (81, 187, 1), 90: (82, 982, 2), 90: (83, 641, 3), 90: (94, 377, 4), 90: (95, 120, 5), 90: (96, 662, 6), 90: (97, 277, 7), 90: (98, 351, 8), 90: (32, 666, 2), 90: (33, 701, 3), 90: (34, 311, 4), 90: (35, 214, 5), 90: (72, 253, 2), 90: (73, 782, 3), 90: (74, 124, 4), 90: (75, 879, 5), 90: (76, 34 , 6), 90: (77, 143, 7), 90: (78, 494, 8), 90: (99, 722, 9); 90: ---- 90: 100 90: 90:
:406 90: select col2, col4, col1, col3, col5, col6, col7, col8 from temp_1 order by col2 desc, col4, col1 desc limit 50; 90: --- YOUR RESULT --- 90: 9 91 199 11 6896 94319 527602 8222281 90: 9 147 196 79 766 65018 580420 3460119 90: 9 171 22 4 8343 36077 87048 4103074 90: 9 200 44 19 2545 70842 89745 3435765 90: 9 211 53 42 9846 61097 684453 4213854 90: 9 243 39 84 4208 14273 384043 1263705 90: 9 285 32 13 3097 3996 395731 7687792 90: 9 345 133 66 4546 17571 408146 8155891 90: 9 499 2 39 7022 86936 848301 746939 90: 9 546 172 22 8088 89284 964185 39966 90: 9 565 136 75 8630 41623 545551 2020603 90: 9 585 122 77 7558 32215 911472 837405 90: 9 623 197 99 6246 23617 514078 8376894 90: 9 631 70 7 2287 35350 4649 1123333 90: 9 674 96 73 5266 132 141779 9085955 90: 9 823 79 28 8590 23300 806801 9298308 90: 9 831 185 84 7327 14708 5597 5096306 90: 9 887 194 84 8293 57428 13305 4166625 90: 9 888 186 78 7407 52027 924097 8606329 90: 9 896 37 44 6733 59844 347449 4470115 90: 8 72 167 36 6461 4563 892235 4323669 90: 8 77 112 60 6057 41809 524022 7077061 90: 8 110 94 58 4757 42114 598073 9891358 90: 8 154 7 11 8374 74676 497239 7923921 90: 8 165 30 54 8934 10717 200689 8326241 90: 8 259 6 91 9318 22573 724639 9856469 90: 8 275 114 32 6183 44193 380432 1910962 90: 8 351 124 69 4670 77529 139759 8776939 90: 8 388 66 59 2509 7229 450773 4992666 90: 8 430 125 37 8820 88328 137510 2536831 90: 8 508 18 10 1933 54020 125384 813451 90: 8 516 48 58 1321 9104 689086 7547836 90: 8 552 166 47 6515 66148 324278 1957978 90: 8 561 0 5 9989 87361 494821 5840702 90: 8 571 160 70 7936 22902 603269 8680300 90: 8 585 28 92 2310 41334 545418 1334792 90: 8 636 176 34 7301 47976 569899 9218292 90: 8 665 142 97 9823 46844 383619 6444628 90: 8 672 170 55 3974 45487 823761 428878 90: 8 708 193 65 9371 99964 37220 3893300 90: 8 851 168 7 2023 46784 687310 4103789 90: 8 868 25 35 8059 52702 124611 2869517 90: 8 963 116 77 5488 30956 928245 7855578 90: 7 79 179 36 9115 60534 741330 5927650 90: 7 119 47 78 9233 17182 72665 1921751 90: 7 129 87 29 5132 30303 378736 2741233 90: 7 139 129 59 2438 98470 904917 7754852 90: 7 163 174 38 6614 6389 215981 5410513 90: 7 168 120 16 6744 9691 204061 4253805 90: 7 226 65 46 4705 84312 973089 4319545 90: 90: --- EXPECTED RESULT --- 90: 9 91 199 11 6896 94319 527602 8222281 90: 9 147 196 79 766 65018 580420 3460119 90: 9 171 22 4 8343 36077 87048 4103074 90: 9 200 44 19 2545 70842 89745 3435765 90: 9 211 53 42 9846 61097 684453 4213854 90: 9 243 39 84 4208 14273 384043 1263705 90: 9 285 32 13 3097 3996 395731 7687792 90: 9 345 133 66 4546 17571 408146 8155891 90: 9 499 2 39 7022 86936 848301 746939 90: 9 546 172 22 8088 89284 964185 39966 90: 9 565 136 75 8630 41623 545551 2020603 90: 9 585 122 77 7558 32215 911472 837405 90: 9 623 197 99 6246 23617 514078 8376894 90: 9 631 70 7 2287 35350 4649 1123333 90: 9 674 96 73 5266 132 141779 9085955 90: 9 823 79 28 8590 23300 806801 9298308 90: 9 831 185 84 7327 14708 5597 5096306 90: 9 887 194 84 8293 57428 13305 4166625 90: 9 888 186 78 7407 52027 924097 8606329 90: 9 896 37 44 6733 59844 347449 4470115 90: 8 72 167 36 6461 4563 892235 4323669 90: 8 77 112 60 6057 41809 524022 7077061 90: 8 110 94 58 4757 42114 598073 9891358 90: 8 154 7 11 8374 74676 497239 7923921 90: 8 165 30 54 8934 10717 200689 8326241 90: 8 259 6 91 9318 22573 724639 9856469 90: 8 275 114 32 6183 44193 380432 1910962 90: 8 351 124 69 4670 77529 139759 8776939 90: 8 388 66 59 2509 7229 450773 4992666 90: 8 430 125 37 8820 88328 137510 2536831 90: 8 508 18 10 1933 54020 125384 813451 90: 8 516 48 58 1321 9104 689086 7547836 90: 8 552 166 47 6515 66148 324278 1957978 90: 8 561 0 5 9989 87361 494821 5840702 90: 8 571 160 70 7936 22902 603269 8680300 90: 8 585 28 92 2310 41334 545418 1334792 90: 8 636 176 34 7301 47976 569899 9218292 90: 8 665 142 97 9823 46844 383619 6444628 90: 8 672 170 55 3974 45487 823761 428878 90: 8 708 193 65 9371 99964 37220 3893300 90: 8 851 168 7 2023 46784 687310 4103789 90: 8 868 25 35 8059 52702 124611 2869517 90: 8 963 116 77 5488 30956 928245 7855578 90: 7 79 179 36 9115 60534 741330 5927650 90: 7 119 47 78 9233 17182 72665 1921751 90: 7 129 87 29 5132 30303 378736 2741233 90: 7 139 129 59 2438 98470 904917 7754852 90: 7 163 174 38 6614 6389 215981 5410513 90: 7 168 120 16 6744 9691 204061 4253805 90: 7 226 65 46 4705 84312 973089 4319545 90: 90:
:462 90: select * from temp_1 order by col2 desc, col1 + col4 - col1 desc, col1 asc limit 30; 90: --- YOUR RESULT --- 90: 37 9 44 896 6733 59844 347449 4470115 90: 186 9 78 888 7407 52027 924097 8606329 90: 194 9 84 887 8293 57428 13305 4166625 90: 185 9 84 831 7327 14708 5597 5096306 90: 79 9 28 823 8590 23300 806801 9298308 90: 96 9 73 674 5266 132 141779 9085955 90: 70 9 7 631 2287 35350 4649 1123333 90: 197 9 99 623 6246 23617 514078 8376894 90: 122 9 77 585 7558 32215 911472 837405 90: 136 9 75 565 8630 41623 545551 2020603 90: 172 9 22 546 8088 89284 964185 39966 90: 2 9 39 499 7022 86936 848301 746939 90: 133 9 66 345 4546 17571 408146 8155891 90: 32 9 13 285 3097 3996 395731 7687792 90: 39 9 84 243 4208 14273 384043 1263705 90: 53 9 42 211 9846 61097 684453 4213854 90: 44 9 19 200 2545 70842 89745 3435765 90: 22 9 4 171 8343 36077 87048 4103074 90: 196 9 79 147 766 65018 580420 3460119 90: 199 9 11 91 6896 94319 527602 8222281 90: 116 8 77 963 5488 30956 928245 7855578 90: 25 8 35 868 8059 52702 124611 2869517 90: 168 8 7 851 2023 46784 687310 4103789 90: 193 8 65 708 9371 99964 37220 3893300 90: 170 8 55 672 3974 45487 823761 428878 90: 142 8 97 665 9823 46844 383619 6444628 90: 176 8 34 636 7301 47976 569899 9218292 90: 28 8 92 585 2310 41334 545418 1334792 90: 160 8 70 571 7936 22902 603269 8680300 90: 0 8 5 561 9989 87361 494821 5840702 90: 90: --- EXPECTED RESULT --- 90: 37 9 44 896 6733 59844 347449 4470115 90: 186 9 78 888 7407 52027 924097 8606329 90: 194 9 84 887 8293 57428 13305 4166625 90: 185 9 84 831 7327 14708 5597 5096306 90: 79 9 28 823 8590 23300 806801 9298308 90: 96 9 73 674 5266 132 141779 9085955 90: 70 9 7 631 2287 35350 4649 1123333 90: 197 9 99 623 6246 23617 514078 8376894 90: 122 9 77 585 7558 32215 911472 837405 90: 136 9 75 565 8630 41623 545551 2020603 90: 172 9 22 546 8088 89284 964185 39966 90: 2 9 39 499 7022 86936 848301 746939 90: 133 9 66 345 4546 17571 408146 8155891 90: 32 9 13 285 3097 3996 395731 7687792 90: 39 9 84 243 4208 14273 384043 1263705 90: 53 9 42 211 9846 61097 684453 4213854 90: 44 9 19 200 2545 70842 89745 3435765 90: 22 9 4 171 8343 36077 87048 4103074 90: 196 9 79 147 766 65018 580420 3460119 90: 199 9 11 91 6896 94319 527602 8222281 90: 116 8 77 963 5488 30956 928245 7855578 90: 25 8 35 868 8059 52702 124611 2869517 90: 168 8 7 851 2023 46784 687310 4103789 90: 193 8 65 708 9371 99964 37220 3893300 90: 170 8 55 672 3974 45487 823761 428878 90: 142 8 97 665 9823 46844 383619 6444628 90: 176 8 34 636 7301 47976 569899 9218292 90: 28 8 92 585 2310 41334 545418 1334792 90: 160 8 70 571 7936 22902 603269 8680300 90: 0 8 5 561 9989 87361 494821 5840702 90: 90:
:496 90: select col1 from (select col3, col1, col2, from temp_2 order by col3 - col2 + col1, col1 limit 20); 90: --- YOUR RESULT --- 90: 1 90: 19 90: 54 90: 44 90: 41 90: 82 90: 28 90: 46 90: 40 90: 62 90: 48 90: 11 90: 27 90: 2 90: 58 90: 89 90: 90 90: 75 90: 71 90: 37 90: 90: --- EXPECTED RESULT --- 90: 1 90: 19 90: 54 90: 44 90: 41 90: 82 90: 28 90: 46 90: 40 90: 62 90: 48 90: 11 90: 27 90: 2 90: 58 90: 89 90: 90 90: 75 90: 71 90: 37 90: 90:
:522 90: select * from __mock_table_123, (select * from temp_1 order by col1 desc limit 3); 90: --- YOUR RESULT --- 90: 1 199 9 11 91 6896 94319 527602 8222281 90: 1 198 0 99 778 1528 52316 726477 8219397 90: 1 197 9 99 623 6246 23617 514078 8376894 90: 2 199 9 11 91 6896 94319 527602 8222281 90: 2 198 0 99 778 1528 52316 726477 8219397 90: 2 197 9 99 623 6246 23617 514078 8376894 90: 3 199 9 11 91 6896 94319 527602 8222281 90: 3 198 0 99 778 1528 52316 726477 8219397 90: 3 197 9 99 623 6246 23617 514078 8376894 90: 90: --- EXPECTED RESULT --- 90: 1 199 9 11 91 6896 94319 527602 8222281 90: 1 198 0 99 778 1528 52316 726477 8219397 90: 1 197 9 99 623 6246 23617 514078 8376894 90: 2 199 9 11 91 6896 94319 527602 8222281 90: 2 198 0 99 778 1528 52316 726477 8219397 90: 2 197 9 99 623 6246 23617 514078 8376894 90: 3 199 9 11 91 6896 94319 527602 8222281 90: 3 198 0 99 778 1528 52316 726477 8219397 90: 3 197 9 99 623 6246 23617 514078 8376894 90: 90:
:537 90: select * from 90: temp_2 t2 inner join 90: (select col2, col4, col1, col3 from temp_1 order by col2 desc, col4, col1 desc limit 30 ) t1 90: on t1.col1 = t2.col1; 90: Extra checks: ["ensure:hash_join"] 90: [PASS] extra check: ensure:hash_join 90: --- YOUR RESULT --- 90: 6 592 6 8 259 6 91 90: 2 837 2 9 499 2 39 90: 7 88 7 8 154 7 11 90: 53 770 3 9 211 53 42 90: 39 160 9 9 243 39 84 90: 37 812 7 9 896 37 44 90: 22 387 2 9 171 22 4 90: 30 132 0 8 165 30 54 90: 66 529 6 8 388 66 59 90: 70 107 0 9 631 70 7 90: 44 975 4 9 200 44 19 90: 79 125 9 9 823 79 28 90: 94 377 4 8 110 94 58 90: 96 662 6 9 674 96 73 90: 32 666 2 9 285 32 13 90: 90: --- EXPECTED RESULT --- 90: 22 387 2 9 171 22 4 90: 44 975 4 9 200 44 19 90: 53 770 3 9 211 53 42 90: 39 160 9 9 243 39 84 90: 32 666 2 9 285 32 13 90: 2 837 2 9 499 2 39 90: 70 107 0 9 631 70 7 90: 96 662 6 9 674 96 73 90: 79 125 9 9 823 79 28 90: 37 812 7 9 896 37 44 90: 94 377 4 8 110 94 58 90: 7 88 7 8 154 7 11 90: 30 132 0 8 165 30 54 90: 6 592 6 8 259 6 91 90: 66 529 6 8 388 66 59 90: 90:
:561 90: select * from __mock_external_merge_sort_input order by v2 desc, v3 asc limit 100; 90: --- YOUR RESULT --- 90: 13222 14999 16 90: 28222 14999 31 90: 43222 14999 46 90: 58222 14999 61 90: 73222 14999 76 90: 88222 14999 91 90: 13221 14998 15 90: 28221 14998 30 90: 43221 14998 45 90: 58221 14998 60 90: 73221 14998 75 90: 88221 14998 90 90: 13220 14997 14 90: 28220 14997 29 90: 43220 14997 44 90: 58220 14997 59 90: 73220 14997 74 90: 88220 14997 89 90: 13219 14996 13 90: 28219 14996 28 90: 43219 14996 43 90: 58219 14996 58 90: 73219 14996 73 90: 88219 14996 88 90: 13218 14995 12 90: 28218 14995 27 90: 43218 14995 42 90: 58218 14995 57 90: 73218 14995 72 90: 88218 14995 87 90: 13217 14994 11 90: 28217 14994 26 90: 43217 14994 41 90: 58217 14994 56 90: 73217 14994 71 90: 88217 14994 86 90: 13216 14993 10 90: 28216 14993 25 90: 43216 14993 40 90: 58216 14993 55 90: 73216 14993 70 90: 88216 14993 85 90: 13215 14992 9 90: 28215 14992 24 90: 43215 14992 39 90: 58215 14992 54 90: 73215 14992 69 90: 88215 14992 84 90: 13214 14991 8 90: 28214 14991 23 90: 43214 14991 38 90: 58214 14991 53 90: 73214 14991 68 90: 88214 14991 83 90: 13213 14990 7 90: 28213 14990 22 90: 43213 14990 37 90: 58213 14990 52 90: 73213 14990 67 90: 88213 14990 82 90: 13212 14989 6 90: 28212 14989 21 90: 43212 14989 36 90: 58212 14989 51 90: 73212 14989 66 90: 88212 14989 81 90: 13211 14988 5 90: 28211 14988 20 90: 43211 14988 35 90: 58211 14988 50 90: 73211 14988 65 90: 88211 14988 80 90: 13210 14987 4 90: 28210 14987 19 90: 43210 14987 34 90: 58210 14987 49 90: 73210 14987 64 90: 88210 14987 79 90: 13209 14986 3 90: 28209 14986 18 90: 43209 14986 33 90: 58209 14986 48 90: 73209 14986 63 90: 88209 14986 78 90: 13208 14985 2 90: 28208 14985 17 90: 43208 14985 32 90: 58208 14985 47 90: 73208 14985 62 90: 88208 14985 77 90: 13207 14984 1 90: 28207 14984 16 90: 43207 14984 31 90: 58207 14984 46 90: 73207 14984 61 90: 88207 14984 76 90: 13206 14983 0 90: 28206 14983 15 90: 43206 14983 30 90: 58206 14983 45 90: 90: --- EXPECTED RESULT --- 90: 13222 14999 16 90: 28222 14999 31 90: 43222 14999 46 90: 58222 14999 61 90: 73222 14999 76 90: 88222 14999 91 90: 13221 14998 15 90: 28221 14998 30 90: 43221 14998 45 90: 58221 14998 60 90: 73221 14998 75 90: 88221 14998 90 90: 13220 14997 14 90: 28220 14997 29 90: 43220 14997 44 90: 58220 14997 59 90: 73220 14997 74 90: 88220 14997 89 90: 13219 14996 13 90: 28219 14996 28 90: 43219 14996 43 90: 58219 14996 58 90: 73219 14996 73 90: 88219 14996 88 90: 13218 14995 12 90: 28218 14995 27 90: 43218 14995 42 90: 58218 14995 57 90: 73218 14995 72 90: 88218 14995 87 90: 13217 14994 11 90: 28217 14994 26 90: 43217 14994 41 90: 58217 14994 56 90: 73217 14994 71 90: 88217 14994 86 90: 13216 14993 10 90: 28216 14993 25 90: 43216 14993 40 90: 58216 14993 55 90: 73216 14993 70 90: 88216 14993 85 90: 13215 14992 9 90: 28215 14992 24 90: 43215 14992 39 90: 58215 14992 54 90: 73215 14992 69 90: 88215 14992 84 90: 13214 14991 8 90: 28214 14991 23 90: 43214 14991 38 90: 58214 14991 53 90: 73214 14991 68 90: 88214 14991 83 90: 13213 14990 7 90: 28213 14990 22 90: 43213 14990 37 90: 58213 14990 52 90: 73213 14990 67 90: 88213 14990 82 90: 13212 14989 6 90: 28212 14989 21 90: 43212 14989 36 90: 58212 14989 51 90: 73212 14989 66 90: 88212 14989 81 90: 13211 14988 5 90: 28211 14988 20 90: 43211 14988 35 90: 58211 14988 50 90: 73211 14988 65 90: 88211 14988 80 90: 13210 14987 4 90: 28210 14987 19 90: 43210 14987 34 90: 58210 14987 49 90: 73210 14987 64 90: 88210 14987 79 90: 13209 14986 3 90: 28209 14986 18 90: 43209 14986 33 90: 58209 14986 48 90: 73209 14986 63 90: 88209 14986 78 90: 13208 14985 2 90: 28208 14985 17 90: 43208 14985 32 90: 58208 14985 47 90: 73208 14985 62 90: 88208 14985 77 90: 13207 14984 1 90: 28207 14984 16 90: 43207 14984 31 90: 58207 14984 46 90: 73207 14984 61 90: 88207 14984 76 90: 13206 14983 0 90: 28206 14983 15 90: 43206 14983 30 90: 58206 14983 45 90: 90:
:668 90: select * from 90: (select * from __mock_external_merge_sort_input order by v1 + v2 limit 2000) t1 90: inner join __mock_table_1 90: on t1.v2 = __mock_table_1.colB; 90: Extra checks: ["ensure:hash_join"] 90: [PASS] extra check: ensure:hash_join 90: --- YOUR RESULT --- 90: 23 1800 26 18 1800 90: 123 1900 15 19 1900 90: 223 2000 4 20 2000 90: 323 2100 104 21 2100 90: 423 2200 93 22 2200 90: 523 2300 82 23 2300 90: 623 2400 71 24 2400 90: 723 2500 60 25 2500 90: 823 2600 49 26 2600 90: 923 2700 38 27 2700 90: 1023 2800 27 28 2800 90: 1123 2900 16 29 2900 90: 1223 3000 5 30 3000 90: 1323 3100 105 31 3100 90: 1423 3200 94 32 3200 90: 1523 3300 83 33 3300 90: 1623 3400 72 34 3400 90: 1723 3500 61 35 3500 90: 1823 3600 50 36 3600 90: 1923 3700 39 37 3700 90: 90: --- EXPECTED RESULT --- 90: 23 1800 26 18 1800 90: 123 1900 15 19 1900 90: 223 2000 4 20 2000 90: 323 2100 104 21 2100 90: 423 2200 93 22 2200 90: 523 2300 82 23 2300 90: 623 2400 71 24 2400 90: 723 2500 60 25 2500 90: 823 2600 49 26 2600 90: 923 2700 38 27 2700 90: 1023 2800 27 28 2800 90: 1123 2900 16 29 2900 90: 1223 3000 5 30 3000 90: 1323 3100 105 31 3100 90: 1423 3200 94 32 3200 90: 1523 3300 83 33 3300 90: 1623 3400 72 34 3400 90: 1723 3500 61 35 3500 90: 1823 3600 50 36 3600 90: 1923 3700 39 37 3700 90: 90:
:696 90: create table temp_3(v1 int, v2 varchar(128), v3 int, v4 int, v5 int, v6 int, v7 int, v8 int); 90: ---- 90: Table created with id = 34 90: 90:
:699 90: insert into temp_3 values 90: (0, '', 10, 100, 200, 300, 400, 500), 90: (1, '🥰', 11, 100, 200, 300, 400, 500), 90: (2, '🥰🥰', 12, 100, 200, 300, 400, 500), 90: (3, '🥰🥰🥰', 13, 100, 200, 300, 400, 500), 90: (4, '🥰🥰🥰🥰', 14, 100, 200, 300, 400, 500), 90: (5, '🥰🥰🥰🥰🥰', 15, 100, 200, 300, 400, 500), 90: (6, '', 16, 100, 200, 300, 400, 500), 90: (7, '🥰', 17, 100, 200, 300, 400, 500), 90: (8, '🥰🥰', 18, 100, 200, 300, 400, 500), 90: (9, '🥰🥰🥰', 19, 100, 200, 300, 400, 500), 90: (10, '🥰🥰🥰🥰', 20, 100, 200, 300, 400, 500), 90: (11, '🥰🥰🥰🥰🥰', 21, 100, 200, 300, 400, 500), 90: (12, '', 22, 100, 200, 300, 400, 500), 90: (13, '🥰', 23, 100, 200, 300, 400, 500), 90: (14, '🥰🥰', 24, 100, 200, 300, 400, 500), 90: (15, '🥰🥰🥰', 25, 100, 200, 300, 400, 500), 90: (16, '🥰🥰🥰🥰', 26, 100, 200, 300, 400, 500), 90: (17, '🥰🥰🥰🥰🥰', 27, 100, 200, 300, 400, 500), 90: (18, '', 28, 100, 200, 300, 400, 500), 90: (19, '🥰', 29, 100, 200, 300, 400, 500), 90: (20, '🥰🥰', 30, 100, 200, 300, 400, 500), 90: (21, '🥰🥰🥰', 31, 100, 200, 300, 400, 500), 90: (22, '🥰🥰🥰🥰', 32, 100, 200, 300, 400, 500), 90: (23, '🥰🥰🥰🥰🥰', 33, 100, 200, 300, 400, 500), 90: (24, '', 34, 100, 200, 300, 400, 500), 90: (25, '🥰', 35, 100, 200, 300, 400, 500), 90: (26, '🥰🥰', 36, 100, 200, 300, 400, 500), 90: (27, '🥰🥰🥰', 37, 100, 200, 300, 400, 500), 90: (28, '🥰🥰🥰🥰', 38, 100, 200, 300, 400, 500), 90: (29, '🥰🥰🥰🥰🥰', 39, 100, 200, 300, 400, 500), 90: (30, '', 40, 100, 200, 300, 400, 500), 90: (31, '🥰', 41, 100, 200, 300, 400, 500), 90: (32, '🥰🥰', 42, 100, 200, 300, 400, 500), 90: (33, '🥰🥰🥰', 43, 100, 200, 300, 400, 500), 90: (34, '🥰🥰🥰🥰', 44, 100, 200, 300, 400, 500), 90: (35, '🥰🥰🥰🥰🥰', 45, 100, 200, 300, 400, 500), 90: (36, '', 46, 100, 200, 300, 400, 500), 90: (37, '🥰', 47, 100, 200, 300, 400, 500), 90: (38, '🥰🥰', 48, 100, 200, 300, 400, 500), 90: (39, '🥰🥰🥰', 49, 100, 200, 300, 400, 500), 90: (40, '🥰🥰🥰🥰', 50, 100, 200, 300, 400, 500), 90: (41, '🥰🥰🥰🥰🥰', 51, 100, 200, 300, 400, 500), 90: (42, '', 52, 100, 200, 300, 400, 500), 90: (43, '🥰', 53, 100, 200, 300, 400, 500), 90: (44, '🥰🥰', 54, 100, 200, 300, 400, 500), 90: (45, '🥰🥰🥰', 55, 100, 200, 300, 400, 500), 90: (46, '🥰🥰🥰🥰', 56, 100, 200, 300, 400, 500), 90: (47, '🥰🥰🥰🥰🥰', 57, 100, 200, 300, 400, 500), 90: (48, '', 58, 100, 200, 300, 400, 500), 90: (49, '🥰', 59, 100, 200, 300, 400, 500), 90: (50, '🥰🥰', 60, 100, 200, 300, 400, 500), 90: (51, '🥰🥰🥰', 61, 100, 200, 300, 400, 500), 90: (52, '🥰🥰🥰🥰', 62, 100, 200, 300, 400, 500), 90: (53, '🥰🥰🥰🥰🥰', 63, 100, 200, 300, 400, 500), 90: (54, '', 64, 100, 200, 300, 400, 500), 90: (55, '🥰', 65, 100, 200, 300, 400, 500), 90: (56, '🥰🥰', 66, 100, 200, 300, 400, 500), 90: (57, '🥰🥰🥰', 67, 100, 200, 300, 400, 500), 90: (58, '🥰🥰🥰🥰', 68, 100, 200, 300, 400, 500), 90: (null, '🥰🥰🥰🥰🥰', 69, 100, 200, 300, 400, 500), 90: (60, '', 70, 100, 200, 300, 400, 500), 90: (61, '🥰', 71, 100, 200, 300, 400, 500), 90: (62, '🥰🥰', 72, 100, 200, 300, 400, 500), 90: (63, '🥰🥰🥰', 73, 100, 200, 300, 400, 500), 90: (64, '🥰🥰🥰🥰', 74, 100, 200, 300, 400, 500), 90: (null, '🥰🥰🥰🥰🥰', 75, 100, 200, 300, 400, 500), 90: (66, '', 76, 100, 200, 300, 400, 500), 90: (67, '🥰', 77, 100, 200, 300, 400, 500), 90: (68, '🥰🥰', 78, 100, 200, 300, 400, 500), 90: (69, '🥰🥰🥰', 79, 100, 200, 300, 400, 500), 90: (70, '🥰🥰🥰🥰', 80, 100, 200, 300, 400, 500), 90: (71, '🥰🥰🥰🥰🥰', 81, 100, 200, 300, 400, 500), 90: (72, '', 82, 100, 200, 300, 400, 500), 90: (73, '🥰', 83, 100, 200, 300, 400, 500), 90: (74, '🥰🥰', 84, 100, 200, 300, 400, 500), 90: (75, '🥰🥰🥰', 85, 100, 200, 300, 400, 500), 90: (76, '🥰🥰🥰🥰', 86, 100, 200, 300, 400, 500), 90: (77, '🥰🥰🥰🥰🥰', 87, 100, 200, 300, 400, 500), 90: (78, '', 88, 100, 200, 300, 400, 500), 90: (79, '🥰', 89, 100, 200, 300, 400, 500), 90: (80, '🥰🥰', 90, 100, 200, 300, 400, 500), 90: (81, '🥰🥰🥰', 91, 100, 200, 300, 400, 500), 90: (82, '🥰🥰🥰🥰', 92, 100, 200, 300, 400, 500), 90: (83, '🥰🥰🥰🥰🥰', 93, 100, 200, 300, 400, 500), 90: (84, '', 94, 100, 200, 300, 400, 500), 90: (85, '🥰', 95, 100, 200, 300, 400, 500), 90: (86, '🥰🥰', 96, 100, 200, 300, 400, 500), 90: (87, '🥰🥰🥰', 97, 100, 200, 300, 400, 500), 90: (88, '🥰🥰🥰🥰', 98, 100, 200, 300, 400, 500), 90: (89, '🥰🥰🥰🥰🥰', 99, 100, 200, 300, 400, 500), 90: (90, '', 100, 100, 200, 300, 400, 500), 90: (91, '🥰', 101, 100, 200, 300, 400, 500), 90: (92, '🥰🥰', 102, 100, 200, 300, 400, 500), 90: (93, '🥰🥰🥰', 103, 100, 200, 300, 400, 500), 90: (94, '🥰🥰🥰🥰', 104, 100, 200, 300, 400, 500), 90: (95, '🥰🥰🥰🥰🥰', 105, 100, 200, 300, 400, 500), 90: (96, '', 106, 100, 200, 300, 400, 500), 90: (97, '🥰', 107, 100, 200, 300, 400, 500), 90: (98, '🥰🥰', 108, 100, 200, 300, 400, 500), 90: (99, '🥰🥰🥰', 109, 100, 200, 300, 400, 500), 90: (100, '🥰🥰🥰🥰', 110, 100, 200, 300, 400, 500), 90: (101, '🥰🥰🥰🥰🥰', 111, 100, 200, 300, 400, 500), 90: (102, '', 112, 100, 200, 300, 400, 500), 90: (103, '🥰', 113, 100, 200, 300, 400, 500), 90: (104, '🥰🥰', 114, 100, 200, 300, 400, 500), 90: (105, '🥰🥰🥰', 115, 100, 200, 300, 400, 500), 90: (106, '🥰🥰🥰🥰', 116, 100, 200, 300, 400, 500), 90: (107, '🥰🥰🥰🥰🥰', 117, 100, 200, 300, 400, 500), 90: (108, '', 118, 100, 200, 300, 400, 500), 90: (109, '🥰', 119, 100, 200, 300, 400, 500), 90: (110, '🥰🥰', 120, 100, 200, 300, 400, 500), 90: (111, '🥰🥰🥰', 121, 100, 200, 300, 400, 500), 90: (112, '🥰🥰🥰🥰', 122, 100, 200, 300, 400, 500), 90: (113, '🥰🥰🥰🥰🥰', 123, 100, 200, 300, 400, 500), 90: (114, '', 124, 100, 200, 300, 400, 500), 90: (115, '🥰', 125, 100, 200, 300, 400, 500), 90: (116, '🥰🥰', 126, 100, 200, 300, 400, 500), 90: (117, '🥰🥰🥰', 127, 100, 200, 300, 400, 500), 90: (118, '🥰🥰🥰🥰', 128, 100, 200, 300, 400, 500), 90: (119, '🥰🥰🥰🥰🥰', 129, 100, 200, 300, 400, 500), 90: (120, '', 130, 100, 200, 300, 400, 500), 90: (121, '🥰', 131, 100, 200, 300, 400, 500), 90: (122, '🥰🥰', 132, 100, 200, 300, 400, 500), 90: (123, '🥰🥰🥰', 133, 100, 200, 300, 400, 500), 90: (124, '🥰🥰🥰🥰', 134, 100, 200, 300, 400, 500), 90: (125, '🥰🥰🥰🥰🥰', 135, 100, 200, 300, 400, 500), 90: (126, '', 136, 100, 200, 300, 400, 500), 90: (127, '🥰', 137, 100, 200, 300, 400, 500), 90: (128, '🥰🥰', 138, 100, 200, 300, 400, 500), 90: (129, '🥰🥰🥰', 139, 100, 200, 300, 400, 500), 90: (130, '🥰🥰🥰🥰', 140, 100, 200, 300, 400, 500), 90: (131, '🥰🥰🥰🥰🥰', 141, 100, 200, 300, 400, 500), 90: (132, '', 142, 100, 200, 300, 400, 500), 90: (133, '🥰', 143, 100, 200, 300, 400, 500), 90: (134, '🥰🥰', 144, 100, 200, 300, 400, 500), 90: (135, '🥰🥰🥰', 145, 100, 200, 300, 400, 500), 90: (136, '🥰🥰🥰🥰', 146, 100, 200, 300, 400, 500), 90: (null, '🥰🥰🥰🥰🥰', 147, 100, 200, 300, 400, 500), 90: (138, '', 148, 100, 200, 300, 400, 500), 90: (139, '🥰', 149, 100, 200, 300, 400, 500), 90: (140, '🥰🥰', 150, 100, 200, 300, 400, 500), 90: (141, '🥰🥰🥰', 151, 100, 200, 300, 400, 500), 90: (142, '🥰🥰🥰🥰', 152, 100, 200, 300, 400, 500), 90: (143, '🥰🥰🥰🥰🥰', 153, 100, 200, 300, 400, 500), 90: (144, '', 154, 100, 200, 300, 400, 500), 90: (145, '🥰', 155, 100, 200, 300, 400, 500), 90: (146, '🥰🥰', 156, 100, 200, 300, 400, 500), 90: (147, '🥰🥰🥰', 157, 100, 200, 300, 400, 500), 90: (148, '🥰🥰🥰🥰', 158, 100, 200, 300, 400, 500), 90: (149, '🥰🥰🥰🥰🥰', 159, 100, 200, 300, 400, 500), 90: (150, '', 160, 100, 200, 300, 400, 500), 90: (151, '🥰', 161, 100, 200, 300, 400, 500), 90: (152, '🥰🥰', 162, 100, 200, 300, 400, 500), 90: (153, '🥰🥰🥰', 163, 100, 200, 300, 400, 500), 90: (154, '🥰🥰🥰🥰', 164, 100, 200, 300, 400, 500), 90: (155, '🥰🥰🥰🥰🥰', 165, 100, 200, 300, 400, 500), 90: (156, '', 166, 100, 200, 300, 400, 500), 90: (157, '🥰', 167, 100, 200, 300, 400, 500), 90: (158, '🥰🥰', 168, 100, 200, 300, 400, 500), 90: (159, '🥰🥰🥰', 169, 100, 200, 300, 400, 500), 90: (160, '🥰🥰🥰🥰', 170, 100, 200, 300, 400, 500), 90: (161, '🥰🥰🥰🥰🥰', 171, 100, 200, 300, 400, 500), 90: (162, '', 172, 100, 200, 300, 400, 500), 90: (163, '🥰', 173, 100, 200, 300, 400, 500), 90: (164, '🥰🥰', 174, 100, 200, 300, 400, 500), 90: (165, '🥰🥰🥰', 175, 100, 200, 300, 400, 500), 90: (166, '🥰🥰🥰🥰', 176, 100, 200, 300, 400, 500), 90: (167, '🥰🥰🥰🥰🥰', 177, 100, 200, 300, 400, 500), 90: (168, '', 178, 100, 200, 300, 400, 500), 90: (169, '🥰', 179, 100, 200, 300, 400, 500), 90: (170, '🥰🥰', 180, 100, 200, 300, 400, 500), 90: (171, '🥰🥰🥰', 181, 100, 200, 300, 400, 500), 90: (172, '🥰🥰🥰🥰', 182, 100, 200, 300, 400, 500), 90: (173, '🥰🥰🥰🥰🥰', 183, 100, 200, 300, 400, 500), 90: (174, '', 184, 100, 200, 300, 400, 500), 90: (175, '🥰', 185, 100, 200, 300, 400, 500), 90: (176, '🥰🥰', 186, 100, 200, 300, 400, 500), 90: (177, '🥰🥰🥰', 187, 100, 200, 300, 400, 500), 90: (178, '🥰🥰🥰🥰', 188, 100, 200, 300, 400, 500), 90: (179, '🥰🥰🥰🥰🥰', 189, 100, 200, 300, 400, 500), 90: (180, '', 190, 100, 200, 300, 400, 500), 90: (181, '🥰', 191, 100, 200, 300, 400, 500), 90: (182, '🥰🥰', 192, 100, 200, 300, 400, 500), 90: (183, '🥰🥰🥰', 193, 100, 200, 300, 400, 500), 90: (184, '🥰🥰🥰🥰', 194, 100, 200, 300, 400, 500), 90: (185, '🥰🥰🥰🥰🥰', 195, 100, 200, 300, 400, 500), 90: (186, '', 196, 100, 200, 300, 400, 500), 90: (187, '🥰', 197, 100, 200, 300, 400, 500), 90: (188, '🥰🥰', 198, 100, 200, 300, 400, 500), 90: (189, '🥰🥰🥰', 199, 100, 200, 300, 400, 500), 90: (190, '🥰🥰🥰🥰', 200, 100, 200, 300, 400, 500), 90: (191, '🥰🥰🥰🥰🥰', 201, 100, 200, 300, 400, 500), 90: (192, '', 202, 100, 200, 300, 400, 500), 90: (193, '🥰', 203, 100, 200, 300, 400, 500), 90: (194, '🥰🥰', 204, 100, 200, 300, 400, 500), 90: (195, '🥰🥰🥰', 205, 100, 200, 300, 400, 500), 90: (196, '🥰🥰🥰🥰', 206, 100, 200, 300, 400, 500), 90: (197, '🥰🥰🥰🥰🥰', 207, 100, 200, 300, 400, 500), 90: (198, '', 208, 100, 200, 300, 400, 500), 90: (199, '🥰', 209, 100, 200, 300, 400, 500); 90: ---- 90: 200 90: 90:
:902 90: select * from temp_3 order by v2 desc, v1 asc nulls first, v3 desc limit 10; 90: --- YOUR RESULT --- 90: integer_null 🥰🥰🥰🥰🥰 147 100 200 300 400 500 90: integer_null 🥰🥰🥰🥰🥰 75 100 200 300 400 500 90: integer_null 🥰🥰🥰🥰🥰 69 100 200 300 400 500 90: 5 🥰🥰🥰🥰🥰 15 100 200 300 400 500 90: 11 🥰🥰🥰🥰🥰 21 100 200 300 400 500 90: 17 🥰🥰🥰🥰🥰 27 100 200 300 400 500 90: 23 🥰🥰🥰🥰🥰 33 100 200 300 400 500 90: 29 🥰🥰🥰🥰🥰 39 100 200 300 400 500 90: 35 🥰🥰🥰🥰🥰 45 100 200 300 400 500 90: 41 🥰🥰🥰🥰🥰 51 100 200 300 400 500 90: 90: --- EXPECTED RESULT --- 90: integer_null 🥰🥰🥰🥰🥰 147 100 200 300 400 500 90: integer_null 🥰🥰🥰🥰🥰 75 100 200 300 400 500 90: integer_null 🥰🥰🥰🥰🥰 69 100 200 300 400 500 90: 5 🥰🥰🥰🥰🥰 15 100 200 300 400 500 90: 11 🥰🥰🥰🥰🥰 21 100 200 300 400 500 90: 17 🥰🥰🥰🥰🥰 27 100 200 300 400 500 90: 23 🥰🥰🥰🥰🥰 33 100 200 300 400 500 90: 29 🥰🥰🥰🥰🥰 39 100 200 300 400 500 90: 35 🥰🥰🥰🥰🥰 45 100 200 300 400 500 90: 41 🥰🥰🥰🥰🥰 51 100 200 300 400 500 90: 90:
:916 90: select v1, v2 from (select v1, v2, v5, v6, v5 + v6, v3, v4, v3 - v4 from temp_3 order by v1 desc limit 25) order by v2, v1 limit 5; 90: --- YOUR RESULT --- 90: 180 90: 186 90: 192 90: 198 90: 175 🥰 90: 90: --- EXPECTED RESULT --- 90: 180 90: 186 90: 192 90: 198 90: 175 🥰 90: 16/19 Test #90: SQLLogicTest.p3.16-sort-limit ............ Passed 2.67 sec test 91 Start 91: SQLLogicTest.p3.17-topn 91: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.17-topn.slt" "--verbose" "-d" "--in-memory" 91: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 91: Test timeout computed to be: 10000000 91:
:4 91: select * from test_simple_seq_2 order by col1 desc limit 5; 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 9 19 91: 8 18 91: 7 17 91: 6 16 91: 5 15 91: 91: --- EXPECTED RESULT --- 91: 9 19 91: 8 18 91: 7 17 91: 6 16 91: 5 15 91: 91:
:13 91: select * from test_simple_seq_2 order by col1 desc limit 15; 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 9 19 91: 8 18 91: 7 17 91: 6 16 91: 5 15 91: 4 14 91: 3 13 91: 2 12 91: 1 11 91: 0 10 91: 91: --- EXPECTED RESULT --- 91: 9 19 91: 8 18 91: 7 17 91: 6 16 91: 5 15 91: 4 14 91: 3 13 91: 2 12 91: 1 11 91: 0 10 91: 91:
:27 91: create table temp_1(colA int, colB int, colC int, colD int); 91: ---- 91: Table created with id = 32 91: 91:
:30 91: insert into temp_1 values 91: (0 , 1, 6113, 48270), 91: (1 , 5, 8005, 22497), 91: (2 , 0, 4476, 73541), 91: (9 , 2, 2600, 32938), 91: (10, 8, 398 , 60977), 91: (11, 1, 5472, 33166), 91: (12, 3, 1107, 94947), 91: (13, 0, 4153, 54624), 91: (14, 3, 1907, 48515), 91: (15, 6, 9754, 95830), 91: (16, 8, 5252, 96696), 91: (3 , 2, 290 , 20860), 91: (4 , 0, 3362, 47696), 91: (5 , 8, 7022, 59586), 91: (6 , 2, 170 , 92798), 91: (7 , 2, 8524, 19746), 91: (8 , 8, 3074, 56174), 91: (17, 3, 4819, 99411), 91: (18, 9, 666 , 86073), 91: (19, 3, 701 , 34675), 91: (20, 2, 2307, 97170), 91: (28, 5, 8710, 194 ), 91: (29, 5, 5519, 4256 ), 91: (30, 0, 3803, 18357), 91: (31, 6, 219 , 2090 ), 91: (32, 2, 3842, 38160), 91: (33, 8, 991 , 24527), 91: (34, 4, 1443, 41478), 91: (35, 2, 7564, 14242), 91: (21, 4, 194 , 42522), 91: (22, 3, 4256, 54404), 91: (23, 7, 6037, 70355), 91: (24, 6, 1973, 98970), 91: (25, 3, 2090, 701 ), 91: (26, 2, 5392, 94519), 91: (27, 0, 8143, 47916), 91: (36, 6, 2269, 54671), 91: (37, 3, 3582, 77724), 91: (38, 2, 5267, 69339), 91: (39, 0, 1180, 94216), 91: (40, 6, 3158, 16603), 91: (41, 3, 4878, 85762), 91: (42, 1, 34 , 95622), 91: (43, 6, 9359, 1443 ), 91: (44, 0, 2173, 31618), 91: (45, 3, 9616, 67805), 91: (46, 2, 2006, 92368), 91: (47, 0, 6785, 75686), 91: (48, 6, 2696, 19966), 91: (49, 1, 3313, 70803), 91: (50, 7, 4001, 99484), 91: (51, 8, 9106, 28177), 91: (52, 1, 8312, 52310), 91: (58, 8, 483 , 86798), 91: (59, 6, 9742, 59516), 91: (60, 5, 4347, 34 ), 91: (61, 2, 9484, 25743), 91: (53, 1, 9567, 10624), 91: (54, 2, 6866, 15963), 91: (55, 1, 4956, 27755), 91: (56, 1, 4060, 16227), 91: (57, 9, 3683, 78077), 91: (62, 2, 9506, 13806), 91: (63, 2, 7758, 44219), 91: (64, 2, 1999, 83926), 91: (65, 3, 3886, 72321), 91: (66, 3, 8020, 97035), 91: (67, 0, 4633, 68232), 91: (68, 4, 2699, 52465), 91: (69, 8, 755 , 20385), 91: (70, 2, 8311, 59841), 91: (71, 4, 7826, 97071), 91: (72, 7, 7027, 29049), 91: (73, 9, 499 , 73848), 91: (74, 1, 9088, 12950), 91: (75, 3, 3517, 94485), 91: (76, 7, 4339, 25951), 91: (77, 2, 5801, 59170), 91: (85, 9, 849 , 11512), 91: (86, 3, 2697, 9484 ), 91: (87, 2, 3060, 25890), 91: (88, 2, 7329, 40526), 91: (89, 1, 9418, 34767), 91: (90, 9, 6826, 69422), 91: (91, 1, 1411, 8020 ), 91: (92, 9, 2110, 28695), 91: (78, 3, 5737, 59426), 91: (79, 3, 4299, 97298), 91: (80, 3, 7683, 21340), 91: (81, 0, 2045, 3683 ), 91: (82, 8, 5290, 98787), 91: (96, 1, 4733, 2699 ), 91: (97, 1, 2273, 63790), 91: (98, 3, 1394, 17139), 91: (99, 6, 4482, 57463), 91: (83, 3, 2914, 91662), 91: (84, 9, 4626, 92192), 91: (93, 4, 2758, 27498), 91: (94, 5, 8802, 70169), 91: (95, 9, 5706, 15441); 91: ---- 91: 100 91: 91:
:134 91: create table temp_2(colA int, colB int, colC int); 91: ---- 91: Table created with id = 33 91: 91:
:137 91: insert into temp_2 values 91: (5, 290, 5), 91: (6, 592, 6), 91: (0, 142, 0), 91: (1, 993, 1), 91: (2, 837, 2), 91: (3, 380, 3), 91: (4, 240, 4), 91: (7, 88 , 7), 91: (8, 194, 8), 91: (9, 638, 9), 91: (10, 290, 0), 91: (11, 878, 1), 91: (12, 170, 2), 91: (13, 332, 3), 91: (14, 680, 4), 91: (15, 2, 5), 91: (16, 552, 6), 91: (17, 561, 7), 91: (18, 398, 8), 91: (19, 974, 9), 91: (20, 739, 0), 91: (21, 352, 1), 91: (53, 770, 3), 91: (39, 160, 9), 91: (40, 917, 0), 91: (41, 949, 1), 91: (36, 259, 6), 91: (37, 812, 7), 91: (38, 194, 8), 91: (47, 399, 7), 91: (48, 924, 8), 91: (49, 731, 9), 91: (50, 8 , 0), 91: (51, 219, 1), 91: (52, 276, 2), 91: (55, 390, 5), 91: (56, 419, 6), 91: (57, 346, 7), 91: (58, 898, 8), 91: (59, 396, 9), 91: (60, 221, 0), 91: (61, 208, 1), 91: (84, 711, 4), 91: (85, 779, 5), 91: (86, 648, 6), 91: (87, 590, 7), 91: (88, 241, 8), 91: (89, 929, 9), 91: (90, 914, 0), 91: (91, 449, 1), 91: (92, 815, 2), 91: (93, 225, 3), 91: (54, 991, 4), 91: (22, 387, 2), 91: (23, 598, 3), 91: (24, 440, 4), 91: (25, 83, 5), 91: (26, 57, 6), 91: (27, 883, 7), 91: (28, 914, 8), 91: (29, 538, 9), 91: (30, 132, 0), 91: (31, 723, 1), 91: (62, 934, 2), 91: (63, 510, 3), 91: (64, 147, 4), 91: (65, 156, 5), 91: (66, 529, 6), 91: (67, 86 , 7), 91: (68, 384, 8), 91: (69, 603, 9), 91: (70, 107, 0), 91: (71, 867, 1), 91: (42, 42 , 2), 91: (43, 272, 3), 91: (44, 975, 4), 91: (45, 518, 5), 91: (46, 930, 6), 91: (79, 125, 9), 91: (80, 400, 0), 91: (81, 187, 1), 91: (82, 982, 2), 91: (83, 641, 3), 91: (94, 377, 4), 91: (95, 120, 5), 91: (96, 662, 6), 91: (97, 277, 7), 91: (98, 351, 8), 91: (32, 666, 2), 91: (33, 701, 3), 91: (34, 311, 4), 91: (35, 214, 5), 91: (72, 253, 2), 91: (73, 782, 3), 91: (74, 124, 4), 91: (75, 879, 5), 91: (76, 34 , 6), 91: (77, 143, 7), 91: (78, 494, 8), 91: (99, 722, 9); 91: ---- 91: 100 91: 91:
:240 91: select colB, colD, colA, colC from temp_1 order by colB desc, colD, colA desc limit 20; 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 9 11512 85 849 91: 9 15441 95 5706 91: 9 28695 92 2110 91: 9 69422 90 6826 91: 9 73848 73 499 91: 9 78077 57 3683 91: 9 86073 18 666 91: 9 92192 84 4626 91: 8 20385 69 755 91: 8 24527 33 991 91: 8 28177 51 9106 91: 8 56174 8 3074 91: 8 59586 5 7022 91: 8 60977 10 398 91: 8 86798 58 483 91: 8 96696 16 5252 91: 8 98787 82 5290 91: 7 25951 76 4339 91: 7 29049 72 7027 91: 7 70355 23 6037 91: 91: --- EXPECTED RESULT --- 91: 9 11512 85 849 91: 9 15441 95 5706 91: 9 28695 92 2110 91: 9 69422 90 6826 91: 9 73848 73 499 91: 9 78077 57 3683 91: 9 86073 18 666 91: 9 92192 84 4626 91: 8 20385 69 755 91: 8 24527 33 991 91: 8 28177 51 9106 91: 8 56174 8 3074 91: 8 59586 5 7022 91: 8 60977 10 398 91: 8 86798 58 483 91: 8 96696 16 5252 91: 8 98787 82 5290 91: 7 25951 76 4339 91: 7 29049 72 7027 91: 7 70355 23 6037 91: 91:
:265 91: select * from temp_1 order by colB desc, colA + colD - colA desc, colA asc limit 20; 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 84 9 4626 92192 91: 18 9 666 86073 91: 57 9 3683 78077 91: 73 9 499 73848 91: 90 9 6826 69422 91: 92 9 2110 28695 91: 95 9 5706 15441 91: 85 9 849 11512 91: 82 8 5290 98787 91: 16 8 5252 96696 91: 58 8 483 86798 91: 10 8 398 60977 91: 5 8 7022 59586 91: 8 8 3074 56174 91: 51 8 9106 28177 91: 33 8 991 24527 91: 69 8 755 20385 91: 50 7 4001 99484 91: 23 7 6037 70355 91: 72 7 7027 29049 91: 91: --- EXPECTED RESULT --- 91: 84 9 4626 92192 91: 18 9 666 86073 91: 57 9 3683 78077 91: 73 9 499 73848 91: 90 9 6826 69422 91: 92 9 2110 28695 91: 95 9 5706 15441 91: 85 9 849 11512 91: 82 8 5290 98787 91: 16 8 5252 96696 91: 58 8 483 86798 91: 10 8 398 60977 91: 5 8 7022 59586 91: 8 8 3074 56174 91: 51 8 9106 28177 91: 33 8 991 24527 91: 69 8 755 20385 91: 50 7 4001 99484 91: 23 7 6037 70355 91: 72 7 7027 29049 91: 91:
:289 91: select colA from (select colC, colA, colB, from temp_2 order by colC - colB + colA, colA limit 20); 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 1 91: 19 91: 54 91: 44 91: 41 91: 82 91: 28 91: 46 91: 40 91: 62 91: 48 91: 11 91: 27 91: 2 91: 58 91: 89 91: 90 91: 75 91: 71 91: 37 91: 91: --- EXPECTED RESULT --- 91: 1 91: 19 91: 54 91: 44 91: 41 91: 82 91: 28 91: 46 91: 40 91: 62 91: 48 91: 11 91: 27 91: 2 91: 58 91: 89 91: 90 91: 75 91: 71 91: 37 91: 91:
:314 91: select * from temp_2 t2, (select * from temp_1 order by colB desc, colC asc limit 20) t1 where t2.colA = t1.colA; 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 5 290 5 5 8 7022 59586 91: 8 194 8 8 8 3074 56174 91: 10 290 0 10 8 398 60977 91: 16 552 6 16 8 5252 96696 91: 18 398 8 18 9 666 86073 91: 50 8 0 50 7 4001 99484 91: 51 219 1 51 8 9106 28177 91: 57 346 7 57 9 3683 78077 91: 58 898 8 58 8 483 86798 91: 84 711 4 84 9 4626 92192 91: 85 779 5 85 9 849 11512 91: 90 914 0 90 9 6826 69422 91: 92 815 2 92 9 2110 28695 91: 23 598 3 23 7 6037 70355 91: 69 603 9 69 8 755 20385 91: 82 982 2 82 8 5290 98787 91: 95 120 5 95 9 5706 15441 91: 33 701 3 33 8 991 24527 91: 73 782 3 73 9 499 73848 91: 76 34 6 76 7 4339 25951 91: 91: --- EXPECTED RESULT --- 91: 73 782 3 73 9 499 73848 91: 18 398 8 18 9 666 86073 91: 85 779 5 85 9 849 11512 91: 92 815 2 92 9 2110 28695 91: 57 346 7 57 9 3683 78077 91: 84 711 4 84 9 4626 92192 91: 95 120 5 95 9 5706 15441 91: 90 914 0 90 9 6826 69422 91: 10 290 0 10 8 398 60977 91: 58 898 8 58 8 483 86798 91: 69 603 9 69 8 755 20385 91: 33 701 3 33 8 991 24527 91: 8 194 8 8 8 3074 56174 91: 16 552 6 16 8 5252 96696 91: 82 982 2 82 8 5290 98787 91: 5 290 5 5 8 7022 59586 91: 51 219 1 51 8 9106 28177 91: 50 8 0 50 7 4001 99484 91: 76 34 6 76 7 4339 25951 91: 23 598 3 23 7 6037 70355 91: 91:
:338 91: select * from 91: temp_2 t2 inner join 91: (select colB, colD, colA, colC from temp_1 order by colB desc, colD, colA desc limit 10 ) t1 91: on t1.colA = t2.colA; 91: Extra checks: ["ensure:topn"] 91: [PASS] extra check: ensure:topn 91: --- YOUR RESULT --- 91: 18 398 8 9 86073 18 666 91: 57 346 7 9 78077 57 3683 91: 84 711 4 9 92192 84 4626 91: 85 779 5 9 11512 85 849 91: 90 914 0 9 69422 90 6826 91: 92 815 2 9 28695 92 2110 91: 69 603 9 8 20385 69 755 91: 95 120 5 9 15441 95 5706 91: 33 701 3 8 24527 33 991 91: 73 782 3 9 73848 73 499 91: 91: --- EXPECTED RESULT --- 91: 85 779 5 9 11512 85 849 91: 95 120 5 9 15441 95 5706 91: 92 815 2 9 28695 92 2110 91: 90 914 0 9 69422 90 6826 91: 73 782 3 9 73848 73 499 91: 57 346 7 9 78077 57 3683 91: 18 398 8 9 86073 18 666 91: 84 711 4 9 92192 84 4626 91: 69 603 9 8 20385 69 755 91: 33 701 3 8 24527 33 991 91: 91:
:355 91: select * from (select * from test_simple_seq_2 order by col1 desc limit 5) order by col1 asc limit 3; 91: Extra checks: ["explain", "ensure:topn*2"] 91: 91: [PASS] extra check: explain 91: [PASS] extra check: ensure:topn*2 91: --- YOUR RESULT --- 91: 5 15 91: 6 16 91: 7 17 91: 91: --- EXPECTED RESULT --- 91: 5 15 91: 6 16 91: 7 17 91: 17/19 Test #91: SQLLogicTest.p3.17-topn .................. Passed 0.40 sec test 92 Start 92: SQLLogicTest.p3.18-integration-1 92: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.18-integration-1.slt" "--verbose" "-d" "--in-memory" 92: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 92: Test timeout computed to be: 10000000 92:
:12 92: CREATE TABLE graph(src int, dst int, src_label int, dst_label int, distance int); 92: ---- 92: Table created with id = 32 92: 92:
:15 92: INSERT INTO graph SELECT * FROM __mock_graph; 92: ---- 92: 100 92: 92:
:18 92: select count(distance) from __mock_graph; 92: --- YOUR RESULT --- 92: 90 92: 92: --- EXPECTED RESULT --- 92: 90 92: 92:
:23 92: -- sanity check 92: select count(distance), sum(distance) from ( 92: -- find shortest path within 1 neighbor 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from 92: graph left_graph inner join graph right_graph 92: on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ); 92: --- YOUR RESULT --- 92: 100 200 92: 92: --- EXPECTED RESULT --- 92: 100 200 92: 92:
:43 92: -- sanity check 92: select count(distance), sum(distance) from ( 92: -- find shortest path within 2 neighbors 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from ( 92: -- find shortest path within 1 neighbor 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from 92: graph left_graph inner join graph right_graph 92: on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ) left_graph inner join graph right_graph on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ); 92: --- YOUR RESULT --- 92: 100 300 92: 92: --- EXPECTED RESULT --- 92: 100 300 92: 92:
:75 92: -- sanity check 92: select count(distance), sum(distance) from ( 92: -- find shortest path within 3 neighbors 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from ( 92: -- find shortest path within 2 neighbors 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from ( 92: -- find shortest path within 1 neighbor 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from 92: graph left_graph inner join graph right_graph 92: on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ) left_graph inner join graph right_graph on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ) left_graph inner join graph right_graph on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ); 92: --- YOUR RESULT --- 92: 100 400 92: 92: --- EXPECTED RESULT --- 92: 100 400 92: 92:
:119 92: select * from ( 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from ( 92: -- find shortest path within 2 neighbors 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from ( 92: -- find shortest path within 1 neighbor 92: select src, dst, src_label, dst_label, min(distance) as distance from ( 92: -- with in all the paths 92: select 92: left_graph.src as src, 92: right_graph.dst as dst, 92: left_graph.src_label as src_label, 92: right_graph.dst_label as dst_label, 92: (left_graph.distance + right_graph.distance) as distance 92: from 92: graph left_graph inner join graph right_graph 92: on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ) left_graph inner join graph right_graph on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ) left_graph inner join graph right_graph on left_graph.dst = right_graph.src 92: ) group by src, dst, src_label, dst_label 92: ) where src = 0 order by dst limit 10; 92: --- YOUR RESULT --- 92: 0 0 0 0 4 92: 0 1 0 100 4 92: 0 2 0 200 4 92: 0 3 0 300 4 92: 0 4 0 400 4 92: 0 5 0 500 4 92: 0 6 0 600 4 92: 0 7 0 700 4 92: 0 8 0 800 4 92: 0 9 0 900 4 92: 92: --- EXPECTED RESULT --- 92: 0 0 0 0 4 92: 0 1 0 100 4 92: 0 2 0 200 4 92: 0 3 0 300 4 92: 0 4 0 400 4 92: 0 5 0 500 4 92: 0 6 0 600 4 92: 0 7 0 700 4 92: 0 8 0 800 4 92: 0 9 0 900 4 92: 18/19 Test #92: SQLLogicTest.p3.18-integration-1 ......... Passed 0.42 sec test 93 Start 93: SQLLogicTest.p3.19-integration-2 93: Test command: /mnt/c/Users/nares/Workspace/bustub/build/bin/bustub-sqllogictest "/mnt/c/Users/nares/Workspace/bustub/test/sql/p3.19-integration-2.slt" "--verbose" "-d" "--in-memory" 93: Working Directory: /mnt/c/Users/nares/Workspace/bustub/build/test 93: Test timeout computed to be: 10000000 93:
:11 93: -- still the graph :) 93: CREATE TABLE graph(src int, dst int, src_label int, dst_label int, distance int); 93: ---- 93: Table created with id = 32 93: 93:
:15 93: -- and we materialize the result 93: CREATE TABLE result(src int, dst int, src_label int, dst_label int, distance int, steps int); 93: ---- 93: Table created with id = 33 93: 93:
:19 93: -- temp table (as we don't support union and insert into the table selected from) 93: CREATE TABLE tmp(src int, dst int, src_label int, dst_label int, distance int, steps int); 93: ---- 93: Table created with id = 34 93: 93:
:23 93: INSERT INTO graph SELECT * FROM __mock_graph; 93: ---- 93: 100 93: 93:
:26 93: select count(distance) from __mock_graph; 93: --- YOUR RESULT --- 93: 90 93: 93: --- EXPECTED RESULT --- 93: 90 93: 93:
:31 93: -- initialize the result set 93: INSERT INTO result SELECT src, src as dst, src_label, src_label as dst_label, 0, 0 FROM __mock_graph GROUP BY src, src_label ORDER BY src; 93: --- YOUR RESULT --- 93: 10 93: 93: --- EXPECTED RESULT --- 93: 10 93: 93:
:37 93: SELECT * FROM result; 93: --- YOUR RESULT --- 93: 0 0 0 0 0 0 93: 1 1 100 100 0 0 93: 2 2 200 200 0 0 93: 3 3 300 300 0 0 93: 4 4 400 400 0 0 93: 5 5 500 500 0 0 93: 6 6 600 600 0 0 93: 7 7 700 700 0 0 93: 8 8 800 800 0 0 93: 9 9 900 900 0 0 93: 93: --- EXPECTED RESULT --- 93: 0 0 0 0 0 0 93: 1 1 100 100 0 0 93: 2 2 200 200 0 0 93: 3 3 300 300 0 0 93: 4 4 400 400 0 0 93: 5 5 500 500 0 0 93: 6 6 600 600 0 0 93: 7 7 700 700 0 0 93: 8 8 800 800 0 0 93: 9 9 900 900 0 0 93: 93:
:51 93: -- 1st neighbor 93: INSERT INTO tmp SELECT * FROM ( 93: SELECT 93: result.src as src, 93: graph.dst as dst, 93: result.src_label as src_label, 93: graph.dst_label as dst_label, 93: result.distance + graph.distance as distance, 93: steps + 1 93: FROM 93: result INNER JOIN graph ON result.dst = graph.src 93: ) WHERE distance = distance; -- filter null as we don't have is null func 93: Extra checks: ["explain:o"] 93: === OPTIMIZER === 93: Insert { table_oid=34 } 93: Filter { predicate=(#0.4=#0.4) } 93: Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } 93: HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } 93: SeqScan { table=result } 93: SeqScan { table=graph } 93: 93: [PASS] extra check: explain:o 93: --- YOUR RESULT --- 93: 90 93: 93: --- EXPECTED RESULT --- 93: 90 93: 93:
:67 93: INSERT INTO result SELECT * FROM tmp; DELETE FROM tmp; SELECT count(*) FROM result; 93: ---- 93: 90 93: 90 93: 100 93: 93:
:70 93: -- 2nd neighbor 93: INSERT INTO tmp SELECT * FROM ( 93: SELECT 93: result.src as src, 93: graph.dst as dst, 93: result.src_label as src_label, 93: graph.dst_label as dst_label, 93: result.distance + graph.distance as distance, 93: steps + 1 93: FROM 93: result INNER JOIN graph ON result.dst = graph.src 93: ) WHERE distance = distance; -- filter null as we don't have is null func 93: Extra checks: ["explain:o"] 93: === OPTIMIZER === 93: Insert { table_oid=34 } 93: Filter { predicate=(#0.4=#0.4) } 93: Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } 93: HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } 93: SeqScan { table=result } 93: SeqScan { table=graph } 93: 93: [PASS] extra check: explain:o 93: --- YOUR RESULT --- 93: 900 93: 93: --- EXPECTED RESULT --- 93: 900 93: 93:
:86 93: INSERT INTO result SELECT * FROM tmp; DELETE FROM tmp; SELECT count(*) FROM result; 93: ---- 93: 900 93: 900 93: 1000 93: 93:
:89 93: -- 3rd neighbor 93: INSERT INTO tmp SELECT * FROM ( 93: SELECT 93: result.src as src, 93: graph.dst as dst, 93: result.src_label as src_label, 93: graph.dst_label as dst_label, 93: result.distance + graph.distance as distance, 93: steps + 1 93: FROM 93: result INNER JOIN graph ON result.dst = graph.src 93: ) WHERE distance = distance; -- filter null as we don't have is null func 93: Extra checks: ["explain:o"] 93: === OPTIMIZER === 93: Insert { table_oid=34 } 93: Filter { predicate=(#0.4=#0.4) } 93: Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } 93: HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } 93: SeqScan { table=result } 93: SeqScan { table=graph } 93: 93: [PASS] extra check: explain:o 93: --- YOUR RESULT --- 93: 9000 93: 93: --- EXPECTED RESULT --- 93: 9000 93: 93:
:105 93: INSERT INTO result SELECT * FROM tmp; DELETE FROM tmp; SELECT count(*) FROM result; 93: ---- 93: 9000 93: 9000 93: 10000 93: 93:
:108 93: -- 4th neighbor 93: INSERT INTO tmp SELECT * FROM ( 93: SELECT 93: result.src as src, 93: graph.dst as dst, 93: result.src_label as src_label, 93: graph.dst_label as dst_label, 93: result.distance + graph.distance as distance, 93: steps + 1 93: FROM 93: (SELECT * FROM result WHERE src = 1) INNER JOIN graph ON result.dst = graph.src 93: ) WHERE distance = distance; -- filter null as we don't have is null func 93: Extra checks: ["explain:o"] 93: === OPTIMIZER === 93: Insert { table_oid=34 } 93: Filter { predicate=(#0.4=#0.4) } 93: Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } 93: HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } 93: SeqScan { table=result, filter=(#0.0=1) } 93: SeqScan { table=graph } 93: 93: [PASS] extra check: explain:o 93: --- YOUR RESULT --- 93: 9000 93: 93: --- EXPECTED RESULT --- 93: 9000 93: 93:
:124 93: INSERT INTO result SELECT * FROM tmp; DELETE FROM tmp; SELECT count(*) FROM result; 93: ---- 93: 9000 93: 9000 93: 19000 93: 93:
:127 93: SELECT src, src_label, dst, dst_label, count(*), min(distance), max(distance), min(steps), max(steps) FROM result WHERE src = 1 GROUP BY src, src_label, dst, dst_label ORDER BY dst; 93: Extra checks: ["explain:o"] 93: === OPTIMIZER === 93: ExternalMergeSort { order_bys=[("Default", "Default", "#0.2")] } 93: Agg { types=["count_star", "min", "max", "min", "max"], aggregates=["1", "#0.4", "#0.4", "#0.5", "#0.5"], group_by=["#0.0", "#0.2", "#0.1", "#0.3"] } 93: SeqScan { table=result, filter=(#0.0=1) } 93: 93: [PASS] extra check: explain:o 93: --- YOUR RESULT --- 93: 1 100 0 0 1000 1 4 1 4 93: 1 100 1 100 1000 0 4 0 4 93: 1 100 2 200 1000 1 4 1 4 93: 1 100 3 300 1000 1 4 1 4 93: 1 100 4 400 1000 1 4 1 4 93: 1 100 5 500 1000 1 4 1 4 93: 1 100 6 600 1000 1 4 1 4 93: 1 100 7 700 1000 1 4 1 4 93: 1 100 8 800 1000 1 4 1 4 93: 1 100 9 900 1000 1 4 1 4 93: 93: --- EXPECTED RESULT --- 93: 1 100 0 0 1000 1 4 1 4 93: 1 100 1 100 1000 0 4 0 4 93: 1 100 2 200 1000 1 4 1 4 93: 1 100 3 300 1000 1 4 1 4 93: 1 100 4 400 1000 1 4 1 4 93: 1 100 5 500 1000 1 4 1 4 93: 1 100 6 600 1000 1 4 1 4 93: 1 100 7 700 1000 1 4 1 4 93: 1 100 8 800 1000 1 4 1 4 93: 1 100 9 900 1000 1 4 1 4 93: 19/19 Test #93: SQLLogicTest.p3.19-integration-2 ......... Passed 4.38 sec The following tests passed: SQLLogicTest.p3.01-seqscan SQLLogicTest.p3.02-insert SQLLogicTest.p3.03-update SQLLogicTest.p3.04-delete SQLLogicTest.p3.05-index-scan-btree SQLLogicTest.p3.06-empty-table SQLLogicTest.p3.07-simple-agg SQLLogicTest.p3.08-group-agg-1 SQLLogicTest.p3.09-group-agg-2 SQLLogicTest.p3.10-simple-join SQLLogicTest.p3.11-multi-way-join SQLLogicTest.p3.12-repeat-execute SQLLogicTest.p3.13-nested-index-join SQLLogicTest.p3.14-hash-join SQLLogicTest.p3.15-multi-way-hash-join SQLLogicTest.p3.16-sort-limit SQLLogicTest.p3.17-topn SQLLogicTest.p3.18-integration-1 SQLLogicTest.p3.19-integration-2 100% tests passed, 0 tests failed out of 19 Total Test time (real) = 20.10 sec >>> Running Direct bustub-sqllogictest runner on p3 suite: Running p3.00-primer.slt...
:1 Running p3.01-seqscan.slt...
:3
:17
:31
:45 Running p3.02-insert.slt...
:4
:8
:13
:23
:28
:43
:46
:51
:66
:71
:87
:92
:113
:117
:122 Running p3.03-update.slt...
:4
:8
:13
:23
:28
:39
:45
:60
:65
:80
:85
:99
:104 Running p3.04-delete.slt...
:4
:8
:13
:23
:28
:36
:41
:46
:51
:61
:66
:74
:79
:87
:92 Running p3.05-index-scan-btree.slt...
:4
:8
:11
:17
:20
:23
:26
:29
:38
:47
:52
:58
:63
:74
:85
:92
:97
:108
:119
:124
:131
:137
:142
:152
:162
:168
:173
:179
:184
:193
:203
:208
:213
:219
:224
:231
:238
:243
:248 Running p3.06-empty-table.slt...
:4
:8
:14
:20
:24
:30
:36
:42
:49
:55
:60 Running p3.07-simple-agg.slt...
:4
:12
:16
:21
:26
:31
:37
:41
:47
:53
:58
:63
:68
:73
:78 Running p3.08-group-agg-1.slt...
:6
:18
:27
:31
:36
:41
:55
:67
:81
:95
:103
:114
:122
:127 Running p3.09-group-agg-2.slt...
:3
:14
:19
:33
:38
:52
:61 Running p3.10-simple-join.slt...
:6
:9
:21
:31
:45
:48
:51
:54
:69
:72
:176
:179
:282
:285
:309
:323
:338
:344
:350
:357
:382
:385
:388
:391
:408
:420
:453
:496
:512
:538
:549
:555
:564
:570 Running p3.11-multi-way-join.slt...
:3
:6
:9
:12
:24
:55
:58
:161
:341
:344
:347
:350
:358
:367
:370 Running p3.12-repeat-execute.slt...
:4
:7
:14
:26
:35
:47
:50 Running p3.13-nested-index-join.slt...
:3
:6
:9
:113
:116
:219
:222
:246
:249
:252
:258
:276
:279
:282
:285
:301 Running p3.14-hash-join.slt...
:6
:19
:34
:38
:42
:57
:61
:165
:169
:272
:275
:280
:285
:288
:312
:326
:341
:347
:353
:359
:362
:365
:376
:379
:396
:428
:470
:485
:500
:527
:533
:542
:548
:555
:561
:567
:572
:575
:614 Running p3.15-multi-way-hash-join.slt...
:3
:6
:9
:21
:52
:55
:158
:338
:341
:344
:347
:355 Running p3.16-sort-limit.slt...
:6
:22
:32
:49
:53
:59
:68
:75
:82
:89
:96
:300
:303
:406
:462
:496
:522
:537
:561
:668
:696
:699
:902
:916 Running p3.17-topn.slt...
:4
:13
:27
:30
:134
:137
:240
:265
:289
:314
:338
:355 Running p3.18-integration-1.slt...
:12
:15
:18
:23
:43
:75
:119 Running p3.19-integration-2.slt...
:11
:15
:19
:23
:26
:31
:37
:51 === OPTIMIZER === Insert { table_oid=34 } Filter { predicate=(#0.4=#0.4) } Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } SeqScan { table=result } SeqScan { table=graph }
:67
:70 === OPTIMIZER === Insert { table_oid=34 } Filter { predicate=(#0.4=#0.4) } Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } SeqScan { table=result } SeqScan { table=graph }
:86
:89 === OPTIMIZER === Insert { table_oid=34 } Filter { predicate=(#0.4=#0.4) } Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } SeqScan { table=result } SeqScan { table=graph }
:105
:108 === OPTIMIZER === Insert { table_oid=34 } Filter { predicate=(#0.4=#0.4) } Projection { exprs=["#0.0", "#0.7", "#0.2", "#0.9", "(#0.4+#0.10)", "(#0.5+1)"] } HashJoin { type=Inner, left_key=["#0.1"], right_key=["#1.0"] } SeqScan { table=result, filter=(#0.0=1) } SeqScan { table=graph }
:124
:127 === OPTIMIZER === ExternalMergeSort { order_bys=[("Default", "Default", "#0.2")] } Agg { types=["count_star", "min", "max", "min", "max"], aggregates=["1", "#0.4", "#0.4", "#0.5", "#0.5"], group_by=["#0.0", "#0.2", "#0.1", "#0.3"] } SeqScan { table=result, filter=(#0.0=1) }