update tpch regression test (#12687)
turn on all TPC-H sf1 test cases except Q2. Q2 caused dead loop in Join reorder. Will turn on Q2 after fix it.
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !q15 --
|
||||
8449 Supplier#000008449 Wp34zim9qYFbVctdW 20-469-856-8873 1772627.2087
|
||||
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !select --
|
||||
16.380778626
|
||||
|
||||
-- !select --
|
||||
16.380778626
|
||||
|
||||
36633
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q16.out
Normal file
36633
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q16.out
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,3 +2,6 @@
|
||||
-- !select --
|
||||
348406.054285714
|
||||
|
||||
-- !select --
|
||||
348406.054285714
|
||||
|
||||
|
||||
119
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q18.out
Normal file
119
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q18.out
Normal file
@ -0,0 +1,119 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !select --
|
||||
Customer#000128120 128120 4722021 1994-04-07 544089.09 323
|
||||
Customer#000144617 144617 3043270 1997-02-12 530604.44 317
|
||||
Customer#000013940 13940 2232932 1997-04-13 522720.61 304
|
||||
Customer#000066790 66790 2199712 1996-09-30 515531.82 327
|
||||
Customer#000046435 46435 4745607 1997-07-03 508047.99 309
|
||||
Customer#000015272 15272 3883783 1993-07-28 500241.33 302
|
||||
Customer#000146608 146608 3342468 1994-06-12 499794.58 303
|
||||
Customer#000096103 96103 5984582 1992-03-16 494398.79 312
|
||||
Customer#000024341 24341 1474818 1992-11-15 491348.26 302
|
||||
Customer#000137446 137446 5489475 1997-05-23 487763.25 311
|
||||
Customer#000107590 107590 4267751 1994-11-04 485141.38 301
|
||||
Customer#000050008 50008 2366755 1996-12-09 483891.26 302
|
||||
Customer#000015619 15619 3767271 1996-08-07 480083.96 318
|
||||
Customer#000077260 77260 1436544 1992-09-12 479499.43 307
|
||||
Customer#000109379 109379 5746311 1996-10-10 478064.11 302
|
||||
Customer#000054602 54602 5832321 1997-02-09 471220.08 307
|
||||
Customer#000105995 105995 2096705 1994-07-03 469692.58 307
|
||||
Customer#000148885 148885 2942469 1992-05-31 469630.44 313
|
||||
Customer#000114586 114586 551136 1993-05-19 469605.59 308
|
||||
Customer#000105260 105260 5296167 1996-09-06 469360.57 303
|
||||
Customer#000147197 147197 1263015 1997-02-02 467149.67 320
|
||||
Customer#000064483 64483 2745894 1996-07-04 466991.35 304
|
||||
Customer#000136573 136573 2761378 1996-05-31 461282.73 301
|
||||
Customer#000016384 16384 502886 1994-04-12 458378.92 312
|
||||
Customer#000117919 117919 2869152 1996-06-20 456815.92 317
|
||||
Customer#000012251 12251 735366 1993-11-24 455107.26 309
|
||||
Customer#000120098 120098 1971680 1995-06-14 453451.23 308
|
||||
Customer#000066098 66098 5007490 1992-08-07 453436.16 304
|
||||
Customer#000117076 117076 4290656 1997-02-05 449545.85 301
|
||||
Customer#000129379 129379 4720454 1997-06-07 448665.79 303
|
||||
Customer#000126865 126865 4702759 1994-11-07 447606.65 320
|
||||
Customer#000088876 88876 983201 1993-12-30 446717.46 304
|
||||
Customer#000036619 36619 4806726 1995-01-17 446704.09 328
|
||||
Customer#000141823 141823 2806245 1996-12-29 446269.12 310
|
||||
Customer#000053029 53029 2662214 1993-08-13 446144.49 302
|
||||
Customer#000018188 18188 3037414 1995-01-25 443807.22 308
|
||||
Customer#000066533 66533 29158 1995-10-21 443576.5 305
|
||||
Customer#000037729 37729 4134341 1995-06-29 441082.97 309
|
||||
Customer#000003566 3566 2329187 1998-01-04 439803.36 304
|
||||
Customer#000045538 45538 4527553 1994-05-22 436275.31 305
|
||||
Customer#000081581 81581 4739650 1995-11-04 435405.9 305
|
||||
Customer#000119989 119989 1544643 1997-09-20 434568.25 320
|
||||
Customer#000003680 3680 3861123 1998-07-03 433525.97 301
|
||||
Customer#000113131 113131 967334 1995-12-15 432957.75 301
|
||||
Customer#000141098 141098 565574 1995-09-24 430986.69 301
|
||||
Customer#000093392 93392 5200102 1997-01-22 425487.51 304
|
||||
Customer#000015631 15631 1845057 1994-05-12 419879.59 302
|
||||
Customer#000112987 112987 4439686 1996-09-17 418161.49 305
|
||||
Customer#000012599 12599 4259524 1998-02-12 415200.61 304
|
||||
Customer#000105410 105410 4478371 1996-03-05 412754.51 302
|
||||
Customer#000149842 149842 5156581 1994-05-30 411329.35 302
|
||||
Customer#000010129 10129 5849444 1994-03-21 409129.85 309
|
||||
Customer#000069904 69904 1742403 1996-10-19 408513 305
|
||||
Customer#000017746 17746 6882 1997-04-09 408446.93 303
|
||||
Customer#000013072 13072 1481925 1998-03-15 399195.47 301
|
||||
Customer#000082441 82441 857959 1994-02-07 382579.74 305
|
||||
Customer#000088703 88703 2995076 1994-01-30 363812.12 302
|
||||
|
||||
-- !select --
|
||||
Customer#000128120 128120 4722021 1994-04-07 544089.09 323
|
||||
Customer#000144617 144617 3043270 1997-02-12 530604.44 317
|
||||
Customer#000013940 13940 2232932 1997-04-13 522720.61 304
|
||||
Customer#000066790 66790 2199712 1996-09-30 515531.82 327
|
||||
Customer#000046435 46435 4745607 1997-07-03 508047.99 309
|
||||
Customer#000015272 15272 3883783 1993-07-28 500241.33 302
|
||||
Customer#000146608 146608 3342468 1994-06-12 499794.58 303
|
||||
Customer#000096103 96103 5984582 1992-03-16 494398.79 312
|
||||
Customer#000024341 24341 1474818 1992-11-15 491348.26 302
|
||||
Customer#000137446 137446 5489475 1997-05-23 487763.25 311
|
||||
Customer#000107590 107590 4267751 1994-11-04 485141.38 301
|
||||
Customer#000050008 50008 2366755 1996-12-09 483891.26 302
|
||||
Customer#000015619 15619 3767271 1996-08-07 480083.96 318
|
||||
Customer#000077260 77260 1436544 1992-09-12 479499.43 307
|
||||
Customer#000109379 109379 5746311 1996-10-10 478064.11 302
|
||||
Customer#000054602 54602 5832321 1997-02-09 471220.08 307
|
||||
Customer#000105995 105995 2096705 1994-07-03 469692.58 307
|
||||
Customer#000148885 148885 2942469 1992-05-31 469630.44 313
|
||||
Customer#000114586 114586 551136 1993-05-19 469605.59 308
|
||||
Customer#000105260 105260 5296167 1996-09-06 469360.57 303
|
||||
Customer#000147197 147197 1263015 1997-02-02 467149.67 320
|
||||
Customer#000064483 64483 2745894 1996-07-04 466991.35 304
|
||||
Customer#000136573 136573 2761378 1996-05-31 461282.73 301
|
||||
Customer#000016384 16384 502886 1994-04-12 458378.92 312
|
||||
Customer#000117919 117919 2869152 1996-06-20 456815.92 317
|
||||
Customer#000012251 12251 735366 1993-11-24 455107.26 309
|
||||
Customer#000120098 120098 1971680 1995-06-14 453451.23 308
|
||||
Customer#000066098 66098 5007490 1992-08-07 453436.16 304
|
||||
Customer#000117076 117076 4290656 1997-02-05 449545.85 301
|
||||
Customer#000129379 129379 4720454 1997-06-07 448665.79 303
|
||||
Customer#000126865 126865 4702759 1994-11-07 447606.65 320
|
||||
Customer#000088876 88876 983201 1993-12-30 446717.46 304
|
||||
Customer#000036619 36619 4806726 1995-01-17 446704.09 328
|
||||
Customer#000141823 141823 2806245 1996-12-29 446269.12 310
|
||||
Customer#000053029 53029 2662214 1993-08-13 446144.49 302
|
||||
Customer#000018188 18188 3037414 1995-01-25 443807.22 308
|
||||
Customer#000066533 66533 29158 1995-10-21 443576.5 305
|
||||
Customer#000037729 37729 4134341 1995-06-29 441082.97 309
|
||||
Customer#000003566 3566 2329187 1998-01-04 439803.36 304
|
||||
Customer#000045538 45538 4527553 1994-05-22 436275.31 305
|
||||
Customer#000081581 81581 4739650 1995-11-04 435405.9 305
|
||||
Customer#000119989 119989 1544643 1997-09-20 434568.25 320
|
||||
Customer#000003680 3680 3861123 1998-07-03 433525.97 301
|
||||
Customer#000113131 113131 967334 1995-12-15 432957.75 301
|
||||
Customer#000141098 141098 565574 1995-09-24 430986.69 301
|
||||
Customer#000093392 93392 5200102 1997-01-22 425487.51 304
|
||||
Customer#000015631 15631 1845057 1994-05-12 419879.59 302
|
||||
Customer#000112987 112987 4439686 1996-09-17 418161.49 305
|
||||
Customer#000012599 12599 4259524 1998-02-12 415200.61 304
|
||||
Customer#000105410 105410 4478371 1996-03-05 412754.51 302
|
||||
Customer#000149842 149842 5156581 1994-05-30 411329.35 302
|
||||
Customer#000010129 10129 5849444 1994-03-21 409129.85 309
|
||||
Customer#000069904 69904 1742403 1996-10-19 408513 305
|
||||
Customer#000017746 17746 6882 1997-04-09 408446.93 303
|
||||
Customer#000013072 13072 1481925 1998-03-15 399195.47 301
|
||||
Customer#000082441 82441 857959 1994-02-07 382579.74 305
|
||||
Customer#000088703 88703 2995076 1994-01-30 363812.12 302
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !select --
|
||||
3083843.0578
|
||||
|
||||
-- !select --
|
||||
3083843.0578
|
||||
|
||||
@ -187,3 +187,191 @@ Supplier#000009846 57sNwJJ3PtBDu,hMPP5QvpcOcSNRXn3PypJJrh
|
||||
Supplier#000009899 7XdpAHrzr1t,UQFZE
|
||||
Supplier#000009974 7wJ,J5DKcxSU4Kp1cQLpbcAvB5AsvKT
|
||||
|
||||
-- !select --
|
||||
Supplier#000000020 iybAE,RmTymrZVYaFZva2SH,j
|
||||
Supplier#000000091 YV45D7TkfdQanOOZ7q9QxkyGUapU1oOWU6q3
|
||||
Supplier#000000205 rF uV8d0JNEk
|
||||
Supplier#000000285 Br7e1nnt1yxrw6ImgpJ7YdhFDjuBf
|
||||
Supplier#000000287 7a9SP7qW5Yku5PvSg
|
||||
Supplier#000000354 w8fOo5W,aS
|
||||
Supplier#000000378 FfbhyCxWvcPrO8ltp9
|
||||
Supplier#000000402 i9Sw4DoyMhzhKXCH9By,AYSgmD
|
||||
Supplier#000000530 0qwCMwobKY OcmLyfRXlagA8ukENJv,
|
||||
Supplier#000000555 TfB,a5bfl3Ah 3Z 74GqnNs6zKVGM
|
||||
Supplier#000000640 mvvtlQKsTOsJj5Ihk7,cq
|
||||
Supplier#000000729 pqck2ppy758TQpZCUAjPvlU55K3QjfL7Bi
|
||||
Supplier#000000736 l6i2nMwVuovfKnuVgaSGK2rDy65DlAFLegiL7
|
||||
Supplier#000000761 zlSLelQUj2XrvTTFnv7WAcYZGvvMTx882d4
|
||||
Supplier#000000887 urEaTejH5POADP2ARrf
|
||||
Supplier#000000935 ij98czM 2KzWe7dDTOxB8sq0UfCdvrX
|
||||
Supplier#000000975 ,AC e,tBpNwKb5xMUzeohxlRn, hdZJo73gFQF8y
|
||||
Supplier#000001263 rQWr6nf8ZhB2TAiIDIvo5Io
|
||||
Supplier#000001367 42YSkFcAXMMcucsqeEefOE4HeCC
|
||||
Supplier#000001426 bPOCc086oFm8sLtS,fGrH
|
||||
Supplier#000001446 lch9HMNU1R7a0LIybsUodVknk6
|
||||
Supplier#000001500 wDmF5xLxtQch9ctVu,
|
||||
Supplier#000001602 uKNWIeafaM644
|
||||
Supplier#000001626 UhxNRzUu1dtFmp0
|
||||
Supplier#000001682 pXTkGxrTQVyH1Rr
|
||||
Supplier#000001700 7hMlCof1Y5zLFg
|
||||
Supplier#000001726 TeRY7TtTH24sEword7yAaSkjx8
|
||||
Supplier#000001730 Rc8e,1Pybn r6zo0VJIEiD0UD vhk
|
||||
Supplier#000001746 qWsendlOekQG1aW4uq06uQaCm51se8lirv7 hBRd
|
||||
Supplier#000001806 M934fuZSnLW
|
||||
Supplier#000001855 MWk6EAeozXb
|
||||
Supplier#000001931 FpJbMU2h6ZR2eBv8I9NIxF
|
||||
Supplier#000002022 dwebGX7Id2pc25YvY33
|
||||
Supplier#000002036 20ytTtVObjKUUI2WCB0A
|
||||
Supplier#000002096 kuxseyLtq QPLXxm9ZUrnB6Kkh92JtK5cQzzXNU
|
||||
Supplier#000002117 MRtkgKolHJ9Wh X9J,urANHKDzvjr
|
||||
Supplier#000002204 uYmlr46C06udCqanj0KiRsoTQakZsEyssL
|
||||
Supplier#000002218 nODZw5q4dx kp0K5
|
||||
Supplier#000002243 nSOEV3JeOU79
|
||||
Supplier#000002245 hz2qWXWVjOyKhqPYMoEwz6zFkrTaDM
|
||||
Supplier#000002282 ES21K9dxoW1I1TzWCj7ekdlNwSWnv1Z 6mQ,BKn
|
||||
Supplier#000002303 nCoWfpB6YOymbgOht7ltfklpkHl
|
||||
Supplier#000002331 WRh2w5WFvRg7Z0S1AvSvHCL
|
||||
Supplier#000002373 RzHSxOTQmElCjxIBiVA52Z JB58rJhPRylR
|
||||
Supplier#000002419 qydBQd14I5l5mVXa4fYY
|
||||
Supplier#000002571 JZUugz04c iJFLrlGsz9O N,W 1rVHNIReyq
|
||||
Supplier#000002585 CsPoKpw2QuTY4AV1NkWuttneIa4SN
|
||||
Supplier#000002629 0Bw,q5Zp8su9XrzoCngZ3cAEXZwZ
|
||||
Supplier#000002721 HVdFAN2JHMQSpKm
|
||||
Supplier#000002730 lIFxR4fzm31C6,muzJwl84z
|
||||
Supplier#000002775 yDclaDaBD4ihH
|
||||
Supplier#000002799 lwr, 6L3gdfc79PQut,4XO6nQsTJY63cAyYO
|
||||
Supplier#000002934 m,trBENywSArwg3DhB
|
||||
Supplier#000002941 Naddba 8YTEKekZyP0
|
||||
Supplier#000003028 jouzgX0WZjhNMWLaH4fy
|
||||
Supplier#000003095 HxON3jJhUi3zjt,r mTD
|
||||
Supplier#000003143 hdolgh608uTkHh7t6qfSqkifKaiFjnCH
|
||||
Supplier#000003185 hMa535Cbf2mj1Nw4OWOKWVrsK0VdDkJURrdjSIJe
|
||||
Supplier#000003189 DWdPxt7 RnkZv6VOByR0em
|
||||
Supplier#000003201 E87yws6I,t0qNs4QW7UzExKiJnJDZWue
|
||||
Supplier#000003213 pxrRP4irQ1VoyfQ,dTf3
|
||||
Supplier#000003275 9xO4nyJ2QJcX6vGf
|
||||
Supplier#000003288 EDdfNt7E5Uc,xLTupoIgYL4yY7ujh,
|
||||
Supplier#000003314 jnisU8MzqO4iUB3zsPcrysMw3DDUojS4q7LD
|
||||
Supplier#000003373 iy8VM48ynpc3N2OsBwAvhYakO2us9R1bi
|
||||
Supplier#000003421 Sh3dt9W5oeofFWovnFhrg,
|
||||
Supplier#000003422 DJoCEapUeBXoV1iYiCcPFQvzsTv2ZI960
|
||||
Supplier#000003441 zvFJIzS,oUuShHjpcX
|
||||
Supplier#000003590 sy79CMLxqb,Cbo
|
||||
Supplier#000003607 lNqFHQYjwSAkf
|
||||
Supplier#000003625 qY588W0Yk5iaUy1RXTgNrEKrMAjBYHcKs
|
||||
Supplier#000003723 jZEp0OEythCLcS OmJSrFtxJ66bMlzSp
|
||||
Supplier#000003849 KgbZEaRk,6Q3mWvwh6uptrs1KRUHg 0
|
||||
Supplier#000003894 vvGC rameLOk
|
||||
Supplier#000003941 Pmb05mQfBMS618O7WKqZJ 9vyv
|
||||
Supplier#000004059 umEYZSq9RJ2WEzdsv9meU8rmqwzVLRgiZwC
|
||||
Supplier#000004207 tF64pwiOM4IkWjN3mS,e06WuAjLx
|
||||
Supplier#000004236 dl,HPtJmGipxYsSqn9wmqkuWjst,mCeJ8O6T
|
||||
Supplier#000004278 bBddbpBxIVp Di9
|
||||
Supplier#000004281 1OwPHh Pgiyeus,iZS5eA23JDOipwk
|
||||
Supplier#000004304 hQCAz59k,HLlp2CKUrcBIL
|
||||
Supplier#000004346 S3076LEOwo
|
||||
Supplier#000004406 Ah0ZaLu6VwufPWUz,7kbXgYZhauEaHqGIg
|
||||
Supplier#000004430 yvSsKNSTL5HLXBET4luOsPNLxKzAMk
|
||||
Supplier#000004527 p pVXCnxgcklWF6A1o3OHY3qW6
|
||||
Supplier#000004655 67NqBc4 t3PG3F8aO IsqWNq4kGaPowYL
|
||||
Supplier#000004851 Rj,x6IgLT7kBL99nqp
|
||||
Supplier#000004871 ,phpt6AWEnUS8t4Avb50rFfdg7O9c6nU8xxv8eC5
|
||||
Supplier#000004884 42Z1uLye9nsn6aTGBNd dI8 x
|
||||
Supplier#000004975 GPq5PMKY6Wy
|
||||
Supplier#000005076 Xl7h9ifgvIHmqxFLgWfHK4Gjav BkP
|
||||
Supplier#000005195 Woi3b2ZaicPh ZSfu1EfXhE
|
||||
Supplier#000005256 Onc3t57VAMchm,pmoVLaU8bONni9NsuaM PzMMFz
|
||||
Supplier#000005257 f9g8SEHB7obMj3QXAjXS2vfYY22
|
||||
Supplier#000005300 gXG28YqpxU
|
||||
Supplier#000005323 tMCkdqbDoyNo8vMIkzjBqYexoRAuv,T6 qzcu
|
||||
Supplier#000005386 Ub6AAfHpWLWP
|
||||
Supplier#000005426 9Dz2OVT1q sb4BK71ljQ1XjPBYRPvO
|
||||
Supplier#000005465 63cYZenZBRZ613Q1FaoG0,smnC5zl9
|
||||
Supplier#000005484 saFdOR qW7AFY,3asPqiiAa11Mo22pCoN0BtPrKo
|
||||
Supplier#000005505 d2sbjG43KwMPX
|
||||
Supplier#000005506 On f5ypzoWgB
|
||||
Supplier#000005631 14TVrjlzo2SJEBYCDgpMwTlvwSqC
|
||||
Supplier#000005642 ZwKxAv3V40tW E8P7Qwu,zlu,kPsL
|
||||
Supplier#000005686 f2RBKec2T1NIi7yS M
|
||||
Supplier#000005730 5rkb0PSews HvxkL8JaD41UpnSF2cg8H1
|
||||
Supplier#000005736 2dq XTYhtYWSfp
|
||||
Supplier#000005737 dmEWcS32C3kx,d,B95 OmYn48
|
||||
Supplier#000005797 ,o,OebwRbSDmVl9gN9fpWPCiqB UogvlSR
|
||||
Supplier#000005875 lK,sYiGzB94hSyHy9xvSZFbVQNCZe2LXZuGbS
|
||||
Supplier#000005974 REhR5jE,lLusQXvf54SwYySgsSSVFhu
|
||||
Supplier#000006059 4m0cv8MwJ9yX2vlwI Z
|
||||
Supplier#000006065 UiI2Cy3W4Tu5sLk LuvXLRy6KihlGv
|
||||
Supplier#000006093 KJNUg1odUT2wtCS2s6PrH3D6fd
|
||||
Supplier#000006099 aZilwQKYDTVPoK
|
||||
Supplier#000006109 rY5gbfh3dKHnylcQUTPGCwnbe
|
||||
Supplier#000006217 RVN23SYT9jenUeaWGXUd
|
||||
Supplier#000006297 73VRDOO56GUCyvc40oYJ
|
||||
Supplier#000006435 xIgE69XszYbnO4Eon7cHHO8y
|
||||
Supplier#000006463 7 wkdj2EO49iotley2kmIM ADpLSszGV3RNWj
|
||||
Supplier#000006478 bQYPnj9lpmW3U
|
||||
Supplier#000006521 b9 2zjHzxR
|
||||
Supplier#000006642 N,CUclSqRLJcS8zQ
|
||||
Supplier#000006659 iTLsnvD8D2GzWNUv kRInwRjk5rDeEmfup1
|
||||
Supplier#000006669 NQ4Yryj624p7K53
|
||||
Supplier#000006748 rC,2rEn8gKDIS5Q0dJEoiF
|
||||
Supplier#000006761 n4jhxGMqB5prD1HhpLvwrWStOLlla
|
||||
Supplier#000006808 HGd2Xo 9nEcHJhZvXjXxWKIpApT
|
||||
Supplier#000006858 fnlINT885vBBhsWwTGiZ0o22thwGY16h GHJj21
|
||||
Supplier#000006946 To6Slo0GJTqcIvD
|
||||
Supplier#000006949 mLxYUJhsGcLtKe ,GFirNu183AvT
|
||||
Supplier#000007072 2tRyX9M1a 4Rcm57s779F1ANG9jlpK
|
||||
Supplier#000007098 G3j8g0KC4OcbAu2OVoPHrXQWMCUdjq8wgCHOExu
|
||||
Supplier#000007132 xonvn0KAQIL3p8kYk HC1FSSDSUSTC
|
||||
Supplier#000007135 ls DoKV7V5ulfQy9V
|
||||
Supplier#000007147 Xzb16kC63wmLVYexUEgB0hXFvHkjT5iPpq
|
||||
Supplier#000007160 TqDGBULB3cTqIT6FKDvm9BS4e4v,zwYiQPb
|
||||
Supplier#000007169 tEc95D2moN9S84nd55O,dlnW
|
||||
Supplier#000007278 I2ae3rS7KVF8GVHtB
|
||||
Supplier#000007365 51xhROLvQMJ05DndtZWt
|
||||
Supplier#000007398 V8eE6oZ00OFNU,
|
||||
Supplier#000007402 4UVv58ery1rjmqSR5
|
||||
Supplier#000007448 yhhpWiJi7EJ6Q5VCaQ
|
||||
Supplier#000007458 BYuucapYkptZl6fnd2QaDyZmI9gR1Ih16e
|
||||
Supplier#000007477 9m9j0wfhWzCvVHxkU,PpAxwSH0h
|
||||
Supplier#000007509 q8,V6LJRoHJjHcOuSG7aLTMg
|
||||
Supplier#000007561 rMcFg2530VC
|
||||
Supplier#000007616 R IovIqzDi3,QHnaqZk1xS4hGAgelhP4yj
|
||||
Supplier#000007760 JsPE18PvcdFTK
|
||||
Supplier#000007801 69fi,U1r6enUb
|
||||
Supplier#000007865 5cDGCS,T6N
|
||||
Supplier#000007885 u3sicchh5ZpyTUpN1cJKNcAoabIWgY
|
||||
Supplier#000007926 ErzCF80K9Uy
|
||||
Supplier#000007998 LnASFBfYRFOo9d6d,asBvVq9Lo2P
|
||||
Supplier#000008090 eonbJZvoDFYBNUinYfp6yERIg
|
||||
Supplier#000008224 TWxt9f,LVER
|
||||
Supplier#000008231 IK7eGw Yj90sTdpsP,vcqWxLB
|
||||
Supplier#000008243 2AyePMkDqmzVzjGTizXthFLo8h EiudCMxOmIIG
|
||||
Supplier#000008323 75I18sZmASwm POeheRMdj9tmpyeQ,BfCXN5BIAb
|
||||
Supplier#000008366 h778cEj14BuW9OEKlvPTWq4iwASR6EBBXN7zeS8
|
||||
Supplier#000008532 Uc29q4,5xVdDOF87UZrxhr4xWS0ihEUXuh
|
||||
Supplier#000008595 MH0iB73GQ3z UW3O DbCbqmc
|
||||
Supplier#000008610 SgVgP90vP452sUNTgzL9zKwXHXAzV6tV
|
||||
Supplier#000008683 gLuGcugfpJSeGQARnaHNCaWnGaqsNnjyl20
|
||||
Supplier#000008705 aE,trRNdPx,4yinTD9O3DebDIp
|
||||
Supplier#000008742 HmPlQEzKCPEcTUL14,kKq
|
||||
Supplier#000008841 I 85Lu1sekbg2xrSIzm0
|
||||
Supplier#000008872 8D 45GgxJO2OwwYP9S4AaXJKvDwPfLM
|
||||
Supplier#000008879 rDSA,D9oPM,65NMWEFrmGKAu
|
||||
Supplier#000008967 2kwEHyMG 7FwozNImAUE6mH0hYtqYculJM
|
||||
Supplier#000008972 w2vF6 D5YZO3visPXsqVfLADTK
|
||||
Supplier#000009032 qK,trB6Sdy4Dz1BRUFNy
|
||||
Supplier#000009043 57OPvKH4qyXIZ7IzYeCaw11a5N1Ki9f1WWmVQ,
|
||||
Supplier#000009278 RqYTzgxj93CLX 0mcYfCENOefD
|
||||
Supplier#000009326 XmiC,uy36B9,fb0zhcjaagiXQutg
|
||||
Supplier#000009430 igRqmneFt
|
||||
Supplier#000009549 h3RVchUf8MzY46IzbZ0ng09
|
||||
Supplier#000009601 51m637bO,Rw5DnHWFUvLacRx9
|
||||
Supplier#000009709 rRnCbHYgDgl9PZYnyWKVYSUW0vKg
|
||||
Supplier#000009753 wLhVEcRmd7PkJF4FBnGK7Z
|
||||
Supplier#000009799 4wNjXGa4OKWl
|
||||
Supplier#000009811 E3iuyq7UnZxU7oPZIe2Gu6
|
||||
Supplier#000009812 APFRMy3lCbgFga53n5t9DxzFPQPgnjrGt32
|
||||
Supplier#000009846 57sNwJJ3PtBDu,hMPP5QvpcOcSNRXn3PypJJrh
|
||||
Supplier#000009899 7XdpAHrzr1t,UQFZE
|
||||
Supplier#000009974 7wJ,J5DKcxSU4Kp1cQLpbcAvB5AsvKT
|
||||
|
||||
|
||||
205
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q21.out
Normal file
205
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q21.out
Normal file
@ -0,0 +1,205 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !select --
|
||||
Supplier#000002829 20
|
||||
Supplier#000005808 18
|
||||
Supplier#000000262 17
|
||||
Supplier#000000496 17
|
||||
Supplier#000002160 17
|
||||
Supplier#000002301 17
|
||||
Supplier#000002540 17
|
||||
Supplier#000003063 17
|
||||
Supplier#000005178 17
|
||||
Supplier#000008331 17
|
||||
Supplier#000002005 16
|
||||
Supplier#000002095 16
|
||||
Supplier#000005799 16
|
||||
Supplier#000005842 16
|
||||
Supplier#000006450 16
|
||||
Supplier#000006939 16
|
||||
Supplier#000009200 16
|
||||
Supplier#000009727 16
|
||||
Supplier#000000486 15
|
||||
Supplier#000000565 15
|
||||
Supplier#000001046 15
|
||||
Supplier#000001047 15
|
||||
Supplier#000001161 15
|
||||
Supplier#000001336 15
|
||||
Supplier#000001435 15
|
||||
Supplier#000003075 15
|
||||
Supplier#000003335 15
|
||||
Supplier#000005649 15
|
||||
Supplier#000006027 15
|
||||
Supplier#000006795 15
|
||||
Supplier#000006800 15
|
||||
Supplier#000006824 15
|
||||
Supplier#000007131 15
|
||||
Supplier#000007382 15
|
||||
Supplier#000008913 15
|
||||
Supplier#000009787 15
|
||||
Supplier#000000633 14
|
||||
Supplier#000001960 14
|
||||
Supplier#000002323 14
|
||||
Supplier#000002490 14
|
||||
Supplier#000002993 14
|
||||
Supplier#000003101 14
|
||||
Supplier#000004489 14
|
||||
Supplier#000005435 14
|
||||
Supplier#000005583 14
|
||||
Supplier#000005774 14
|
||||
Supplier#000007579 14
|
||||
Supplier#000008180 14
|
||||
Supplier#000008695 14
|
||||
Supplier#000009224 14
|
||||
Supplier#000000357 13
|
||||
Supplier#000000436 13
|
||||
Supplier#000000610 13
|
||||
Supplier#000000788 13
|
||||
Supplier#000000889 13
|
||||
Supplier#000001062 13
|
||||
Supplier#000001498 13
|
||||
Supplier#000002056 13
|
||||
Supplier#000002312 13
|
||||
Supplier#000002344 13
|
||||
Supplier#000002596 13
|
||||
Supplier#000002615 13
|
||||
Supplier#000002978 13
|
||||
Supplier#000003048 13
|
||||
Supplier#000003234 13
|
||||
Supplier#000003727 13
|
||||
Supplier#000003806 13
|
||||
Supplier#000004472 13
|
||||
Supplier#000005236 13
|
||||
Supplier#000005906 13
|
||||
Supplier#000006241 13
|
||||
Supplier#000006326 13
|
||||
Supplier#000006384 13
|
||||
Supplier#000006394 13
|
||||
Supplier#000006624 13
|
||||
Supplier#000006629 13
|
||||
Supplier#000006682 13
|
||||
Supplier#000006737 13
|
||||
Supplier#000006825 13
|
||||
Supplier#000007021 13
|
||||
Supplier#000007417 13
|
||||
Supplier#000007497 13
|
||||
Supplier#000007602 13
|
||||
Supplier#000008134 13
|
||||
Supplier#000008234 13
|
||||
Supplier#000009435 13
|
||||
Supplier#000009436 13
|
||||
Supplier#000009564 13
|
||||
Supplier#000009896 13
|
||||
Supplier#000000379 12
|
||||
Supplier#000000673 12
|
||||
Supplier#000000762 12
|
||||
Supplier#000000811 12
|
||||
Supplier#000000821 12
|
||||
Supplier#000001337 12
|
||||
Supplier#000001916 12
|
||||
Supplier#000001925 12
|
||||
Supplier#000002039 12
|
||||
Supplier#000002357 12
|
||||
Supplier#000002483 12
|
||||
|
||||
-- !select --
|
||||
Supplier#000002829 20
|
||||
Supplier#000005808 18
|
||||
Supplier#000000262 17
|
||||
Supplier#000000496 17
|
||||
Supplier#000002160 17
|
||||
Supplier#000002301 17
|
||||
Supplier#000002540 17
|
||||
Supplier#000003063 17
|
||||
Supplier#000005178 17
|
||||
Supplier#000008331 17
|
||||
Supplier#000002005 16
|
||||
Supplier#000002095 16
|
||||
Supplier#000005799 16
|
||||
Supplier#000005842 16
|
||||
Supplier#000006450 16
|
||||
Supplier#000006939 16
|
||||
Supplier#000009200 16
|
||||
Supplier#000009727 16
|
||||
Supplier#000000486 15
|
||||
Supplier#000000565 15
|
||||
Supplier#000001046 15
|
||||
Supplier#000001047 15
|
||||
Supplier#000001161 15
|
||||
Supplier#000001336 15
|
||||
Supplier#000001435 15
|
||||
Supplier#000003075 15
|
||||
Supplier#000003335 15
|
||||
Supplier#000005649 15
|
||||
Supplier#000006027 15
|
||||
Supplier#000006795 15
|
||||
Supplier#000006800 15
|
||||
Supplier#000006824 15
|
||||
Supplier#000007131 15
|
||||
Supplier#000007382 15
|
||||
Supplier#000008913 15
|
||||
Supplier#000009787 15
|
||||
Supplier#000000633 14
|
||||
Supplier#000001960 14
|
||||
Supplier#000002323 14
|
||||
Supplier#000002490 14
|
||||
Supplier#000002993 14
|
||||
Supplier#000003101 14
|
||||
Supplier#000004489 14
|
||||
Supplier#000005435 14
|
||||
Supplier#000005583 14
|
||||
Supplier#000005774 14
|
||||
Supplier#000007579 14
|
||||
Supplier#000008180 14
|
||||
Supplier#000008695 14
|
||||
Supplier#000009224 14
|
||||
Supplier#000000357 13
|
||||
Supplier#000000436 13
|
||||
Supplier#000000610 13
|
||||
Supplier#000000788 13
|
||||
Supplier#000000889 13
|
||||
Supplier#000001062 13
|
||||
Supplier#000001498 13
|
||||
Supplier#000002056 13
|
||||
Supplier#000002312 13
|
||||
Supplier#000002344 13
|
||||
Supplier#000002596 13
|
||||
Supplier#000002615 13
|
||||
Supplier#000002978 13
|
||||
Supplier#000003048 13
|
||||
Supplier#000003234 13
|
||||
Supplier#000003727 13
|
||||
Supplier#000003806 13
|
||||
Supplier#000004472 13
|
||||
Supplier#000005236 13
|
||||
Supplier#000005906 13
|
||||
Supplier#000006241 13
|
||||
Supplier#000006326 13
|
||||
Supplier#000006384 13
|
||||
Supplier#000006394 13
|
||||
Supplier#000006624 13
|
||||
Supplier#000006629 13
|
||||
Supplier#000006682 13
|
||||
Supplier#000006737 13
|
||||
Supplier#000006825 13
|
||||
Supplier#000007021 13
|
||||
Supplier#000007417 13
|
||||
Supplier#000007497 13
|
||||
Supplier#000007602 13
|
||||
Supplier#000008134 13
|
||||
Supplier#000008234 13
|
||||
Supplier#000009435 13
|
||||
Supplier#000009436 13
|
||||
Supplier#000009564 13
|
||||
Supplier#000009896 13
|
||||
Supplier#000000379 12
|
||||
Supplier#000000673 12
|
||||
Supplier#000000762 12
|
||||
Supplier#000000811 12
|
||||
Supplier#000000821 12
|
||||
Supplier#000001337 12
|
||||
Supplier#000001916 12
|
||||
Supplier#000001925 12
|
||||
Supplier#000002039 12
|
||||
Supplier#000002357 12
|
||||
Supplier#000002483 12
|
||||
|
||||
19
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q22.out
Normal file
19
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q22.out
Normal file
@ -0,0 +1,19 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !select --
|
||||
13 888 6737713.99
|
||||
17 861 6460573.72
|
||||
18 964 7236687.4
|
||||
23 892 6701457.95
|
||||
29 948 7158866.63
|
||||
30 909 6808436.13
|
||||
31 922 6806670.18
|
||||
|
||||
-- !select --
|
||||
13 888 6737713.99
|
||||
17 861 6460573.72
|
||||
18 964 7236687.4
|
||||
23 892 6701457.95
|
||||
29 948 7158866.63
|
||||
30 909 6808436.13
|
||||
31 922 6806670.18
|
||||
|
||||
9
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q8.out
Normal file
9
regression-test/data/tpch_sf1_p1/tpch_sf1/nereids/q8.out
Normal file
@ -0,0 +1,9 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !select --
|
||||
1995 0.03443589
|
||||
1996 0.041485521
|
||||
|
||||
-- !select --
|
||||
1995 0.03443589
|
||||
1996 0.041485521
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !q15 --
|
||||
8449 Supplier#000008449 Wp34zim9qYFbVctdW 20-469-856-8873 1772627.2087
|
||||
|
||||
|
||||
@ -1,62 +1,65 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// 100.00 * sum(case
|
||||
// when p_type like 'PROMO%'
|
||||
// then l_extendedprice * (1 - l_discount)
|
||||
// else 0
|
||||
// end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
|
||||
//from
|
||||
// lineitem,
|
||||
// part
|
||||
//where
|
||||
// l_partkey = p_partkey
|
||||
// and l_shipdate >= date '1995-09-01'
|
||||
// and l_shipdate < date '1995-09-01' + interval '1' month;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=8, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
// 100.00 * sum(case
|
||||
// when p_type like 'PROMO%'
|
||||
// then l_extendedprice * (1 - l_discount)
|
||||
// else 0
|
||||
// end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
|
||||
//from
|
||||
// part,
|
||||
// lineitem
|
||||
//where
|
||||
// l_partkey = p_partkey
|
||||
// and l_shipdate >= date '1995-09-01'
|
||||
// and l_shipdate < date '1995-09-01' + interval '1' month;
|
||||
//
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q14_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
|
||||
qt_select """
|
||||
select
|
||||
100.00 * sum(case
|
||||
when p_type like 'PROMO%'
|
||||
then l_extendedprice * (1 - l_discount)
|
||||
else 0
|
||||
end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
and l_shipdate >= date '1995-09-01'
|
||||
and l_shipdate < date '1995-09-01' + interval '1' month;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=8, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
100.00 * sum(case
|
||||
when p_type like 'PROMO%'
|
||||
then l_extendedprice * (1 - l_discount)
|
||||
else 0
|
||||
end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
|
||||
from
|
||||
part,
|
||||
lineitem
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
and l_shipdate >= date '1995-09-01'
|
||||
and l_shipdate < date '1995-09-01' + interval '1' month;
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -1,96 +1,99 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// p_brand,
|
||||
// p_type,
|
||||
// p_size,
|
||||
// count(distinct ps_suppkey) as supplier_cnt
|
||||
//from
|
||||
// partsupp,
|
||||
// part
|
||||
//where
|
||||
// p_partkey = ps_partkey
|
||||
// and p_brand <> 'Brand#45'
|
||||
// and p_type not like 'MEDIUM POLISHED%'
|
||||
// and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
|
||||
// and ps_suppkey not in (
|
||||
// select
|
||||
// s_suppkey
|
||||
// from
|
||||
// supplier
|
||||
// where
|
||||
// s_comment like '%Customer%Complaints%'
|
||||
// )
|
||||
//group by
|
||||
// p_brand,
|
||||
// p_type,
|
||||
// p_size
|
||||
//order by
|
||||
// supplier_cnt desc,
|
||||
// p_brand,
|
||||
// p_type,
|
||||
// p_size;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=8, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
// p_brand,
|
||||
// p_type,
|
||||
// p_size,
|
||||
// count(distinct ps_suppkey) as supplier_cnt
|
||||
//from
|
||||
// partsupp,
|
||||
// part
|
||||
//where
|
||||
// p_partkey = ps_partkey
|
||||
// and p_brand <> 'Brand#45'
|
||||
// and p_type not like 'MEDIUM POLISHED%'
|
||||
// and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
|
||||
// and ps_suppkey not in (
|
||||
// select
|
||||
// s_suppkey
|
||||
// from
|
||||
// supplier
|
||||
// where
|
||||
// s_comment like '%Customer%Complaints%'
|
||||
// )
|
||||
//group by
|
||||
// p_brand,
|
||||
// p_type,
|
||||
// p_size
|
||||
//order by
|
||||
// supplier_cnt desc,
|
||||
// p_brand,
|
||||
// p_type,
|
||||
// p_size;
|
||||
//
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q15_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
|
||||
qt_select """
|
||||
select
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size,
|
||||
count(distinct ps_suppkey) as supplier_cnt
|
||||
from
|
||||
partsupp,
|
||||
part
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and p_brand <> 'Brand#45'
|
||||
and p_type not like 'MEDIUM POLISHED%'
|
||||
and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
|
||||
and ps_suppkey not in (
|
||||
select
|
||||
s_suppkey
|
||||
from
|
||||
supplier
|
||||
where
|
||||
s_comment like '%Customer%Complaints%'
|
||||
)
|
||||
group by
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size
|
||||
order by
|
||||
supplier_cnt desc,
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=8, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size,
|
||||
count(distinct ps_suppkey) as supplier_cnt
|
||||
from
|
||||
partsupp,
|
||||
part
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and p_brand <> 'Brand#45'
|
||||
and p_type not like 'MEDIUM POLISHED%'
|
||||
and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
|
||||
and ps_suppkey not in (
|
||||
select
|
||||
s_suppkey
|
||||
from
|
||||
supplier
|
||||
where
|
||||
s_comment like '%Customer%Complaints%'
|
||||
)
|
||||
group by
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size
|
||||
order by
|
||||
supplier_cnt desc,
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size;
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -29,25 +29,25 @@ suite("tpch_sf1_q17_nereids") {
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
|
||||
// qt_select """
|
||||
// select
|
||||
// sum(l_extendedprice) / 7.0 as avg_yearly
|
||||
// from
|
||||
// lineitem,
|
||||
// part
|
||||
// where
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#23'
|
||||
// and p_container = 'MED BOX'
|
||||
// and l_quantity < (
|
||||
// select
|
||||
// 0.2 * avg(l_quantity)
|
||||
// from
|
||||
// lineitem
|
||||
// where
|
||||
// l_partkey = p_partkey
|
||||
// );
|
||||
// """
|
||||
qt_select """
|
||||
select
|
||||
sum(l_extendedprice) / 7.0 as avg_yearly
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#23'
|
||||
and p_container = 'MED BOX'
|
||||
and l_quantity < (
|
||||
select
|
||||
0.2 * avg(l_quantity)
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
);
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=1, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
@ -72,4 +72,4 @@ suite("tpch_sf1_q17_nereids") {
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,107 +1,109 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// c_name,
|
||||
// c_custkey,
|
||||
// o_orderkey,
|
||||
// o_orderdate,
|
||||
// o_totalprice,
|
||||
// sum(l_quantity)
|
||||
//from
|
||||
// customer,
|
||||
// orders,
|
||||
// lineitem
|
||||
//where
|
||||
// o_orderkey in (
|
||||
// select
|
||||
// l_orderkey
|
||||
// from
|
||||
// lineitem
|
||||
// group by
|
||||
// l_orderkey having
|
||||
// sum(l_quantity) > 300
|
||||
// )
|
||||
// and c_custkey = o_custkey
|
||||
// and o_orderkey = l_orderkey
|
||||
//group by
|
||||
// c_name,
|
||||
// c_custkey,
|
||||
// o_orderkey,
|
||||
// o_orderdate,
|
||||
// o_totalprice
|
||||
//order by
|
||||
// o_totalprice desc,
|
||||
// o_orderdate
|
||||
//limit 100;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
// c_name,
|
||||
// c_custkey,
|
||||
// t3.o_orderkey,
|
||||
// t3.o_orderdate,
|
||||
// t3.o_totalprice,
|
||||
// sum(t3.l_quantity)
|
||||
//from
|
||||
//customer join
|
||||
//(
|
||||
// select * from
|
||||
// lineitem join
|
||||
// (
|
||||
// select * from
|
||||
// orders left semi join
|
||||
// (
|
||||
// select
|
||||
// l_orderkey
|
||||
// from
|
||||
// lineitem
|
||||
// group by
|
||||
// l_orderkey having sum(l_quantity) > 300
|
||||
// ) t1
|
||||
// on o_orderkey = t1.l_orderkey
|
||||
// ) t2
|
||||
// on t2.o_orderkey = l_orderkey
|
||||
//) t3
|
||||
//on c_custkey = t3.o_custkey
|
||||
//group by
|
||||
// c_name,
|
||||
// c_custkey,
|
||||
// t3.o_orderkey,
|
||||
// t3.o_orderdate,
|
||||
// t3.o_totalprice
|
||||
//order by
|
||||
// t3.o_totalprice desc,
|
||||
// t3.o_orderdate
|
||||
//limit 100;
|
||||
//
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q18_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
qt_select """
|
||||
select
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
o_orderdate,
|
||||
o_totalprice,
|
||||
sum(l_quantity)
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
o_orderkey in (
|
||||
select
|
||||
l_orderkey
|
||||
from
|
||||
lineitem
|
||||
group by
|
||||
l_orderkey having
|
||||
sum(l_quantity) > 300
|
||||
)
|
||||
and c_custkey = o_custkey
|
||||
and o_orderkey = l_orderkey
|
||||
group by
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
o_orderdate,
|
||||
o_totalprice
|
||||
order by
|
||||
o_totalprice desc,
|
||||
o_orderdate
|
||||
limit 100;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
c_name,
|
||||
c_custkey,
|
||||
t3.o_orderkey,
|
||||
t3.o_orderdate,
|
||||
t3.o_totalprice,
|
||||
sum(t3.l_quantity)
|
||||
from
|
||||
customer join
|
||||
(
|
||||
select * from
|
||||
lineitem join
|
||||
(
|
||||
select * from
|
||||
orders left semi join
|
||||
(
|
||||
select
|
||||
l_orderkey
|
||||
from
|
||||
lineitem
|
||||
group by
|
||||
l_orderkey having sum(l_quantity) > 300
|
||||
) t1
|
||||
on o_orderkey = t1.l_orderkey
|
||||
) t2
|
||||
on t2.o_orderkey = l_orderkey
|
||||
) t3
|
||||
on c_custkey = t3.o_custkey
|
||||
group by
|
||||
c_name,
|
||||
c_custkey,
|
||||
t3.o_orderkey,
|
||||
t3.o_orderdate,
|
||||
t3.o_totalprice
|
||||
order by
|
||||
t3.o_totalprice desc,
|
||||
t3.o_orderdate
|
||||
limit 100;
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -1,105 +1,107 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
//from
|
||||
// lineitem,
|
||||
// part
|
||||
//where
|
||||
// (
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#12'
|
||||
// and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
|
||||
// and l_quantity >= 1 and l_quantity <= 1 + 10
|
||||
// and p_size between 1 and 5
|
||||
// and l_shipmode in ('AIR', 'AIR REG')
|
||||
// and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
// )
|
||||
// or
|
||||
// (
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#23'
|
||||
// and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
|
||||
// and l_quantity >= 10 and l_quantity <= 10 + 10
|
||||
// and p_size between 1 and 10
|
||||
// and l_shipmode in ('AIR', 'AIR REG')
|
||||
// and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
// )
|
||||
// or
|
||||
// (
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#34'
|
||||
// and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
|
||||
// and l_quantity >= 20 and l_quantity <= 20 + 10
|
||||
// and p_size between 1 and 15
|
||||
// and l_shipmode in ('AIR', 'AIR REG')
|
||||
// and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
// );
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=2, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=false, enable_projection=true) */
|
||||
// sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
//from
|
||||
// lineitem,
|
||||
// part
|
||||
//where
|
||||
// (
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#12'
|
||||
// and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
|
||||
// and l_quantity >= 1 and l_quantity <= 1 + 10
|
||||
// and p_size between 1 and 5
|
||||
// and l_shipmode in ('AIR', 'AIR REG')
|
||||
// and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
// )
|
||||
// or
|
||||
// (
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#23'
|
||||
// and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
|
||||
// and l_quantity >= 10 and l_quantity <= 10 + 10
|
||||
// and p_size between 1 and 10
|
||||
// and l_shipmode in ('AIR', 'AIR REG')
|
||||
// and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
// )
|
||||
// or
|
||||
// (
|
||||
// p_partkey = l_partkey
|
||||
// and p_brand = 'Brand#34'
|
||||
// and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
|
||||
// and l_quantity >= 20 and l_quantity <= 20 + 10
|
||||
// and p_size between 1 and 15
|
||||
// and l_shipmode in ('AIR', 'AIR REG')
|
||||
// and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
// );
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q19_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
qt_select """
|
||||
select
|
||||
sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
(
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#12'
|
||||
and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
|
||||
and l_quantity >= 1 and l_quantity <= 1 + 10
|
||||
and p_size between 1 and 5
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#23'
|
||||
and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
|
||||
and l_quantity >= 10 and l_quantity <= 10 + 10
|
||||
and p_size between 1 and 10
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#34'
|
||||
and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
|
||||
and l_quantity >= 20 and l_quantity <= 20 + 10
|
||||
and p_size between 1 and 15
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
);
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=2, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=false, enable_projection=true) */
|
||||
sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
(
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#12'
|
||||
and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
|
||||
and l_quantity >= 1 and l_quantity <= 1 + 10
|
||||
and p_size between 1 and 5
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#23'
|
||||
and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
|
||||
and l_quantity >= 10 and l_quantity <= 10 + 10
|
||||
and p_size between 1 and 10
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#34'
|
||||
and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
|
||||
and l_quantity >= 20 and l_quantity <= 20 + 10
|
||||
and p_size between 1 and 15
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
);
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -17,82 +17,84 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// s_name,
|
||||
// s_address
|
||||
//from
|
||||
// supplier,
|
||||
// nation
|
||||
//where
|
||||
// s_suppkey in (
|
||||
// select
|
||||
// ps_suppkey
|
||||
// from
|
||||
// partsupp
|
||||
// where
|
||||
// ps_partkey in (
|
||||
// select
|
||||
// p_partkey
|
||||
// from
|
||||
// part
|
||||
// where
|
||||
// p_name like 'forest%'
|
||||
// )
|
||||
// and ps_availqty > (
|
||||
// select
|
||||
// 0.5 * sum(l_quantity)
|
||||
// from
|
||||
// lineitem
|
||||
// where
|
||||
// l_partkey = ps_partkey
|
||||
// and l_suppkey = ps_suppkey
|
||||
// and l_shipdate >= date '1994-01-01'
|
||||
// and l_shipdate < date '1994-01-01' + interval '1' year
|
||||
// )
|
||||
// )
|
||||
// and s_nationkey = n_nationkey
|
||||
// and n_name = 'CANADA'
|
||||
//order by
|
||||
// s_name;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
//s_name, s_address from
|
||||
//supplier left semi join
|
||||
//(
|
||||
// select * from
|
||||
// (
|
||||
// select l_partkey,l_suppkey, 0.5 * sum(l_quantity) as l_q
|
||||
// from lineitem
|
||||
// where l_shipdate >= date '1994-01-01'
|
||||
// and l_shipdate < date '1994-01-01' + interval '1' year
|
||||
// group by l_partkey,l_suppkey
|
||||
// ) t2 join
|
||||
// (
|
||||
// select ps_partkey, ps_suppkey, ps_availqty
|
||||
// from partsupp left semi join part
|
||||
// on ps_partkey = p_partkey and p_name like 'forest%'
|
||||
// ) t1
|
||||
// on t2.l_partkey = t1.ps_partkey and t2.l_suppkey = t1.ps_suppkey
|
||||
// and t1.ps_availqty > t2.l_q
|
||||
//) t3
|
||||
//on s_suppkey = t3.ps_suppkey
|
||||
//join nation
|
||||
//where s_nationkey = n_nationkey
|
||||
// and n_name = 'CANADA'
|
||||
//order by s_name;
|
||||
//
|
||||
// """
|
||||
//
|
||||
//}
|
||||
suite("tpch_sf1_q20_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
qt_select """
|
||||
select
|
||||
s_name,
|
||||
s_address
|
||||
from
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
s_suppkey in (
|
||||
select
|
||||
ps_suppkey
|
||||
from
|
||||
partsupp
|
||||
where
|
||||
ps_partkey in (
|
||||
select
|
||||
p_partkey
|
||||
from
|
||||
part
|
||||
where
|
||||
p_name like 'forest%'
|
||||
)
|
||||
and ps_availqty > (
|
||||
select
|
||||
0.5 * sum(l_quantity)
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_partkey = ps_partkey
|
||||
and l_suppkey = ps_suppkey
|
||||
and l_shipdate >= date '1994-01-01'
|
||||
and l_shipdate < date '1994-01-01' + interval '1' year
|
||||
)
|
||||
)
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'CANADA'
|
||||
order by
|
||||
s_name;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
s_name, s_address from
|
||||
supplier left semi join
|
||||
(
|
||||
select * from
|
||||
(
|
||||
select l_partkey,l_suppkey, 0.5 * sum(l_quantity) as l_q
|
||||
from lineitem
|
||||
where l_shipdate >= date '1994-01-01'
|
||||
and l_shipdate < date '1994-01-01' + interval '1' year
|
||||
group by l_partkey,l_suppkey
|
||||
) t2 join
|
||||
(
|
||||
select ps_partkey, ps_suppkey, ps_availqty
|
||||
from partsupp left semi join part
|
||||
on ps_partkey = p_partkey and p_name like 'forest%'
|
||||
) t1
|
||||
on t2.l_partkey = t1.ps_partkey and t2.l_suppkey = t1.ps_suppkey
|
||||
and t1.ps_availqty > t2.l_q
|
||||
) t3
|
||||
on s_suppkey = t3.ps_suppkey
|
||||
join nation
|
||||
where s_nationkey = n_nationkey
|
||||
and n_name = 'CANADA'
|
||||
order by s_name;
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -1,108 +1,110 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// s_name,
|
||||
// count(*) as numwait
|
||||
//from
|
||||
// supplier,
|
||||
// lineitem l1,
|
||||
// orders,
|
||||
// nation
|
||||
//where
|
||||
// s_suppkey = l1.l_suppkey
|
||||
// and o_orderkey = l1.l_orderkey
|
||||
// and o_orderstatus = 'F'
|
||||
// and l1.l_receiptdate > l1.l_commitdate
|
||||
// and exists (
|
||||
// select
|
||||
// *
|
||||
// from
|
||||
// lineitem l2
|
||||
// where
|
||||
// l2.l_orderkey = l1.l_orderkey
|
||||
// and l2.l_suppkey <> l1.l_suppkey
|
||||
// )
|
||||
// and not exists (
|
||||
// select
|
||||
// *
|
||||
// from
|
||||
// lineitem l3
|
||||
// where
|
||||
// l3.l_orderkey = l1.l_orderkey
|
||||
// and l3.l_suppkey <> l1.l_suppkey
|
||||
// and l3.l_receiptdate > l3.l_commitdate
|
||||
// )
|
||||
// and s_nationkey = n_nationkey
|
||||
// and n_name = 'SAUDI ARABIA'
|
||||
//group by
|
||||
// s_name
|
||||
//order by
|
||||
// numwait desc,
|
||||
// s_name
|
||||
//limit 100;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
//s_name, count(*) as numwait
|
||||
//from orders join
|
||||
//(
|
||||
// select * from
|
||||
// lineitem l2 right semi join
|
||||
// (
|
||||
// select * from
|
||||
// lineitem l3 right anti join
|
||||
// (
|
||||
// select * from
|
||||
// lineitem l1 join
|
||||
// (
|
||||
// select * from
|
||||
// supplier join nation
|
||||
// where s_nationkey = n_nationkey
|
||||
// and n_name = 'SAUDI ARABIA'
|
||||
// ) t1
|
||||
// where t1.s_suppkey = l1.l_suppkey and l1.l_receiptdate > l1.l_commitdate
|
||||
// ) t2
|
||||
// on l3.l_orderkey = t2.l_orderkey and l3.l_suppkey <> t2.l_suppkey and l3.l_receiptdate > l3.l_commitdate
|
||||
// ) t3
|
||||
// on l2.l_orderkey = t3.l_orderkey and l2.l_suppkey <> t3.l_suppkey
|
||||
//) t4
|
||||
//on o_orderkey = t4.l_orderkey and o_orderstatus = 'F'
|
||||
//group by
|
||||
// t4.s_name
|
||||
//order by
|
||||
// numwait desc,
|
||||
// t4.s_name
|
||||
//limit 100;
|
||||
//
|
||||
//
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q21_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
qt_select """
|
||||
select
|
||||
s_name,
|
||||
count(*) as numwait
|
||||
from
|
||||
supplier,
|
||||
lineitem l1,
|
||||
orders,
|
||||
nation
|
||||
where
|
||||
s_suppkey = l1.l_suppkey
|
||||
and o_orderkey = l1.l_orderkey
|
||||
and o_orderstatus = 'F'
|
||||
and l1.l_receiptdate > l1.l_commitdate
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem l2
|
||||
where
|
||||
l2.l_orderkey = l1.l_orderkey
|
||||
and l2.l_suppkey <> l1.l_suppkey
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem l3
|
||||
where
|
||||
l3.l_orderkey = l1.l_orderkey
|
||||
and l3.l_suppkey <> l1.l_suppkey
|
||||
and l3.l_receiptdate > l3.l_commitdate
|
||||
)
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'SAUDI ARABIA'
|
||||
group by
|
||||
s_name
|
||||
order by
|
||||
numwait desc,
|
||||
s_name
|
||||
limit 100;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
s_name, count(*) as numwait
|
||||
from orders join
|
||||
(
|
||||
select * from
|
||||
lineitem l2 right semi join
|
||||
(
|
||||
select * from
|
||||
lineitem l3 right anti join
|
||||
(
|
||||
select * from
|
||||
lineitem l1 join
|
||||
(
|
||||
select * from
|
||||
supplier join nation
|
||||
where s_nationkey = n_nationkey
|
||||
and n_name = 'SAUDI ARABIA'
|
||||
) t1
|
||||
where t1.s_suppkey = l1.l_suppkey and l1.l_receiptdate > l1.l_commitdate
|
||||
) t2
|
||||
on l3.l_orderkey = t2.l_orderkey and l3.l_suppkey <> t2.l_suppkey and l3.l_receiptdate > l3.l_commitdate
|
||||
) t3
|
||||
on l2.l_orderkey = t3.l_orderkey and l2.l_suppkey <> t3.l_suppkey
|
||||
) t4
|
||||
on o_orderkey = t4.l_orderkey and o_orderstatus = 'F'
|
||||
group by
|
||||
t4.s_name
|
||||
order by
|
||||
numwait desc,
|
||||
t4.s_name
|
||||
limit 100;
|
||||
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -1,109 +1,111 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// cntrycode,
|
||||
// count(*) as numcust,
|
||||
// sum(c_acctbal) as totacctbal
|
||||
//from
|
||||
// (
|
||||
// select
|
||||
// substring(c_phone, 1, 2) as cntrycode,
|
||||
// c_acctbal
|
||||
// from
|
||||
// customer
|
||||
// where
|
||||
// substring(c_phone, 1, 2) in
|
||||
// ('13', '31', '23', '29', '30', '18', '17')
|
||||
// and c_acctbal > (
|
||||
// select
|
||||
// avg(c_acctbal)
|
||||
// from
|
||||
// customer
|
||||
// where
|
||||
// c_acctbal > 0.00
|
||||
// and substring(c_phone, 1, 2) in
|
||||
// ('13', '31', '23', '29', '30', '18', '17')
|
||||
// )
|
||||
// and not exists (
|
||||
// select
|
||||
// *
|
||||
// from
|
||||
// orders
|
||||
// where
|
||||
// o_custkey = c_custkey
|
||||
// )
|
||||
// ) as custsale
|
||||
//group by
|
||||
// cntrycode
|
||||
//order by
|
||||
// cntrycode;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
// cntrycode,
|
||||
// count(*) as numcust,
|
||||
// sum(c_acctbal) as totacctbal
|
||||
//from
|
||||
// (
|
||||
// select
|
||||
// substring(c_phone, 1, 2) as cntrycode,
|
||||
// c_acctbal
|
||||
// from
|
||||
// customer
|
||||
// where
|
||||
// substring(c_phone, 1, 2) in
|
||||
// ('13', '31', '23', '29', '30', '18', '17')
|
||||
// and c_acctbal > (
|
||||
// select
|
||||
// avg(c_acctbal)
|
||||
// from
|
||||
// customer
|
||||
// where
|
||||
// c_acctbal > 0.00
|
||||
// and substring(c_phone, 1, 2) in
|
||||
// ('13', '31', '23', '29', '30', '18', '17')
|
||||
// )
|
||||
// and not exists (
|
||||
// select
|
||||
// *
|
||||
// from
|
||||
// orders
|
||||
// where
|
||||
// o_custkey = c_custkey
|
||||
// )
|
||||
// ) as custsale
|
||||
//group by
|
||||
// cntrycode
|
||||
//order by
|
||||
// cntrycode;
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q22_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
qt_select """
|
||||
select
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
from
|
||||
(
|
||||
select
|
||||
substring(c_phone, 1, 2) as cntrycode,
|
||||
c_acctbal
|
||||
from
|
||||
customer
|
||||
where
|
||||
substring(c_phone, 1, 2) in
|
||||
('13', '31', '23', '29', '30', '18', '17')
|
||||
and c_acctbal > (
|
||||
select
|
||||
avg(c_acctbal)
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_acctbal > 0.00
|
||||
and substring(c_phone, 1, 2) in
|
||||
('13', '31', '23', '29', '30', '18', '17')
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_custkey = c_custkey
|
||||
)
|
||||
) as custsale
|
||||
group by
|
||||
cntrycode
|
||||
order by
|
||||
cntrycode;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=16, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
from
|
||||
(
|
||||
select
|
||||
substring(c_phone, 1, 2) as cntrycode,
|
||||
c_acctbal
|
||||
from
|
||||
customer
|
||||
where
|
||||
substring(c_phone, 1, 2) in
|
||||
('13', '31', '23', '29', '30', '18', '17')
|
||||
and c_acctbal > (
|
||||
select
|
||||
avg(c_acctbal)
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_acctbal > 0.00
|
||||
and substring(c_phone, 1, 2) in
|
||||
('13', '31', '23', '29', '30', '18', '17')
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_custkey = c_custkey
|
||||
)
|
||||
) as custsale
|
||||
group by
|
||||
cntrycode
|
||||
order by
|
||||
cntrycode;
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
@ -1,111 +1,115 @@
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//
|
||||
//suite("tpch_sf1_q3_nereids") {
|
||||
// String realDb = context.config.getDbNameByFile(context.file)
|
||||
// // get parent directory's group
|
||||
// realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
//
|
||||
// sql "use ${realDb}"
|
||||
//
|
||||
// sql 'set enable_nereids_planner=true'
|
||||
//
|
||||
// qt_select """
|
||||
//select
|
||||
// o_year,
|
||||
// sum(case
|
||||
// when nation = 'BRAZIL' then volume
|
||||
// else 0
|
||||
// end) / sum(volume) as mkt_share
|
||||
//from
|
||||
// (
|
||||
// select
|
||||
// extract(year from o_orderdate) as o_year,
|
||||
// l_extendedprice * (1 - l_discount) as volume,
|
||||
// n2.n_name as nation
|
||||
// from
|
||||
// part,
|
||||
// supplier,
|
||||
// lineitem,
|
||||
// orders,
|
||||
// customer,
|
||||
// nation n1,
|
||||
// nation n2,
|
||||
// region
|
||||
// where
|
||||
// p_partkey = l_partkey
|
||||
// and s_suppkey = l_suppkey
|
||||
// and l_orderkey = o_orderkey
|
||||
// and o_custkey = c_custkey
|
||||
// and c_nationkey = n1.n_nationkey
|
||||
// and n1.n_regionkey = r_regionkey
|
||||
// and r_name = 'AMERICA'
|
||||
// and s_nationkey = n2.n_nationkey
|
||||
// and o_orderdate between date '1995-01-01' and date '1996-12-31'
|
||||
// and p_type = 'ECONOMY ANODIZED STEEL'
|
||||
// ) as all_nations
|
||||
//group by
|
||||
// o_year
|
||||
//order by
|
||||
// o_year;
|
||||
// """
|
||||
//
|
||||
// qt_select """
|
||||
//
|
||||
//select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=8, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=false, enable_projection=true) */
|
||||
// o_year,
|
||||
// sum(case
|
||||
// when nation = 'BRAZIL' then volume
|
||||
// else 0
|
||||
// end) / sum(volume) as mkt_share
|
||||
//from
|
||||
// (
|
||||
// select
|
||||
// extract(year from o_orderdate) as o_year,
|
||||
// l_extendedprice * (1 - l_discount) as volume,
|
||||
// n2.n_name as nation
|
||||
// from
|
||||
// lineitem,
|
||||
// orders,
|
||||
// customer,
|
||||
// supplier,
|
||||
// part,
|
||||
// nation n1,
|
||||
// nation n2,
|
||||
// region
|
||||
// where
|
||||
// p_partkey = l_partkey
|
||||
// and s_suppkey = l_suppkey
|
||||
// and l_orderkey = o_orderkey
|
||||
// and o_custkey = c_custkey
|
||||
// and c_nationkey = n1.n_nationkey
|
||||
// and n1.n_regionkey = r_regionkey
|
||||
// and r_name = 'AMERICA'
|
||||
// and s_nationkey = n2.n_nationkey
|
||||
// and o_orderdate between date '1995-01-01' and date '1996-12-31'
|
||||
// and p_type = 'ECONOMY ANODIZED STEEL'
|
||||
// ) as all_nations
|
||||
//group by
|
||||
// o_year
|
||||
//order by
|
||||
// o_year;
|
||||
//
|
||||
// """
|
||||
//
|
||||
//}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
suite("tpch_sf1_q8_nereids") {
|
||||
String realDb = context.config.getDbNameByFile(context.file)
|
||||
// get parent directory's group
|
||||
realDb = realDb.substring(0, realDb.lastIndexOf("_"))
|
||||
|
||||
sql "use ${realDb}"
|
||||
|
||||
sql 'set enable_nereids_planner=true'
|
||||
|
||||
sql 'set disable_colocate_plan=true'
|
||||
|
||||
sql 'set enable_bucket_shuffle_join=false'
|
||||
|
||||
qt_select """
|
||||
select
|
||||
o_year,
|
||||
sum(case
|
||||
when nation = 'BRAZIL' then volume
|
||||
else 0
|
||||
end) / sum(volume) as mkt_share
|
||||
from
|
||||
(
|
||||
select
|
||||
extract(year from o_orderdate) as o_year,
|
||||
l_extendedprice * (1 - l_discount) as volume,
|
||||
n2.n_name as nation
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
lineitem,
|
||||
orders,
|
||||
customer,
|
||||
nation n1,
|
||||
nation n2,
|
||||
region
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and s_suppkey = l_suppkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_custkey = c_custkey
|
||||
and c_nationkey = n1.n_nationkey
|
||||
and n1.n_regionkey = r_regionkey
|
||||
and r_name = 'AMERICA'
|
||||
and s_nationkey = n2.n_nationkey
|
||||
and o_orderdate between date '1995-01-01' and date '1996-12-31'
|
||||
and p_type = 'ECONOMY ANODIZED STEEL'
|
||||
) as all_nations
|
||||
group by
|
||||
o_year
|
||||
order by
|
||||
o_year;
|
||||
"""
|
||||
|
||||
qt_select """
|
||||
|
||||
select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=8, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=false, enable_projection=true) */
|
||||
o_year,
|
||||
sum(case
|
||||
when nation = 'BRAZIL' then volume
|
||||
else 0
|
||||
end) / sum(volume) as mkt_share
|
||||
from
|
||||
(
|
||||
select
|
||||
extract(year from o_orderdate) as o_year,
|
||||
l_extendedprice * (1 - l_discount) as volume,
|
||||
n2.n_name as nation
|
||||
from
|
||||
lineitem,
|
||||
orders,
|
||||
customer,
|
||||
supplier,
|
||||
part,
|
||||
nation n1,
|
||||
nation n2,
|
||||
region
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and s_suppkey = l_suppkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_custkey = c_custkey
|
||||
and c_nationkey = n1.n_nationkey
|
||||
and n1.n_regionkey = r_regionkey
|
||||
and r_name = 'AMERICA'
|
||||
and s_nationkey = n2.n_nationkey
|
||||
and o_orderdate between date '1995-01-01' and date '1996-12-31'
|
||||
and p_type = 'ECONOMY ANODIZED STEEL'
|
||||
) as all_nations
|
||||
group by
|
||||
o_year
|
||||
order by
|
||||
o_year;
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user