From 578821be6b2635eef7c4870b93c71f7bda4573ff Mon Sep 17 00:00:00 2001 From: Yuanxin Cao Date: Sun, 27 Oct 2024 14:56:26 -0400 Subject: [PATCH] Fall 2024 Project 3 sqllogictest --- test/sql/p3.00-primer.slt | 18 +- test/sql/p3.07-simple-agg.slt | 4 +- test/sql/p3.08-group-agg-1.slt | 5 +- test/sql/p3.10-simple-join.slt | 7 +- test/sql/p3.12-repeat-execute.slt | 2 +- test/sql/p3.13-nested-index-join.slt | 3 +- test/sql/p3.14-hash-join.slt | 9 +- test/sql/p3.16-sort-limit.slt | 661 +++++++++++++++++++-------- test/sql/p3.18-integration-1.slt | 28 +- test/sql/p3.19-integration-2.slt | 50 +- test/sql/p3.leaderboard-q1-index.slt | 27 ++ test/sql/p3.leaderboard-q1.slt | 42 +- test/sql/p3.leaderboard-q2.slt | 51 ++- test/sql/p3.leaderboard-q3.slt | 39 +- test/sql/p3.leaderboard-q4.slt | 3 - 15 files changed, 611 insertions(+), 338 deletions(-) create mode 100644 test/sql/p3.leaderboard-q1-index.slt delete mode 100644 test/sql/p3.leaderboard-q4.slt diff --git a/test/sql/p3.00-primer.slt b/test/sql/p3.00-primer.slt index a46e6f842..5cae87931 100644 --- a/test/sql/p3.00-primer.slt +++ b/test/sql/p3.00-primer.slt @@ -1,13 +1,11 @@ query rowsort -select github_id, office_hour from __mock_table_tas_2024; +select github_id, office_hour from __mock_table_tas_2024_fall; ---- -AlSchlo Friday -walkingcabbages Thursday -averyqi115 Friday -lanlou1554 Wednesday -sweetsuro Thursday -ChaosZhai Yesterday -SDTheSlayer Monday +17zhangw Wednesday +connortsui20 Thursday +J-HowHuang Tuesday +lanlou1554 Monday +prashanthduvvada Friday +unw9527 Thursday xx01cyx Tuesday -yliang412 Tuesday -thelongmarch-azx Monday +yashkothari42 Friday diff --git a/test/sql/p3.07-simple-agg.slt b/test/sql/p3.07-simple-agg.slt index 2e3d21f27..e62e7323f 100644 --- a/test/sql/p3.07-simple-agg.slt +++ b/test/sql/p3.07-simple-agg.slt @@ -2,9 +2,9 @@ # How many TAs are there in 2024 Spring? query -select count(*) from __mock_table_tas_2024; +select count(*) from __mock_table_tas_2024_fall; ---- -10 +8 # The real test process begins... diff --git a/test/sql/p3.08-group-agg-1.slt b/test/sql/p3.08-group-agg-1.slt index 15499e5cf..812f19bbd 100644 --- a/test/sql/p3.08-group-agg-1.slt +++ b/test/sql/p3.08-group-agg-1.slt @@ -4,12 +4,11 @@ # "rowsort" means that the order of result doesn't matter. query rowsort -select office_hour, count(*) from __mock_table_tas_2024 group by office_hour; +select office_hour, count(*) from __mock_table_tas_2024_fall group by office_hour; ---- Tuesday 2 Friday 2 -Monday 2 -Yesterday 1 +Monday 1 Wednesday 1 Thursday 2 diff --git a/test/sql/p3.10-simple-join.slt b/test/sql/p3.10-simple-join.slt index 0e9427825..a74d159d1 100644 --- a/test/sql/p3.10-simple-join.slt +++ b/test/sql/p3.10-simple-join.slt @@ -8,13 +8,12 @@ set force_optimizer_starter_rule=yes query rowsort select * from - __mock_table_tas_2024 inner join __mock_table_schedule + __mock_table_tas_2024_fall inner join __mock_table_schedule on office_hour = day_of_week where has_lecture = 1; ---- -lanlou1554 Wednesday Wednesday 1 -SDTheSlayer Monday Monday 1 -thelongmarch-azx Monday Monday 1 +lanlou1554 Monday Monday 1 +17zhangw Wednesday Wednesday 1 # The real test begins... diff --git a/test/sql/p3.12-repeat-execute.slt b/test/sql/p3.12-repeat-execute.slt index 861973296..9528301a1 100644 --- a/test/sql/p3.12-repeat-execute.slt +++ b/test/sql/p3.12-repeat-execute.slt @@ -1,4 +1,4 @@ -# 5 pts +# 4 pts # Put everything on the right side of NLJ statement ok diff --git a/test/sql/p3.13-nested-index-join.slt b/test/sql/p3.13-nested-index-join.slt index 080b8e89a..79681f6f5 100644 --- a/test/sql/p3.13-nested-index-join.slt +++ b/test/sql/p3.13-nested-index-join.slt @@ -1,5 +1,4 @@ -# --- NOT TESTED IN Fall 2023 --- -no test +# 6 pts statement ok set force_optimizer_starter_rule=yes diff --git a/test/sql/p3.14-hash-join.slt b/test/sql/p3.14-hash-join.slt index b3acaaab8..d7af39b4f 100644 --- a/test/sql/p3.14-hash-join.slt +++ b/test/sql/p3.14-hash-join.slt @@ -1,17 +1,16 @@ -# 5 pts +# 4 pts # Show office hours on lecture days # "rowsort" means that the order of result doesn't matter. query rowsort +ensure:hash_join select * from - __mock_table_tas_2024 inner join __mock_table_schedule + __mock_table_tas_2024_fall inner join __mock_table_schedule on office_hour = day_of_week where has_lecture = 1; ---- -SDTheSlayer Monday Monday 1 -thelongmarch-azx Monday Monday 1 -lanlou1554 Wednesday Wednesday 1 +lanlou1554 Monday Monday 1 +17zhangw Wednesday Wednesday 1 # The real test begins... diff --git a/test/sql/p3.16-sort-limit.slt b/test/sql/p3.16-sort-limit.slt index 951853cc5..f20801a34 100644 --- a/test/sql/p3.16-sort-limit.slt +++ b/test/sql/p3.16-sort-limit.slt @@ -1,37 +1,21 @@ -# 4 pts +# 10 pts # Simple sort # Default query -select * from __mock_table_tas_2024 order by office_hour, github_id; +select * from __mock_table_1 order by colB desc limit 10; ---- -AlSchlo Friday -averyqi115 Friday -SDTheSlayer Monday -thelongmarch-azx Monday -sweetsuro Thursday -walkingcabbages Thursday -xx01cyx Tuesday -yliang412 Tuesday -lanlou1554 Wednesday -ChaosZhai Yesterday - - -# ASC -query -select * from __mock_table_tas_2024 order by office_hour asc, github_id desc; ----- -averyqi115 Friday -AlSchlo Friday -thelongmarch-azx Monday -SDTheSlayer Monday -walkingcabbages Thursday -sweetsuro Thursday -yliang412 Tuesday -xx01cyx Tuesday -lanlou1554 Wednesday -ChaosZhai Yesterday +99 9900 +98 9800 +97 9700 +96 9600 +95 9500 +94 9400 +93 9300 +92 9200 +91 9100 +90 9000 # Simple limit @@ -63,114 +47,220 @@ select * from test_simple_seq_2 limit 15; # Harder Test with sort and limit statement ok -create table temp_1(colA int, colB int, colC int, colD int); +create table temp_1(col1 int, col2 int, col3 int, col4 int, col5 int, col6 int, col7 int, col8 int); + +# Select on empty table with sort +query +select * from temp_1 order by col1; +---- + statement ok insert into temp_1 values - (0 , 1, 6113, 48270), - (1 , 5, 8005, 22497), - (2 , 0, 4476, 73541), - (9 , 2, 2600, 32938), - (10, 8, 398 , 60977), - (11, 1, 5472, 33166), - (12, 3, 1107, 94947), - (13, 0, 4153, 54624), - (14, 3, 1907, 48515), - (15, 6, 9754, 95830), - (16, 8, 5252, 96696), - (3 , 2, 290 , 20860), - (4 , 0, 3362, 47696), - (5 , 8, 7022, 59586), - (6 , 2, 170 , 92798), - (7 , 2, 8524, 19746), - (8 , 8, 3074, 56174), - (17, 3, 4819, 99411), - (18, 9, 666 , 86073), - (19, 3, 701 , 34675), - (20, 2, 2307, 97170), - (28, 5, 8710, 194 ), - (29, 5, 5519, 4256 ), - (30, 0, 3803, 18357), - (31, 6, 219 , 2090 ), - (32, 2, 3842, 38160), - (33, 8, 991 , 24527), - (34, 4, 1443, 41478), - (35, 2, 7564, 14242), - (21, 4, 194 , 42522), - (22, 3, 4256, 54404), - (23, 7, 6037, 70355), - (24, 6, 1973, 98970), - (25, 3, 2090, 701 ), - (26, 2, 5392, 94519), - (27, 0, 8143, 47916), - (36, 6, 2269, 54671), - (37, 3, 3582, 77724), - (38, 2, 5267, 69339), - (39, 0, 1180, 94216), - (40, 6, 3158, 16603), - (41, 3, 4878, 85762), - (42, 1, 34 , 95622), - (43, 6, 9359, 1443 ), - (44, 0, 2173, 31618), - (45, 3, 9616, 67805), - (46, 2, 2006, 92368), - (47, 0, 6785, 75686), - (48, 6, 2696, 19966), - (49, 1, 3313, 70803), - (50, 7, 4001, 99484), - (51, 8, 9106, 28177), - (52, 1, 8312, 52310), - (58, 8, 483 , 86798), - (59, 6, 9742, 59516), - (60, 5, 4347, 34 ), - (61, 2, 9484, 25743), - (53, 1, 9567, 10624), - (54, 2, 6866, 15963), - (55, 1, 4956, 27755), - (56, 1, 4060, 16227), - (57, 9, 3683, 78077), - (62, 2, 9506, 13806), - (63, 2, 7758, 44219), - (64, 2, 1999, 83926), - (65, 3, 3886, 72321), - (66, 3, 8020, 97035), - (67, 0, 4633, 68232), - (68, 4, 2699, 52465), - (69, 8, 755 , 20385), - (70, 2, 8311, 59841), - (71, 4, 7826, 97071), - (72, 7, 7027, 29049), - (73, 9, 499 , 73848), - (74, 1, 9088, 12950), - (75, 3, 3517, 94485), - (76, 7, 4339, 25951), - (77, 2, 5801, 59170), - (85, 9, 849 , 11512), - (86, 3, 2697, 9484 ), - (87, 2, 3060, 25890), - (88, 2, 7329, 40526), - (89, 1, 9418, 34767), - (90, 9, 6826, 69422), - (91, 1, 1411, 8020 ), - (92, 9, 2110, 28695), - (78, 3, 5737, 59426), - (79, 3, 4299, 97298), - (80, 3, 7683, 21340), - (81, 0, 2045, 3683 ), - (82, 8, 5290, 98787), - (96, 1, 4733, 2699 ), - (97, 1, 2273, 63790), - (98, 3, 1394, 17139), - (99, 6, 4482, 57463), - (83, 3, 2914, 91662), - (84, 9, 4626, 92192), - (93, 4, 2758, 27498), - (94, 5, 8802, 70169), - (95, 9, 5706, 15441); + (196, 9, 79, 147, 766, 65018, 580420, 3460119), + (96, 9, 73, 674, 5266, 132, 141779, 9085955), + (5, 3, 21, 251, 2419, 4040, 454689, 8904729), + (87, 7, 29, 129, 5132, 30303, 378736, 2741233), + (18, 8, 10, 508, 1933, 54020, 125384, 813451), + (75, 2, 41, 901, 593, 14227, 586302, 462945), + (111, 3, 44, 700, 2024, 61402, 787437, 3015027), + (39, 9, 84, 243, 4208, 14273, 384043, 1263705), + (128, 6, 93, 735, 3749, 87702, 353590, 4995735), + (41, 7, 67, 859, 1630, 8890, 346654, 2642419), + (33, 2, 95, 120, 2284, 20382, 656992, 8703768), + (124, 8, 69, 351, 4670, 77529, 139759, 8776939), + (183, 5, 32, 390, 8718, 36152, 686749, 8919342), + (91, 3, 1, 613, 2964, 87648, 509069, 7536978), + (166, 8, 47, 552, 6515, 66148, 324278, 1957978), + (107, 3, 1, 594, 267, 7803, 11909, 366568), + (31, 0, 51, 921, 5840, 48429, 328862, 5960441), + (148, 0, 66, 139, 2130, 78439, 204429, 1286350), + (185, 9, 84, 831, 7327, 14708, 5597, 5096306), + (100, 3, 56, 856, 1409, 5704, 921859, 8296737), + (97, 1, 97, 644, 9674, 48009, 704186, 3668180), + (160, 8, 70, 571, 7936, 22902, 603269, 8680300), + (32, 9, 13, 285, 3097, 3996, 395731, 7687792), + (48, 8, 58, 516, 1321, 9104, 689086, 7547836), + (13, 7, 37, 597, 9695, 79132, 5913, 2729103), + (51, 2, 85, 748, 2277, 90946, 543930, 5704145), + (16, 7, 75, 814, 6433, 96606, 487369, 179266), + (131, 0, 95, 665, 6705, 68624, 389457, 1055001), + (110, 7, 94, 979, 7019, 26419, 268566, 9668807), + (108, 3, 1, 410, 6820, 33364, 580756, 1818944), + (156, 3, 48, 886, 4471, 7582, 242036, 5518578), + (14, 7, 84, 815, 9372, 76305, 936436, 5246864), + (168, 8, 7, 851, 2023, 46784, 687310, 4103789), + (158, 4, 58, 294, 2711, 93255, 610740, 3917117), + (176, 8, 34, 636, 7301, 47976, 569899, 9218292), + (189, 7, 13, 452, 8596, 94212, 682893, 9647479), + (151, 7, 94, 410, 6233, 91520, 940819, 7230491), + (102, 2, 72, 523, 4379, 94749, 544165, 348734), + (147, 6, 67, 708, 8020, 54656, 211346, 5425761), + (146, 6, 4, 393, 6835, 88911, 568402, 4590957), + (95, 0, 92, 180, 2635, 80737, 619176, 4947590), + (98, 2, 84, 36, 5383, 54686, 90558, 3135289), + (43, 2, 88, 577, 7009, 64800, 507828, 5295211), + (191, 3, 51, 117, 3103, 67268, 135031, 8950927), + (187, 1, 93, 803, 6104, 99815, 684391, 5519665), + (12, 5, 43, 767, 7501, 9636, 83576, 5070120), + (58, 4, 89, 871, 5347, 63473, 89035, 2890030), + (49, 1, 46, 286, 9426, 40720, 93086, 9399852), + (171, 1, 61, 381, 3526, 41471, 34075, 9185441), + (71, 0, 29, 448, 3800, 82369, 975429, 3874917), + (188, 1, 61, 916, 4058, 39604, 405586, 891694), + (133, 9, 66, 345, 4546, 17571, 408146, 8155891), + (80, 5, 48, 401, 6773, 66298, 835516, 5003483), + (65, 7, 46, 226, 4705, 84312, 973089, 4319545), + (132, 0, 44, 923, 7435, 1345, 783426, 5120786), + (55, 3, 99, 134, 63, 13196, 284220, 1931990), + (21, 3, 67, 366, 5218, 35569, 603781, 7963823), + (64, 3, 18, 562, 124, 82284, 413419, 7469541), + (115, 2, 57, 1, 2533, 10526, 806424, 6735507), + (86, 1, 72, 47, 1864, 37709, 250122, 7133555), + (165, 4, 80, 442, 2490, 73021, 924437, 7821936), + (59, 5, 90, 876, 4518, 71072, 16420, 6697862), + (123, 3, 92, 951, 9769, 96069, 331647, 2019560), + (19, 7, 8, 866, 3594, 59865, 860895, 1147124), + (37, 9, 44, 896, 6733, 59844, 347449, 4470115), + (145, 3, 21, 711, 223, 65113, 247776, 6286926), + (109, 5, 74, 631, 1617, 52223, 48765, 6012052), + (89, 2, 31, 525, 9975, 21923, 618183, 3074793), + (30, 8, 54, 165, 8934, 10717, 200689, 8326241), + (135, 0, 31, 533, 4479, 43225, 675685, 4584830), + (142, 8, 97, 665, 9823, 46844, 383619, 6444628), + (159, 5, 10, 347, 4333, 81149, 467131, 3495302), + (93, 4, 45, 49, 4327, 54773, 50210, 4033852), + (52, 6, 91, 411, 3138, 55061, 585468, 5056821), + (154, 6, 81, 983, 4486, 77159, 833103, 4968465), + (67, 3, 70, 226, 2823, 80004, 895654, 437490), + (60, 3, 61, 587, 3633, 53753, 972672, 9199994), + (155, 4, 62, 858, 1135, 34382, 494514, 2959301), + (61, 0, 21, 22, 5642, 21864, 313078, 9305193), + (24, 3, 74, 425, 117, 3468, 896998, 9109877), + (140, 1, 71, 21, 2828, 94610, 12838, 1212582), + (57, 5, 7, 617, 2743, 70578, 773995, 2744737), + (112, 8, 60, 77, 6057, 41809, 524022, 7077061), + (105, 5, 54, 290, 2563, 96935, 232157, 4499459), + (179, 7, 36, 79, 9115, 60534, 741330, 5927650), + (82, 4, 91, 302, 1292, 75026, 888084, 8742272), + (35, 3, 95, 13, 8753, 92210, 671499, 5205336), + (172, 9, 22, 546, 8088, 89284, 964185, 39966), + (198, 0, 99, 778, 1528, 52316, 726477, 8219397), + (121, 7, 81, 746, 3116, 71628, 235086, 5966098), + (77, 7, 89, 732, 5803, 94659, 898745, 7829986), + (73, 1, 27, 586, 1410, 43828, 466258, 1943103), + (0, 8, 5, 561, 9989, 87361, 494821, 5840702), + (162, 1, 42, 929, 9622, 39856, 518843, 9852745), + (116, 8, 77, 963, 5488, 30956, 928245, 7855578), + (68, 5, 52, 373, 1322, 7952, 755240, 4880763), + (120, 7, 16, 168, 6744, 9691, 204061, 4253805), + (23, 4, 5, 322, 7775, 4410, 961809, 3225009), + (1, 2, 31, 422, 4453, 7210, 206335, 2045026), + (137, 5, 1, 930, 6654, 83304, 304305, 9773858), + (186, 9, 78, 888, 7407, 52027, 924097, 8606329), + (53, 9, 42, 211, 9846, 61097, 684453, 4213854), + (169, 3, 81, 659, 3459, 2353, 207646, 9481338), + (9, 5, 93, 106, 5472, 88331, 755124, 9894953), + (177, 3, 37, 238, 8807, 29443, 358235, 7280614), + (7, 8, 11, 154, 8374, 74676, 497239, 7923921), + (27, 7, 8, 887, 4592, 68130, 997285, 8035102), + (193, 8, 65, 708, 9371, 99964, 37220, 3893300), + (126, 0, 98, 644, 8145, 5131, 900228, 86417), + (79, 9, 28, 823, 8590, 23300, 806801, 9298308), + (180, 4, 69, 230, 9161, 43700, 738588, 1671536), + (136, 9, 75, 565, 8630, 41623, 545551, 2020603), + (101, 5, 6, 338, 8983, 58203, 57330, 5788803), + (182, 6, 82, 244, 9558, 66182, 418917, 2008979), + (40, 4, 34, 178, 825, 60242, 621162, 8616326), + (84, 4, 47, 877, 3953, 83544, 622038, 4004697), + (106, 2, 40, 476, 1509, 76746, 787497, 5191618), + (90, 2, 96, 640, 8200, 91418, 944866, 8362182), + (143, 5, 34, 710, 1025, 13597, 292787, 1136995), + (10, 0, 97, 333, 1746, 98384, 770109, 7276590), + (22, 9, 4, 171, 8343, 36077, 87048, 4103074), + (125, 8, 37, 430, 8820, 88328, 137510, 2536831), + (167, 8, 36, 72, 6461, 4563, 892235, 4323669), + (88, 5, 21, 684, 6242, 16628, 688491, 2852785), + (127, 6, 94, 235, 9482, 23290, 494525, 32445), + (42, 6, 39, 379, 5631, 51474, 506563, 4082086), + (144, 5, 92, 158, 1891, 4846, 127501, 5091868), + (66, 8, 59, 388, 2509, 7229, 450773, 4992666), + (34, 7, 79, 669, 902, 89891, 435911, 1840339), + (81, 4, 4, 967, 1170, 92808, 244868, 6029276), + (25, 8, 35, 868, 8059, 52702, 124611, 2869517), + (175, 6, 71, 776, 4998, 92846, 340124, 915006), + (36, 1, 7, 485, 7138, 35984, 339740, 4215732), + (74, 7, 64, 386, 121, 77691, 547614, 3943836), + (3, 7, 23, 305, 3878, 93485, 43156, 3921438), + (129, 7, 59, 139, 2438, 98470, 904917, 7754852), + (149, 0, 52, 326, 7765, 24531, 959352, 7732143), + (163, 1, 68, 950, 8610, 35696, 579122, 3084354), + (153, 3, 68, 463, 5311, 94011, 82294, 1015581), + (11, 2, 76, 69, 8076, 81619, 312257, 1930656), + (46, 6, 9, 116, 5967, 41769, 283685, 4522930), + (161, 0, 63, 491, 2590, 14553, 151667, 1239028), + (152, 7, 66, 282, 4766, 22709, 526711, 7306101), + (170, 8, 55, 672, 3974, 45487, 823761, 428878), + (72, 2, 70, 903, 1712, 21708, 203630, 8093216), + (85, 4, 80, 75, 2539, 68936, 828987, 2365244), + (141, 6, 22, 289, 627, 56493, 111716, 2475428), + (99, 7, 11, 724, 3662, 46405, 260985, 6094229), + (17, 3, 8, 218, 7079, 29335, 522580, 1393348), + (138, 7, 44, 600, 8991, 26953, 187679, 2491217), + (114, 8, 32, 275, 6183, 44193, 380432, 1910962), + (173, 0, 83, 100, 3367, 16621, 640206, 2773136), + (50, 3, 46, 494, 6676, 50513, 230812, 8717166), + (139, 4, 84, 497, 7487, 66828, 809011, 3037040), + (150, 2, 98, 560, 6491, 73299, 766200, 2561789), + (54, 1, 92, 136, 7375, 1615, 874417, 8532832), + (62, 1, 52, 175, 7240, 70387, 28071, 3546585), + (92, 2, 86, 754, 8935, 77526, 810276, 1884535), + (194, 9, 84, 887, 8293, 57428, 13305, 4166625), + (117, 6, 55, 784, 4148, 32330, 182024, 9606542), + (104, 4, 74, 29, 8701, 73679, 99074, 6267512), + (63, 4, 4, 198, 9352, 99004, 734374, 7638195), + (118, 5, 61, 18, 6558, 77494, 823400, 7540500), + (83, 1, 1, 314, 128, 50974, 855262, 5617222), + (70, 9, 7, 631, 2287, 35350, 4649, 1123333), + (130, 3, 92, 678, 4290, 33394, 223241, 3461293), + (199, 9, 11, 91, 6896, 94319, 527602, 8222281), + (26, 1, 37, 126, 7323, 60028, 910446, 8299621), + (184, 1, 27, 665, 2372, 30282, 203725, 5814793), + (122, 9, 77, 585, 7558, 32215, 911472, 837405), + (44, 9, 19, 200, 2545, 70842, 89745, 3435765), + (103, 7, 93, 707, 2350, 18066, 780695, 5926799), + (78, 2, 36, 499, 7838, 6035, 419854, 6093766), + (94, 8, 58, 110, 4757, 42114, 598073, 9891358), + (134, 2, 25, 346, 9990, 97041, 996353, 6604388), + (195, 2, 47, 637, 2139, 66667, 317043, 4354233), + (56, 4, 8, 440, 7097, 29112, 428581, 405846), + (157, 6, 67, 789, 572, 52215, 294088, 3587193), + (20, 6, 88, 209, 7012, 96205, 849891, 8671682), + (28, 8, 92, 585, 2310, 41334, 545418, 1334792), + (4, 5, 2, 755, 2853, 34184, 414444, 171994), + (181, 3, 85, 915, 8122, 62571, 639142, 8752584), + (119, 5, 14, 618, 8072, 40581, 76034, 7244977), + (197, 9, 99, 623, 6246, 23617, 514078, 8376894), + (8, 0, 99, 699, 3253, 88194, 522672, 7341468), + (2, 9, 39, 499, 7022, 86936, 848301, 746939), + (192, 6, 74, 653, 2599, 52200, 760612, 7420299), + (190, 6, 44, 51, 184, 43594, 329767, 9381954), + (178, 0, 33, 773, 5278, 44429, 452382, 7142150), + (164, 5, 80, 615, 4826, 89334, 216827, 6267318), + (15, 4, 99, 43, 7336, 18702, 932476, 4751240), + (76, 3, 27, 181, 1112, 30392, 427843, 6401112), + (47, 7, 78, 119, 9233, 17182, 72665, 1921751), + (6, 8, 91, 259, 9318, 22573, 724639, 9856469), + (174, 7, 38, 163, 6614, 6389, 215981, 5410513), + (113, 5, 70, 719, 9300, 57448, 47709, 9456206), + (69, 7, 21, 434, 5673, 85399, 354546, 2362967), + (45, 4, 71, 397, 3677, 2556, 316835, 5636529), + (38, 1, 93, 307, 8805, 38987, 956976, 7329265), + (29, 1, 73, 173, 3972, 18059, 968740, 9895271); statement ok -create table temp_2(colA int, colB int, colC int); +create table temp_2(col1 int, col2 int, col3 int); statement ok insert into temp_2 values @@ -276,57 +366,97 @@ insert into temp_2 values (99, 722, 9); query -select colB, colD, colA, colC from temp_1 order by colB desc, colD, colA desc limit 20; +select col2, col4, col1, col3, col5, col6, col7, col8 from temp_1 order by col2 desc, col4, col1 desc limit 50; ---- -9 11512 85 849 -9 15441 95 5706 -9 28695 92 2110 -9 69422 90 6826 -9 73848 73 499 -9 78077 57 3683 -9 86073 18 666 -9 92192 84 4626 -8 20385 69 755 -8 24527 33 991 -8 28177 51 9106 -8 56174 8 3074 -8 59586 5 7022 -8 60977 10 398 -8 86798 58 483 -8 96696 16 5252 -8 98787 82 5290 -7 25951 76 4339 -7 29049 72 7027 -7 70355 23 6037 +9 91 199 11 6896 94319 527602 8222281 +9 147 196 79 766 65018 580420 3460119 +9 171 22 4 8343 36077 87048 4103074 +9 200 44 19 2545 70842 89745 3435765 +9 211 53 42 9846 61097 684453 4213854 +9 243 39 84 4208 14273 384043 1263705 +9 285 32 13 3097 3996 395731 7687792 +9 345 133 66 4546 17571 408146 8155891 +9 499 2 39 7022 86936 848301 746939 +9 546 172 22 8088 89284 964185 39966 +9 565 136 75 8630 41623 545551 2020603 +9 585 122 77 7558 32215 911472 837405 +9 623 197 99 6246 23617 514078 8376894 +9 631 70 7 2287 35350 4649 1123333 +9 674 96 73 5266 132 141779 9085955 +9 823 79 28 8590 23300 806801 9298308 +9 831 185 84 7327 14708 5597 5096306 +9 887 194 84 8293 57428 13305 4166625 +9 888 186 78 7407 52027 924097 8606329 +9 896 37 44 6733 59844 347449 4470115 +8 72 167 36 6461 4563 892235 4323669 +8 77 112 60 6057 41809 524022 7077061 +8 110 94 58 4757 42114 598073 9891358 +8 154 7 11 8374 74676 497239 7923921 +8 165 30 54 8934 10717 200689 8326241 +8 259 6 91 9318 22573 724639 9856469 +8 275 114 32 6183 44193 380432 1910962 +8 351 124 69 4670 77529 139759 8776939 +8 388 66 59 2509 7229 450773 4992666 +8 430 125 37 8820 88328 137510 2536831 +8 508 18 10 1933 54020 125384 813451 +8 516 48 58 1321 9104 689086 7547836 +8 552 166 47 6515 66148 324278 1957978 +8 561 0 5 9989 87361 494821 5840702 +8 571 160 70 7936 22902 603269 8680300 +8 585 28 92 2310 41334 545418 1334792 +8 636 176 34 7301 47976 569899 9218292 +8 665 142 97 9823 46844 383619 6444628 +8 672 170 55 3974 45487 823761 428878 +8 708 193 65 9371 99964 37220 3893300 +8 851 168 7 2023 46784 687310 4103789 +8 868 25 35 8059 52702 124611 2869517 +8 963 116 77 5488 30956 928245 7855578 +7 79 179 36 9115 60534 741330 5927650 +7 119 47 78 9233 17182 72665 1921751 +7 129 87 29 5132 30303 378736 2741233 +7 139 129 59 2438 98470 904917 7754852 +7 163 174 38 6614 6389 215981 5410513 +7 168 120 16 6744 9691 204061 4253805 +7 226 65 46 4705 84312 973089 4319545 query -select * from temp_1 order by colB desc, colA + colD - colA desc, colA asc limit 20; +select * from temp_1 order by col2 desc, col1 + col4 - col1 desc, col1 asc limit 30; ---- -84 9 4626 92192 -18 9 666 86073 -57 9 3683 78077 -73 9 499 73848 -90 9 6826 69422 -92 9 2110 28695 -95 9 5706 15441 -85 9 849 11512 -82 8 5290 98787 -16 8 5252 96696 -58 8 483 86798 -10 8 398 60977 -5 8 7022 59586 -8 8 3074 56174 -51 8 9106 28177 -33 8 991 24527 -69 8 755 20385 -50 7 4001 99484 -23 7 6037 70355 -72 7 7027 29049 +37 9 44 896 6733 59844 347449 4470115 +186 9 78 888 7407 52027 924097 8606329 +194 9 84 887 8293 57428 13305 4166625 +185 9 84 831 7327 14708 5597 5096306 +79 9 28 823 8590 23300 806801 9298308 +96 9 73 674 5266 132 141779 9085955 +70 9 7 631 2287 35350 4649 1123333 +197 9 99 623 6246 23617 514078 8376894 +122 9 77 585 7558 32215 911472 837405 +136 9 75 565 8630 41623 545551 2020603 +172 9 22 546 8088 89284 964185 39966 +2 9 39 499 7022 86936 848301 746939 +133 9 66 345 4546 17571 408146 8155891 +32 9 13 285 3097 3996 395731 7687792 +39 9 84 243 4208 14273 384043 1263705 +53 9 42 211 9846 61097 684453 4213854 +44 9 19 200 2545 70842 89745 3435765 +22 9 4 171 8343 36077 87048 4103074 +196 9 79 147 766 65018 580420 3460119 +199 9 11 91 6896 94319 527602 8222281 +116 8 77 963 5488 30956 928245 7855578 +25 8 35 868 8059 52702 124611 2869517 +168 8 7 851 2023 46784 687310 4103789 +193 8 65 708 9371 99964 37220 3893300 +170 8 55 672 3974 45487 823761 428878 +142 8 97 665 9823 46844 383619 6444628 +176 8 34 636 7301 47976 569899 9218292 +28 8 92 585 2310 41334 545418 1334792 +160 8 70 571 7936 22902 603269 8680300 +0 8 5 561 9989 87361 494821 5840702 query -select colA from (select colC, colA, colB, from temp_2 order by colC - colB + colA, colA limit 20); +select col1 from (select col3, col1, col2, from temp_2 order by col3 - col2 + col1, col1 limit 20); ---- 1 19 @@ -352,33 +482,174 @@ select colA from (select colC, colA, colB, from temp_2 order by colC - colB + co # Repeat query rowsort -select * from __mock_table_123, (select * from temp_1 order by colA desc limit 3); +select * from __mock_table_123, (select * from temp_1 order by col1 desc limit 3); ---- -1 99 6 4482 57463 -1 98 3 1394 17139 -1 97 1 2273 63790 -2 99 6 4482 57463 -2 98 3 1394 17139 -2 97 1 2273 63790 -3 99 6 4482 57463 -3 98 3 1394 17139 -3 97 1 2273 63790 +1 199 9 11 91 6896 94319 527602 8222281 +1 198 0 99 778 1528 52316 726477 8219397 +1 197 9 99 623 6246 23617 514078 8376894 +2 199 9 11 91 6896 94319 527602 8222281 +2 198 0 99 778 1528 52316 726477 8219397 +2 197 9 99 623 6246 23617 514078 8376894 +3 199 9 11 91 6896 94319 527602 8222281 +3 198 0 99 778 1528 52316 726477 8219397 +3 197 9 99 623 6246 23617 514078 8376894 # remember to enable your hash join optimizer to pass this # you could disable this ensure if you haven't implemented it yet query rowsort +ensure:hash_join select * from temp_2 t2 inner join - (select colB, colD, colA, colC from temp_1 order by colB desc, colD, colA desc limit 10 ) t1 - on t1.colA = t2.colA; + (select col2, col4, col1, col3 from temp_1 order by col2 desc, col4, col1 desc limit 30 ) t1 + on t1.col1 = t2.col1; +---- +22 387 2 9 171 22 4 +44 975 4 9 200 44 19 +53 770 3 9 211 53 42 +39 160 9 9 243 39 84 +32 666 2 9 285 32 13 +2 837 2 9 499 2 39 +70 107 0 9 631 70 7 +96 662 6 9 674 96 73 +79 125 9 9 823 79 28 +37 812 7 9 896 37 44 +94 377 4 8 110 94 58 +7 88 7 8 154 7 11 +30 132 0 8 165 30 54 +6 592 6 8 259 6 91 +66 529 6 8 388 66 59 + + +# Very large amount of data, spanning multiple sort pages in external merge sort +query +select * from __mock_external_merge_sort_input order by v2 desc, v3 asc limit 100; +---- +13222 14999 16 +28222 14999 31 +43222 14999 46 +58222 14999 61 +73222 14999 76 +88222 14999 91 +13221 14998 15 +28221 14998 30 +43221 14998 45 +58221 14998 60 +73221 14998 75 +88221 14998 90 +13220 14997 14 +28220 14997 29 +43220 14997 44 +58220 14997 59 +73220 14997 74 +88220 14997 89 +13219 14996 13 +28219 14996 28 +43219 14996 43 +58219 14996 58 +73219 14996 73 +88219 14996 88 +13218 14995 12 +28218 14995 27 +43218 14995 42 +58218 14995 57 +73218 14995 72 +88218 14995 87 +13217 14994 11 +28217 14994 26 +43217 14994 41 +58217 14994 56 +73217 14994 71 +88217 14994 86 +13216 14993 10 +28216 14993 25 +43216 14993 40 +58216 14993 55 +73216 14993 70 +88216 14993 85 +13215 14992 9 +28215 14992 24 +43215 14992 39 +58215 14992 54 +73215 14992 69 +88215 14992 84 +13214 14991 8 +28214 14991 23 +43214 14991 38 +58214 14991 53 +73214 14991 68 +88214 14991 83 +13213 14990 7 +28213 14990 22 +43213 14990 37 +58213 14990 52 +73213 14990 67 +88213 14990 82 +13212 14989 6 +28212 14989 21 +43212 14989 36 +58212 14989 51 +73212 14989 66 +88212 14989 81 +13211 14988 5 +28211 14988 20 +43211 14988 35 +58211 14988 50 +73211 14988 65 +88211 14988 80 +13210 14987 4 +28210 14987 19 +43210 14987 34 +58210 14987 49 +73210 14987 64 +88210 14987 79 +13209 14986 3 +28209 14986 18 +43209 14986 33 +58209 14986 48 +73209 14986 63 +88209 14986 78 +13208 14985 2 +28208 14985 17 +43208 14985 32 +58208 14985 47 +73208 14985 62 +88208 14985 77 +13207 14984 1 +28207 14984 16 +43207 14984 31 +58207 14984 46 +73207 14984 61 +88207 14984 76 +13206 14983 0 +28206 14983 15 +43206 14983 30 +58206 14983 45 + + +# remember to enable your hash join optimizer to pass this +# you could disable this ensure if you haven't implemented it yet +query rowsort +ensure:hash_join +select * from + (select * from __mock_external_merge_sort_input order by v1 + v2 limit 2000) t1 + inner join __mock_table_1 + on t1.v2 = __mock_table_1.colB; ---- -85 779 5 9 11512 85 849 -95 120 5 9 15441 95 5706 -92 815 2 9 28695 92 2110 -90 914 0 9 69422 90 6826 -73 782 3 9 73848 73 499 -57 346 7 9 78077 57 3683 -18 398 8 9 86073 18 666 -84 711 4 9 92192 84 4626 -69 603 9 8 20385 69 755 -33 701 3 8 24527 33 991 +23 1800 26 18 1800 +123 1900 15 19 1900 +223 2000 4 20 2000 +323 2100 104 21 2100 +423 2200 93 22 2200 +523 2300 82 23 2300 +623 2400 71 24 2400 +723 2500 60 25 2500 +823 2600 49 26 2600 +923 2700 38 27 2700 +1023 2800 27 28 2800 +1123 2900 16 29 2900 +1223 3000 5 30 3000 +1323 3100 105 31 3100 +1423 3200 94 32 3200 +1523 3300 83 33 3300 +1623 3400 72 34 3400 +1723 3500 61 35 3500 +1823 3600 50 36 3600 +1923 3700 39 37 3700 diff --git a/test/sql/p3.18-integration-1.slt b/test/sql/p3.18-integration-1.slt index 1168cb125..db4fa7f64 100644 --- a/test/sql/p3.18-integration-1.slt +++ b/test/sql/p3.18-integration-1.slt @@ -1,12 +1,16 @@ -# 10 pts +# 8 pts # This is something done by some TAs in some start-ups before. Once they got a wrong result # in a query, they split the query into parts so as to find which one goes wrong... # # This ultimate goal is to run an extra-complex query to compute the shortest path within x # steps from each of the vertex. We will start from the table scan. +# Note(f24): Make `src_label` and `dst_label` INTEGER because the current external merge sort implementation +# only supports sorting on fixed-length data. Should be VARCHAR(8) if var-length data sorting is supported in +# the future. + statement ok -CREATE TABLE graph(src int, dst int, src_label VARCHAR(8), dst_label VARCHAR(8), distance int); +CREATE TABLE graph(src int, dst int, src_label int, dst_label int, distance int); statement ok INSERT INTO graph SELECT * FROM __mock_graph; @@ -152,16 +156,16 @@ select * from ( ) group by src, dst, src_label, dst_label ) where src = 0 order by dst limit 10; ---- -0 0 000 000 4 -0 1 000 001 4 -0 2 000 002 4 -0 3 000 003 4 -0 4 000 004 4 -0 5 000 005 4 -0 6 000 006 4 -0 7 000 007 4 -0 8 000 008 4 -0 9 000 009 4 +0 0 0 0 4 +0 1 0 100 4 +0 2 0 200 4 +0 3 0 300 4 +0 4 0 400 4 +0 5 0 500 4 +0 6 0 600 4 +0 7 0 700 4 +0 8 0 800 4 +0 9 0 900 4 # In the future, we will construct some custom graphs with different link weight. # But for now, that's the end of the test! diff --git a/test/sql/p3.19-integration-2.slt b/test/sql/p3.19-integration-2.slt index 78ba6b9c8..0388e5a67 100644 --- a/test/sql/p3.19-integration-2.slt +++ b/test/sql/p3.19-integration-2.slt @@ -4,17 +4,21 @@ # This test is like how a data engineer works towards their goal. They query some data, # store it (materialize it), and query some more data again, until they reach their goal. +# Note(f24): Make `src_label` and `dst_label` INTEGER because the current external merge sort implementation +# only supports sorting on fixed-length data. Should be VARCHAR(8) if var-length data sorting is supported in +# the future. + statement ok -- still the graph :) -CREATE TABLE graph(src int, dst int, src_label VARCHAR(8), dst_label VARCHAR(8), distance int); +CREATE TABLE graph(src int, dst int, src_label int, dst_label int, distance int); statement ok -- and we materialize the result -CREATE TABLE result(src int, dst int, src_label VARCHAR(8), dst_label VARCHAR(8), distance int, steps int); +CREATE TABLE result(src int, dst int, src_label int, dst_label int, distance int, steps int); statement ok -- temp table (as we don't support union and insert into the table selected from) -CREATE TABLE tmp(src int, dst int, src_label VARCHAR(8), dst_label VARCHAR(8), distance int, steps int); +CREATE TABLE tmp(src int, dst int, src_label int, dst_label int, distance int, steps int); statement ok INSERT INTO graph SELECT * FROM __mock_graph; @@ -33,16 +37,16 @@ INSERT INTO result SELECT src, src as dst, src_label, src_label as dst_label, 0, query rowsort SELECT * FROM result; ---- -0 0 000 000 0 0 -1 1 001 001 0 0 -2 2 002 002 0 0 -3 3 003 003 0 0 -4 4 004 004 0 0 -5 5 005 005 0 0 -6 6 006 006 0 0 -7 7 007 007 0 0 -8 8 008 008 0 0 -9 9 009 009 0 0 +0 0 0 0 0 0 +1 1 100 100 0 0 +2 2 200 200 0 0 +3 3 300 300 0 0 +4 4 400 400 0 0 +5 5 500 500 0 0 +6 6 600 600 0 0 +7 7 700 700 0 0 +8 8 800 800 0 0 +9 9 900 900 0 0 query rowsort +explain:o -- 1st neighbor @@ -123,13 +127,13 @@ INSERT INTO result SELECT * FROM tmp; DELETE FROM tmp; SELECT count(*) FROM resu query rowsort +explain:o 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; ---- -1 001 0 000 1000 1 4 1 4 -1 001 1 001 1000 0 4 0 4 -1 001 2 002 1000 1 4 1 4 -1 001 3 003 1000 1 4 1 4 -1 001 4 004 1000 1 4 1 4 -1 001 5 005 1000 1 4 1 4 -1 001 6 006 1000 1 4 1 4 -1 001 7 007 1000 1 4 1 4 -1 001 8 008 1000 1 4 1 4 -1 001 9 009 1000 1 4 1 4 +1 100 0 0 1000 1 4 1 4 +1 100 1 100 1000 0 4 0 4 +1 100 2 200 1000 1 4 1 4 +1 100 3 300 1000 1 4 1 4 +1 100 4 400 1000 1 4 1 4 +1 100 5 500 1000 1 4 1 4 +1 100 6 600 1000 1 4 1 4 +1 100 7 700 1000 1 4 1 4 +1 100 8 800 1000 1 4 1 4 +1 100 9 900 1000 1 4 1 4 diff --git a/test/sql/p3.leaderboard-q1-index.slt b/test/sql/p3.leaderboard-q1-index.slt new file mode 100644 index 000000000..df4455d98 --- /dev/null +++ b/test/sql/p3.leaderboard-q1-index.slt @@ -0,0 +1,27 @@ +statement ok +create table t1(x int, y int, z int); + +statement ok +create index t1xy on t1(x, y); + +query +INSERT INTO t1 SELECT * FROM __mock_t1; +---- +1000000 + +statement ok +explain (o) select * from t1 where x >= 90 and y = 10; + +query rowsort +timing:x10:.q1 +select * from t1 where x >= 90 and y = 10; +---- +91 10 910010 +92 10 920010 +95 10 950010 +93 10 930010 +98 10 980010 +96 10 960010 +90 10 900010 +99 10 990010 +97 10 970010 +94 10 940010 diff --git a/test/sql/p3.leaderboard-q1.slt b/test/sql/p3.leaderboard-q1.slt index df4455d98..6981725fd 100644 --- a/test/sql/p3.leaderboard-q1.slt +++ b/test/sql/p3.leaderboard-q1.slt @@ -1,27 +1,21 @@ statement ok -create table t1(x int, y int, z int); +explain (o) select count(*), max(__mock_t4_1m.x), max(__mock_t4_1m.y), max(__mock_t5_1m.x), max(__mock_t5_1m.y), max(__mock_t6_1m.x), max(__mock_t6_1m.y) + from __mock_t4_1m, __mock_t5_1m, __mock_t6_1m + where (__mock_t4_1m.x = __mock_t5_1m.x) + and (__mock_t6_1m.y = __mock_t5_1m.y) + and (__mock_t4_1m.y >= 1000000) + and (__mock_t4_1m.y < 1500000) + and (__mock_t6_1m.x < 150000) + and (__mock_t6_1m.x >= 100000); -statement ok -create index t1xy on t1(x, y); - -query -INSERT INTO t1 SELECT * FROM __mock_t1; ----- -1000000 - -statement ok -explain (o) select * from t1 where x >= 90 and y = 10; - -query rowsort +timing:x10:.q1 -select * from t1 where x >= 90 and y = 10; +query +timing:x10:.q2 +select count(*), max(__mock_t4_1m.x), max(__mock_t4_1m.y), max(__mock_t5_1m.x), max(__mock_t5_1m.y), max(__mock_t6_1m.x), max(__mock_t6_1m.y) + from __mock_t4_1m, __mock_t5_1m, __mock_t6_1m + where (__mock_t4_1m.x = __mock_t5_1m.x) + and (__mock_t6_1m.y = __mock_t5_1m.y) + and (__mock_t4_1m.y >= 1000000) + and (__mock_t4_1m.y < 1500000) + and (__mock_t6_1m.x < 150000) + and (__mock_t6_1m.x >= 100000); ---- -91 10 910010 -92 10 920010 -95 10 950010 -93 10 930010 -98 10 980010 -96 10 960010 -90 10 900010 -99 10 990010 -97 10 970010 -94 10 940010 +400000 149999 1499990 149999 1499990 149999 1499990 diff --git a/test/sql/p3.leaderboard-q2.slt b/test/sql/p3.leaderboard-q2.slt index 6981725fd..07867767f 100644 --- a/test/sql/p3.leaderboard-q2.slt +++ b/test/sql/p3.leaderboard-q2.slt @@ -1,21 +1,36 @@ statement ok -explain (o) select count(*), max(__mock_t4_1m.x), max(__mock_t4_1m.y), max(__mock_t5_1m.x), max(__mock_t5_1m.y), max(__mock_t6_1m.x), max(__mock_t6_1m.y) - from __mock_t4_1m, __mock_t5_1m, __mock_t6_1m - where (__mock_t4_1m.x = __mock_t5_1m.x) - and (__mock_t6_1m.y = __mock_t5_1m.y) - and (__mock_t4_1m.y >= 1000000) - and (__mock_t4_1m.y < 1500000) - and (__mock_t6_1m.x < 150000) - and (__mock_t6_1m.x >= 100000); +explain (o) select v, d1, d2 from ( + select + v, max(v1) as d1, max(v1) + max(v1) + max(v2) as d2, + min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2) + from __mock_t7 left join (select v4 from __mock_t8 where 1 == 2) on v < v4 group by v +) -query +timing:x10:.q2 -select count(*), max(__mock_t4_1m.x), max(__mock_t4_1m.y), max(__mock_t5_1m.x), max(__mock_t5_1m.y), max(__mock_t6_1m.x), max(__mock_t6_1m.y) - from __mock_t4_1m, __mock_t5_1m, __mock_t6_1m - where (__mock_t4_1m.x = __mock_t5_1m.x) - and (__mock_t6_1m.y = __mock_t5_1m.y) - and (__mock_t4_1m.y >= 1000000) - and (__mock_t4_1m.y < 1500000) - and (__mock_t6_1m.x < 150000) - and (__mock_t6_1m.x >= 100000); +query rowsort ok +timing:x10:.q3 +select v, d1, d2 from ( + select + v, max(v1) as d1, max(v1) + max(v1) + max(v2) as d2, + min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2) + from __mock_t7 left join (select v4 from __mock_t8 where 1 == 2) on v < v4 group by v +) ---- -400000 149999 1499990 149999 1499990 149999 1499990 +19 999999 2999997 +15 999995 2999985 +16 999996 2999988 +14 999994 2999982 +17 999997 2999991 +13 999993 2999979 +18 999998 2999994 +12 999992 2999976 +11 999991 2999973 +10 999990 2999970 +9 999989 2999967 +7 999987 2999961 +8 999988 2999964 +6 999986 2999958 +5 999985 2999955 +3 999983 2999949 +4 999984 2999952 +2 999982 2999946 +1 999981 2999943 +0 999980 2999940 diff --git a/test/sql/p3.leaderboard-q3.slt b/test/sql/p3.leaderboard-q3.slt index 07867767f..86933563c 100644 --- a/test/sql/p3.leaderboard-q3.slt +++ b/test/sql/p3.leaderboard-q3.slt @@ -1,36 +1,3 @@ -statement ok -explain (o) select v, d1, d2 from ( - select - v, max(v1) as d1, max(v1) + max(v1) + max(v2) as d2, - min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2) - from __mock_t7 left join (select v4 from __mock_t8 where 1 == 2) on v < v4 group by v -) - -query rowsort ok +timing:x10:.q3 -select v, d1, d2 from ( - select - v, max(v1) as d1, max(v1) + max(v1) + max(v2) as d2, - min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2), min(v1), max(v2), min(v2), max(v1) + min(v1), max(v2) + min(v2) - from __mock_t7 left join (select v4 from __mock_t8 where 1 == 2) on v < v4 group by v -) ----- -19 999999 2999997 -15 999995 2999985 -16 999996 2999988 -14 999994 2999982 -17 999997 2999991 -13 999993 2999979 -18 999998 2999994 -12 999992 2999976 -11 999991 2999973 -10 999990 2999970 -9 999989 2999967 -7 999987 2999961 -8 999988 2999964 -6 999986 2999958 -5 999985 2999955 -3 999983 2999949 -4 999984 2999952 -2 999982 2999946 -1 999981 2999943 -0 999980 2999940 +query rowsort +timing:x20:.q1 +select * from __mock_t10 a join __mock_t11 b on a.x = b.x; +---- \ No newline at end of file diff --git a/test/sql/p3.leaderboard-q4.slt b/test/sql/p3.leaderboard-q4.slt deleted file mode 100644 index 86933563c..000000000 --- a/test/sql/p3.leaderboard-q4.slt +++ /dev/null @@ -1,3 +0,0 @@ -query rowsort +timing:x20:.q1 -select * from __mock_t10 a join __mock_t11 b on a.x = b.x; ----- \ No newline at end of file