[Enhancement] doris to support function SESSION_USER()
Proposed changes
Issue Number: close #39574
Added support for new scalar function session_user()
when run sqlmap tool on Doris master it gave error like session_user() function not found. mysql support this function. https://www.w3schools.com/sql/func_mysql_session_user.asp Its similar to Doris user() function.
mysql> select SESSION_USER(); +--------------------+ | session_user() | +--------------------+ | 'root'@'127.0.0.1' | +--------------------+ 1 row in set (0.01 sec)
mysql> select session_user(); +--------------------+ | session_user() | +--------------------+ | 'root'@'127.0.0.1' | +--------------------+ 1 row in set (0.00 sec)
mysql>
Thank you for your contribution to Apache Doris. Don't know what should be done next? See How to process your PR
Since 2024-03-18, the Document has been moved to doris-website. See Doris Document.
run buildall
TPC-H: Total hot run time: 37938 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 12788129a0eed5f4ce8cf7d419e0b858a4d607b8, data reload: false
------ Round 1 ----------------------------------
q1 18038 4402 4290 4290
q2 2065 208 215 208
q3 10446 1128 1140 1128
q4 10167 807 691 691
q5 7783 2840 2817 2817
q6 268 156 158 156
q7 1016 654 652 652
q8 9398 2095 2040 2040
q9 7033 6572 6531 6531
q10 7077 2268 2196 2196
q11 504 279 274 274
q12 429 256 262 256
q13 18977 2994 2997 2994
q14 306 261 264 261
q15 567 521 534 521
q16 529 422 401 401
q17 973 670 681 670
q18 7474 6939 6779 6779
q19 6488 984 1039 984
q20 718 347 352 347
q21 4048 2927 2727 2727
q22 1114 1058 1015 1015
Total cold run time: 115418 ms
Total hot run time: 37938 ms
----- Round 2, with runtime_filter_mode=off -----
q1 4493 4281 4297 4281
q2 402 306 308 306
q3 2894 2637 2561 2561
q4 1940 1721 1685 1685
q5 5659 5712 5703 5703
q6 244 154 152 152
q7 2228 1810 1805 1805
q8 3311 3472 3419 3419
q9 8803 8547 8735 8547
q10 3528 3302 3337 3302
q11 655 516 531 516
q12 821 674 664 664
q13 16488 3145 3220 3145
q14 331 299 299 299
q15 561 520 539 520
q16 510 465 467 465
q17 1836 1513 1512 1512
q18 8429 7958 7894 7894
q19 4713 1604 1641 1604
q20 3574 1891 1869 1869
q21 14070 5195 5254 5195
q22 1171 1090 1073 1073
Total cold run time: 86661 ms
Total hot run time: 56517 ms
run buildall
PR approved by at least one committer and no changes requested.
PR approved by anyone and no changes requested.
can improve comment, link to the MySQL function docs.
run buildall
run buildall
run buildall
run buildall
TPC-H: Total hot run time: 38502 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 968b7617e16a6d796df90756d0b433a8849768ac, data reload: false
------ Round 1 ----------------------------------
q1 17922 4483 4456 4456
q2 2599 180 187 180
q3 11722 1120 1151 1120
q4 10233 758 880 758
q5 8103 2913 2841 2841
q6 236 146 146 146
q7 988 638 605 605
q8 9335 2060 2073 2060
q9 7035 6479 6560 6479
q10 7008 2185 2256 2185
q11 442 246 255 246
q12 409 230 228 228
q13 17770 3022 3031 3022
q14 279 237 240 237
q15 525 500 500 500
q16 571 544 519 519
q17 984 746 730 730
q18 7408 6803 6897 6803
q19 1409 1097 1002 1002
q20 718 340 345 340
q21 3911 3131 3032 3032
q22 1124 1013 1049 1013
Total cold run time: 110731 ms
Total hot run time: 38502 ms
----- Round 2, with runtime_filter_mode=off -----
q1 4432 4342 4295 4295
q2 373 284 272 272
q3 2876 2664 2680 2664
q4 1925 1637 1662 1637
q5 5396 5365 5423 5365
q6 223 134 133 133
q7 2095 1809 1784 1784
q8 3223 3406 3364 3364
q9 8473 8525 8431 8431
q10 3469 3199 3219 3199
q11 618 515 503 503
q12 808 615 614 614
q13 10946 3110 3046 3046
q14 308 279 284 279
q15 530 480 513 480
q16 602 553 564 553
q17 1786 1485 1477 1477
q18 7659 7409 7425 7409
q19 1685 1469 1567 1469
q20 2077 1841 1829 1829
q21 5401 5218 5293 5218
q22 1132 1051 1029 1029
Total cold run time: 66037 ms
Total hot run time: 55050 ms
TPC-DS: Total hot run time: 188474 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 968b7617e16a6d796df90756d0b433a8849768ac, data reload: false
query1 911 381 366 366
query2 6480 1979 1924 1924
query3 6650 213 221 213
query4 34434 23254 23236 23236
query5 4158 521 498 498
query6 257 166 160 160
query7 4568 298 297 297
query8 260 210 221 210
query9 8449 2503 2487 2487
query10 452 266 271 266
query11 16747 14984 14999 14984
query12 151 106 99 99
query13 1638 367 366 366
query14 9588 7343 6598 6598
query15 266 169 181 169
query16 7511 495 454 454
query17 1579 577 562 562
query18 2001 297 295 295
query19 341 153 153 153
query20 116 112 111 111
query21 210 107 105 105
query22 4336 4264 4076 4076
query23 34504 34196 34436 34196
query24 11178 2977 2887 2887
query25 589 426 404 404
query26 1077 165 167 165
query27 2786 289 281 281
query28 7382 2124 2108 2108
query29 656 436 425 425
query30 313 161 156 156
query31 992 762 796 762
query32 91 61 60 60
query33 766 316 294 294
query34 939 469 506 469
query35 840 754 735 735
query36 1120 945 949 945
query37 151 94 92 92
query38 3952 3864 3844 3844
query39 1507 1418 1378 1378
query40 276 122 120 120
query41 53 47 50 47
query42 117 97 98 97
query43 522 473 466 466
query44 1236 765 744 744
query45 214 172 174 172
query46 1102 749 762 749
query47 1895 1809 1803 1803
query48 382 299 302 299
query49 1145 448 435 435
query50 809 423 412 412
query51 7170 7037 6983 6983
query52 101 93 91 91
query53 252 185 181 181
query54 894 473 476 473
query55 79 76 82 76
query56 280 267 255 255
query57 1205 1103 1073 1073
query58 248 240 238 238
query59 3111 2860 2718 2718
query60 322 290 281 281
query61 125 121 121 121
query62 809 676 662 662
query63 227 191 180 180
query64 5246 832 649 649
query65 3225 3171 3155 3155
query66 1130 340 351 340
query67 15758 15400 15305 15305
query68 4733 560 555 555
query69 455 272 306 272
query70 1210 1049 1095 1049
query71 401 272 269 269
query72 7094 3835 4121 3835
query73 758 336 338 336
query74 9228 8866 8796 8796
query75 3431 2703 2705 2703
query76 3041 1084 1000 1000
query77 543 328 331 328
query78 9753 9130 9088 9088
query79 2035 522 536 522
query80 787 504 502 502
query81 592 237 234 234
query82 822 146 147 146
query83 277 153 150 150
query84 233 80 74 74
query85 1180 290 279 279
query86 409 299 296 296
query87 4377 4332 4232 4232
query88 3584 2331 2354 2331
query89 384 299 281 281
query90 1876 191 192 191
query91 123 97 146 97
query92 63 52 55 52
query93 1872 553 540 540
query94 765 289 284 284
query95 349 262 261 261
query96 600 275 267 267
query97 3198 3063 3153 3063
query98 227 200 199 199
query99 1638 1314 1287 1287
Total cold run time: 293917 ms
Total hot run time: 188474 ms
ClickBench: Total hot run time: 31.98 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 968b7617e16a6d796df90756d0b433a8849768ac, data reload: false
query1 0.04 0.04 0.04
query2 0.08 0.04 0.03
query3 0.22 0.05 0.06
query4 1.68 0.08 0.08
query5 0.50 0.50 0.49
query6 1.13 0.74 0.72
query7 0.02 0.02 0.02
query8 0.05 0.04 0.05
query9 0.54 0.49 0.49
query10 0.55 0.54 0.54
query11 0.16 0.12 0.11
query12 0.15 0.12 0.12
query13 0.61 0.59 0.59
query14 2.03 2.04 2.07
query15 0.88 0.82 0.81
query16 0.38 0.35 0.38
query17 1.06 0.97 1.06
query18 0.21 0.20 0.21
query19 1.87 1.76 1.74
query20 0.01 0.01 0.01
query21 15.40 0.67 0.67
query22 4.19 6.80 1.94
query23 18.24 1.30 1.34
query24 2.11 0.23 0.22
query25 0.16 0.09 0.08
query26 0.26 0.18 0.18
query27 0.08 0.08 0.07
query28 13.30 1.01 1.01
query29 12.61 3.30 3.36
query30 0.24 0.05 0.04
query31 2.90 0.41 0.39
query32 3.23 0.49 0.49
query33 2.95 2.99 3.00
query34 17.13 4.36 4.36
query35 4.44 4.45 4.44
query36 0.65 0.47 0.47
query37 0.19 0.16 0.16
query38 0.16 0.14 0.16
query39 0.04 0.03 0.04
query40 0.16 0.13 0.13
query41 0.10 0.04 0.05
query42 0.07 0.05 0.05
query43 0.05 0.05 0.04
Total cold run time: 110.83 s
Total hot run time: 31.98 s
run p0
PR approved by at least one committer and no changes requested.