Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 merged PR #43145: URL: https://github.com/apache/doris/pull/43145 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
github-actions[bot] commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2505366247 PR approved by at least one committer and no changes requested. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
github-actions[bot] commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2505366300 PR approved by anyone and no changes requested. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2505181872 ClickBench: Total hot run time: 32.62 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit 5a0ee5258f865eae60bd103dff3f74f30780bb24, data reload: false query1 0.030.030.03 query2 0.060.040.03 query3 0.230.080.07 query4 1.620.100.11 query5 0.430.420.40 query6 1.160.660.64 query7 0.020.020.01 query8 0.040.040.04 query9 0.570.540.52 query10 0.540.570.55 query11 0.140.100.10 query12 0.140.110.11 query13 0.620.610.60 query14 2.822.712.83 query15 0.910.840.83 query16 0.380.370.37 query17 0.971.010.97 query18 0.220.210.21 query19 1.931.821.96 query20 0.010.010.01 query21 15.36 0.610.61 query22 2.422.721.49 query23 17.20 1.040.78 query24 2.921.471.59 query25 0.240.080.11 query26 0.640.140.14 query27 0.050.050.04 query28 10.22 1.101.07 query29 12.55 3.253.23 query30 0.240.060.08 query31 2.860.380.38 query32 3.280.450.47 query33 3.003.023.08 query34 17.00 4.414.43 query35 4.474.494.52 query36 0.680.480.48 query37 0.100.060.06 query38 0.050.040.03 query39 0.040.030.02 query40 0.170.130.14 query41 0.070.020.03 query42 0.030.020.02 query43 0.040.030.02 Total cold run time: 106.47 s Total hot run time: 32.62 s ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2505177790 TPC-DS: Total hot run time: 197937 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 5a0ee5258f865eae60bd103dff3f74f30780bb24, data reload: false query1 1259939 937 937 query2 6252214121402140 query3 10936 418240104010 query4 67035 27521 23783 23783 query5 4885440 460 440 query6 410 185 181 181 query7 5566300 295 295 query8 313 226 228 226 query9 8904275927442744 query10 452 261 269 261 query11 17422 15389 15815 15389 query12 165 106 105 105 query13 1539432 429 429 query14 10725 777876817681 query15 204 189 190 189 query16 6752486 486 486 query17 1051613 588 588 query18 1750291 289 289 query19 200 157 157 157 query20 122 119 118 118 query21 203 132 100 100 query22 4733470343944394 query23 35071 34647 34713 34647 query24 5436255224542454 query25 488 387 388 387 query26 649 146 147 146 query27 1774287 291 287 query28 4339250124912491 query29 680 409 422 409 query30 225 144 145 144 query31 996 847 821 821 query32 71 60 58 58 query33 397 287 285 285 query34 921 552 516 516 query35 867 769 735 735 query36 1103962 985 962 query37 134 78 79 78 query38 4547443144894431 query39 1535148614711471 query40 201 109 97 97 query41 46 41 45 41 query42 105 97 98 97 query43 566 503 500 500 query44 1191827 835 827 query45 190 169 168 168 query46 1185698 710 698 query47 2045190919291909 query48 437 328 306 306 query49 709 385 385 385 query50 845 394 402 394 query51 7379733369536953 query52 98 89 94 89 query53 255 188 177 177 query54 512 402 389 389 query55 79 73 74 73 query56 243 240 231 231 query57 1283119311591159 query58 211 251 218 218 query59 3110298928312831 query60 270 241 243 241 query61 107 108 104 104 query62 783 665 661 661 query63 215 202 188 188 query64 1334648 625 625 query65 3287321031883188 query66 709 300 300 300 query67 16252 15744 15684 15684 query68 3921576 570 570 query69 431 258 250 250 query70 1215114911441144 query71 352 253 253 253 query72 6341399840423998 query73 761 355 366 355 query74 10261 908691789086 query75 3326271426602660 query76 1811109011141090 query77 495 269 277 269 query78 10625 936894489368 query79 1874590 593 590 query80 1420423 433 423 query81 513 228 238 228 query82 1303119 122 119 query83 275 151 152 151 query84 283 70 75 70 query85 1020292 295 292 query86 427 296 292 292 query87 4770467145934593 query88 3837223122022202 query89 408 298 299 298 query90 1964186 186 186 query91 137 99 100 99 query92 68 50 52 50 query93 2205541 536 536 query94 806 279 293 279 query95 346 247 244 244 query96 625 274 272 272 query97 2847268126762676 query98 225 202 193 193 query99 1613130413341304 Total cold run time: 320263 ms Total hot run time: 197937 ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2505167309 TPC-H: Total hot run time: 39702 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit 5a0ee5258f865eae60bd103dff3f74f30780bb24, data reload: false -- Round 1 -- q1 17590 742072387238 q2 2040173 161 161 q3 10608 112111561121 q4 10571 779 734 734 q5 7596268627732686 q6 242 149 146 146 q7 990 631 592 592 q8 9245183419631834 q9 6498637063786370 q10 6959231923362319 q11 458 256 257 256 q12 425 208 207 207 q13 17773 301230203012 q14 252 218 211 211 q15 570 526 521 521 q16 671 612 579 579 q17 970 582 587 582 q18 7257674865476547 q19 1330982 1056982 q20 484 182 182 182 q21 3979323331053105 q22 369 317 321 317 Total cold run time: 106877 ms Total hot run time: 39702 ms - Round 2, with runtime_filter_mode=off - q1 7231722472457224 q2 326 228 229 228 q3 2917280729732807 q4 2079178918301789 q5 5678567656385638 q6 238 141 144 141 q7 2278183818221822 q8 3376351235293512 q9 8858892388938893 q10 3612356435943564 q11 605 518 509 509 q12 828 636 645 636 q13 10774 327632513251 q14 296 276 288 276 q15 589 523 519 519 q16 696 648 648 648 q17 1853160916141609 q18 830675747574 q19 1711170114921492 q20 2112188618621862 q21 5621541353185318 q22 657 599 587 587 Total cold run time: 70641 ms Total hot run time: 59899 ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2505138034 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2503099047 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2489950902 run p0 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2489283273 ClickBench: Total hot run time: 33.5 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit 473ce4461bf00a597d1397b4be3efdec36a306e9, data reload: false query1 0.040.030.03 query2 0.070.040.04 query3 0.230.070.08 query4 1.620.100.11 query5 0.420.400.39 query6 1.130.660.65 query7 0.020.010.02 query8 0.040.030.03 query9 0.570.510.49 query10 0.560.560.57 query11 0.140.100.10 query12 0.140.100.12 query13 0.610.600.61 query14 2.762.882.72 query15 0.910.830.83 query16 0.390.380.37 query17 1.041.081.04 query18 0.230.220.22 query19 1.911.821.84 query20 0.010.020.02 query21 15.38 0.580.57 query22 2.772.292.49 query23 17.04 0.940.81 query24 3.151.481.62 query25 0.270.200.08 query26 0.430.140.14 query27 0.050.050.03 query28 9.801.101.08 query29 12.54 3.183.17 query30 0.250.060.06 query31 2.860.380.38 query32 3.300.460.48 query33 2.973.033.12 query34 16.96 4.504.46 query35 4.534.474.50 query36 0.660.500.50 query37 0.090.060.06 query38 0.040.030.04 query39 0.030.020.02 query40 0.160.120.12 query41 0.080.030.02 query42 0.030.020.03 query43 0.040.040.03 Total cold run time: 106.27 s Total hot run time: 33.5 s ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2489274116 TPC-DS: Total hot run time: 191975 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 473ce4461bf00a597d1397b4be3efdec36a306e9, data reload: false query1 967 382 394 382 query2 6519222421612161 query3 6715214 216 214 query4 34510 23679 23625 23625 query5 4323462 448 448 query6 284 189 183 183 query7 4626302 302 302 query8 289 227 229 227 query9 9855267326912673 query10 467 247 247 247 query11 18128 15233 15449 15233 query12 153 107 102 102 query13 1666397 405 397 query14 10742 753274327432 query15 301 187 179 179 query16 8005448 450 448 query17 1807573 537 537 query18 2151289 283 283 query19 357 147 147 147 query20 124 111 109 109 query21 205 102 98 98 query22 4775434744764347 query23 34830 34244 34099 34099 query24 10464 251125032503 query25 653 373 391 373 query26 1363146 150 146 query27 2851280 287 280 query28 7898247024272427 query29 855 402 424 402 query30 302 146 148 146 query31 1055786 838 786 query32 102 54 57 54 query33 767 281 284 281 query34 989 522 531 522 query35 855 726 710 710 query36 1087910 953 910 query37 132 75 82 75 query38 4355429742774277 query39 1502142814281428 query40 268 98 101 98 query41 50 44 82 44 query42 102 99 95 95 query43 558 507 500 500 query44 1275809 817 809 query45 183 160 162 160 query46 1135706 704 704 query47 1946184618291829 query48 424 320 318 318 query49 1136380 383 380 query50 806 394 396 394 query51 7280703271247032 query52 104 94 87 87 query53 261 181 186 181 query54 1187423 403 403 query55 82 80 80 80 query56 290 240 238 238 query57 1271117411611161 query58 239 213 225 213 query59 3422301431853014 query60 274 265 252 252 query61 108 103 123 103 query62 892 676 674 674 query63 213 201 191 191 query64 4509798 730 730 query65 3314317932473179 query66 1452336 319 319 query67 16052 15994 15746 15746 query68 4535571 559 559 query69 419 270 263 263 query70 1116114110641064 query71 344 305 250 250 query72 6436409939593959 query73 767 360 370 360 query74 10367 910089198919 query75 3514265826822658 query76 2702102311461023 query77 418 295 305 295 query78 10409 951494509450 query79 2486620 622 620 query80 1131440 484 440 query81 549 226 226 226 query82 924 118 119 118 query83 242 146 162 146 query84 237 70 69 69 query85 1287299 296 296 query86 426 300 285 285 query87 4706460945484548 query88 3627223321582158 query89 418 289 293 289 query90 2073190 187 187 query91 139 101 111 101 query92 67 52 52 52 query93 1710547 559 547 query94 974 297 293 293 query95 352 250 244 244 query96 628 279 279 279 query97 2854265826642658 query98 212 199 202 199 query99 1535133112931293 Total cold run time: 303466 ms Total hot run time: 191975 ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to t
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2489253788 TPC-H: Total hot run time: 40248 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit 473ce4461bf00a597d1397b4be3efdec36a306e9, data reload: false -- Round 1 -- q1 17598 756673747374 q2 2044170 171 170 q3 10557 114811221122 q4 10224 752 742 742 q5 7604270326462646 q6 244 150 156 150 q7 992 634 618 618 q8 9236188119321881 q9 6594641864316418 q10 6986227823292278 q11 462 262 275 262 q12 417 220 227 220 q13 17767 302430263024 q14 259 213 217 213 q15 569 534 517 517 q16 671 585 589 585 q17 978 544 509 509 q18 7395679666926692 q19 1334102710841027 q20 462 182 179 179 q21 4047340333043304 q22 395 317 319 317 Total cold run time: 106835 ms Total hot run time: 40248 ms - Round 2, with runtime_filter_mode=off - q1 7360728072677267 q2 329 229 235 229 q3 2973282728092809 q4 1931175016671667 q5 5388538553965385 q6 230 140 137 137 q7 2148169717251697 q8 3291338334283383 q9 8564856885428542 q10 3497344134273427 q11 587 510 512 510 q12 778 590 613 590 q13 12160 307530473047 q14 289 271 261 261 q15 569 518 508 508 q16 669 644 639 639 q17 1811159515741574 q18 7803742273127312 q19 1663158215781578 q20 2018192418201820 q21 5460537051615161 q22 682 548 589 548 Total cold run time: 70200 ms Total hot run time: 58091 ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2488327105 run p0 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2489219587 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2488153065 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2487138844 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2486346151 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2485253867 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2480537737 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1844961697 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,134 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.MTMV; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.AnalysisException; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.mysql.privilege.PrivPredicate; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends ShowCommand { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final TableNameInfo tblNameInfo; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.tblNameInfo = tableNameInfo; +} + +private void validate(ConnectContext ctx) throws AnalysisException { +tblNameInfo.analyze(ctx); + +TableIf tableIf = Env.getCurrentEnv().getCatalogMgr() +.getCatalogOrAnalysisException(tblNameInfo.getCtl()) + .getDbOrAnalysisException(tblNameInfo.getDb()).getTableOrAnalysisException(tblNameInfo.getTbl()); + +if (tableIf instanceof MTMV) { +ErrorReport.reportAnalysisException("not support async materialized view, " ++ "please use `show create materialized view`"); +} + +PrivPredicate wanted; +if (tableIf instanceof View) { +wanted = PrivPredicate.SHOW_VIEW; +} else { +wanted = PrivPredicate.SHOW; +} + +if (!Env.getCurrentEnv().getAccessManager().checkTblPriv(ConnectContext.get(), +tblNameInfo.getCtl(), tblNameInfo.getDb(), tblNameInfo.getTbl(), wanted)) { + ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, "SHOW CREATE TABLE", + ConnectContext.get().getQualifiedUser(), + ConnectContext.get().getRemoteIP(), +tblNameInfo.getDb() + ": " + tblNameInfo.getTbl()); +} +} + +@Override +public R accept(PlanVisitor visitor, C context) { +return visitor.visitShowCreateViewCommand(this, context); +} + +@Override +public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception { +validate(ctx); +// If dbName is not provided, use the default database from the context +String effectiveDbName = (tblNameInfo.getDb() == null || tblNameInfo.getDb().isEmpty()) +? ctx.getDatabase() : tblNameInfo.getDb(); + +// If catalog is not provided, use the default catalog (e.g., internal) +String effectiveCatalog = (tblNameInfo.getCtl() == null || tblNameInfo.getCtl().isEmpty()) +
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1843131435 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,134 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.MTMV; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.AnalysisException; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.mysql.privilege.PrivPredicate; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends ShowCommand { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final TableNameInfo tblNameInfo; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.tblNameInfo = tableNameInfo; +} + +private void validate(ConnectContext ctx) throws AnalysisException { +tblNameInfo.analyze(ctx); + +TableIf tableIf = Env.getCurrentEnv().getCatalogMgr() +.getCatalogOrAnalysisException(tblNameInfo.getCtl()) + .getDbOrAnalysisException(tblNameInfo.getDb()).getTableOrAnalysisException(tblNameInfo.getTbl()); + +if (tableIf instanceof MTMV) { +ErrorReport.reportAnalysisException("not support async materialized view, " ++ "please use `show create materialized view`"); +} + +PrivPredicate wanted; +if (tableIf instanceof View) { +wanted = PrivPredicate.SHOW_VIEW; +} else { +wanted = PrivPredicate.SHOW; +} + +if (!Env.getCurrentEnv().getAccessManager().checkTblPriv(ConnectContext.get(), +tblNameInfo.getCtl(), tblNameInfo.getDb(), tblNameInfo.getTbl(), wanted)) { + ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, "SHOW CREATE TABLE", + ConnectContext.get().getQualifiedUser(), + ConnectContext.get().getRemoteIP(), +tblNameInfo.getDb() + ": " + tblNameInfo.getTbl()); +} +} + +@Override +public R accept(PlanVisitor visitor, C context) { +return visitor.visitShowCreateViewCommand(this, context); +} + +@Override +public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception { +validate(ctx); +// If dbName is not provided, use the default database from the context +String effectiveDbName = (tblNameInfo.getDb() == null || tblNameInfo.getDb().isEmpty()) +? ctx.getDatabase() : tblNameInfo.getDb(); + +// If catalog is not provided, use the default catalog (e.g., internal) +String effectiveCatalog = (tblNameInfo.getCtl() == null || tblNameInfo.getCtl().isEmpty()) +
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1827850613 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,127 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.analysis.StmtType; +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends Command implements NoForward { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final String catalog; +private final String dbName; +private final String viewName; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.catalog = tableNameInfo.getCtl(); +this.dbName = tableNameInfo.getDb(); +this.viewName = tableNameInfo.getTbl(); +} + +public String getCatalog() { +return catalog; +} + +public String getDbName() { +return dbName; +} + +public String getViewName() { +return viewName; +} + +@Override +public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { +// If dbName is not provided, use the default database from the context +String effectiveDbName = (dbName == null || dbName.isEmpty()) ? ctx.getDatabase() : dbName; + +// If catalog is not provided, use the default catalog (e.g., internal) +String effectiveCatalog = (catalog == null || catalog.isEmpty()) ? "internal" : catalog; + +// Fetch the catalog, database, and view metadata +Env env = Env.getCurrentEnv(); +DatabaseIf db = env.getCatalogMgr().getCatalogOrAnalysisException(effectiveCatalog) +.getDbOrMetaException(effectiveDbName); +TableIf view = db.getTableOrMetaException(viewName); + +if (!(view instanceof View)) { +ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_OBJECT, effectiveDbName, viewName, "VIEW"); Review Comment: Thanks for your comment. I have updated the PR, please review ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,127 @@ +// 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 WARR
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1827850214 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,127 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.analysis.StmtType; +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends Command implements NoForward { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final String catalog; +private final String dbName; +private final String viewName; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.catalog = tableNameInfo.getCtl(); +this.dbName = tableNameInfo.getDb(); +this.viewName = tableNameInfo.getTbl(); +} + +public String getCatalog() { +return catalog; +} + +public String getDbName() { +return dbName; +} + +public String getViewName() { +return viewName; +} + +@Override +public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { Review Comment: Thanks for your comment. I have updated the PR, please review -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1827196659 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,127 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.analysis.StmtType; +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends Command implements NoForward { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final String catalog; +private final String dbName; +private final String viewName; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.catalog = tableNameInfo.getCtl(); +this.dbName = tableNameInfo.getDb(); +this.viewName = tableNameInfo.getTbl(); +} + +public String getCatalog() { +return catalog; +} + +public String getDbName() { +return dbName; +} + +public String getViewName() { +return viewName; +} + +@Override +public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { +// If dbName is not provided, use the default database from the context +String effectiveDbName = (dbName == null || dbName.isEmpty()) ? ctx.getDatabase() : dbName; + +// If catalog is not provided, use the default catalog (e.g., internal) +String effectiveCatalog = (catalog == null || catalog.isEmpty()) ? "internal" : catalog; + +// Fetch the catalog, database, and view metadata +Env env = Env.getCurrentEnv(); +DatabaseIf db = env.getCatalogMgr().getCatalogOrAnalysisException(effectiveCatalog) +.getDbOrMetaException(effectiveDbName); +TableIf view = db.getTableOrMetaException(viewName); + +if (!(view instanceof View)) { +ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_OBJECT, effectiveDbName, viewName, "VIEW"); +} + +List> rows = Lists.newArrayList(); + +// Lock the view to ensure consistent metadata access +view.readLock(); +try { +List createViewStmt = Lists.newArrayList(); +env.getDdlStmt(null, null, view, createViewStmt, null, null, false, true, false, -1L, false, false); + +if (createViewStmt.isEmpty()) { +ShowResultSet resultSet = new ShowResultSet(VIEW_META_DATA, rows); +executor.sendResultSet(resultSet); Review Comment: don't call executor.sendResultSet(resultSet) when holding the readlock. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1827196209 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,127 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.analysis.StmtType; +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends Command implements NoForward { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final String catalog; +private final String dbName; +private final String viewName; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.catalog = tableNameInfo.getCtl(); +this.dbName = tableNameInfo.getDb(); +this.viewName = tableNameInfo.getTbl(); +} + +public String getCatalog() { +return catalog; +} + +public String getDbName() { +return dbName; +} + +public String getViewName() { +return viewName; +} + +@Override +public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { +// If dbName is not provided, use the default database from the context +String effectiveDbName = (dbName == null || dbName.isEmpty()) ? ctx.getDatabase() : dbName; + +// If catalog is not provided, use the default catalog (e.g., internal) +String effectiveCatalog = (catalog == null || catalog.isEmpty()) ? "internal" : catalog; + +// Fetch the catalog, database, and view metadata +Env env = Env.getCurrentEnv(); +DatabaseIf db = env.getCatalogMgr().getCatalogOrAnalysisException(effectiveCatalog) +.getDbOrMetaException(effectiveDbName); +TableIf view = db.getTableOrMetaException(viewName); + +if (!(view instanceof View)) { +ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_OBJECT, effectiveDbName, viewName, "VIEW"); Review Comment: pls use more user friendly error message, take old planner as reference`ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_OBJECT, showStmt.getDb(), showStmt.getTable(), "VIEW", "Use 'SHOW CREATE TABLE '" + table.getName()); ` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
starocean999 commented on code in PR #43145: URL: https://github.com/apache/doris/pull/43145#discussion_r1827150312 ## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowCreateViewCommand.java: ## @@ -0,0 +1,127 @@ +// 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. + +package org.apache.doris.nereids.trees.plans.commands; + +import org.apache.doris.analysis.StmtType; +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.DatabaseIf; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.ScalarType; +import org.apache.doris.catalog.TableIf; +import org.apache.doris.catalog.View; +import org.apache.doris.common.ErrorCode; +import org.apache.doris.common.ErrorReport; +import org.apache.doris.nereids.trees.plans.PlanType; +import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo; +import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.ShowResultSet; +import org.apache.doris.qe.ShowResultSetMetaData; +import org.apache.doris.qe.StmtExecutor; + +import com.google.common.collect.Lists; + +import java.util.List; + +/** + * Represents the command for SHOW CREATE VIEW. + */ +public class ShowCreateViewCommand extends Command implements NoForward { +private static final ShowResultSetMetaData VIEW_META_DATA = +ShowResultSetMetaData.builder() +.addColumn(new Column("View", ScalarType.createVarchar(20))) +.addColumn(new Column("Create View", ScalarType.createVarchar(30))) +.addColumn(new Column("character_set_client", ScalarType.createVarchar(30))) +.addColumn(new Column("collation_connection", ScalarType.createVarchar(30))) +.build(); + +private final String catalog; +private final String dbName; +private final String viewName; + +public ShowCreateViewCommand(TableNameInfo tableNameInfo) { +super(PlanType.SHOW_CREATE_VIEW_COMMAND); +this.catalog = tableNameInfo.getCtl(); +this.dbName = tableNameInfo.getDb(); +this.viewName = tableNameInfo.getTbl(); +} + +public String getCatalog() { +return catalog; +} + +public String getDbName() { +return dbName; +} + +public String getViewName() { +return viewName; +} + +@Override +public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { Review Comment: ShowCreateTableStmt's analyze method needs to be re-implemented in nereids. For example, add a private void validate(ConnectContext ctx) throws UserException method to do the job, and call it at the beginning of run method. BTW, the TableNameInfo class has analyze method to do the validation. You'd better keep TableNameInfo as a class member and call its analyze method in the new validate function -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2453032115 ClickBench: Total hot run time: 33.02 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit d779c88172422a9998d2b189fef1bf32ed7f0eaa, data reload: false query1 0.030.030.03 query2 0.070.030.03 query3 0.230.060.06 query4 1.650.100.10 query5 0.410.420.38 query6 1.170.650.65 query7 0.020.020.01 query8 0.040.030.04 query9 0.560.500.50 query10 0.560.540.57 query11 0.140.120.11 query12 0.130.110.11 query13 0.620.600.60 query14 2.762.822.74 query15 0.880.820.83 query16 0.390.380.40 query17 0.971.011.09 query18 0.190.200.19 query19 1.951.821.94 query20 0.010.010.01 query21 15.37 0.580.58 query22 2.702.712.16 query23 17.00 1.200.87 query24 2.401.082.09 query25 0.310.200.12 query26 0.370.140.13 query27 0.030.040.04 query28 10.17 1.091.07 query29 12.78 3.243.23 query30 0.250.060.07 query31 2.870.380.37 query32 3.280.460.46 query33 3.043.033.02 query34 16.85 4.444.50 query35 4.514.544.45 query36 0.660.500.50 query37 0.090.060.06 query38 0.050.040.04 query39 0.030.030.02 query40 0.160.130.13 query41 0.080.020.03 query42 0.030.020.03 query43 0.040.030.03 Total cold run time: 105.85 s Total hot run time: 33.02 s ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2453030651 TPC-DS: Total hot run time: 196089 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 d779c88172422a9998d2b189fef1bf32ed7f0eaa, data reload: false query1 1186911 899 899 query2 6248213920912091 query3 10782 405039063906 query4 67848 29790 23568 23568 query5 4890453 444 444 query6 404 177 172 172 query7 5620295 285 285 query8 318 219 229 219 query9 9309273727002700 query10 466 267 248 248 query11 17693 15559 16100 15559 query12 172 108 105 105 query13 1542439 433 433 query14 9896677667726772 query15 195 177 182 177 query16 7077471 445 445 query17 1014555 569 555 query18 1806298 295 295 query19 203 153 150 150 query20 121 111 110 110 query21 206 100 101 100 query22 4515455743034303 query23 34615 34198 34028 34028 query24 6651275427742754 query25 514 396 406 396 query26 649 155 154 154 query27 2119288 291 288 query28 4557245824022402 query29 685 431 426 426 query30 236 151 152 151 query31 972 799 822 799 query32 72 57 54 54 query33 404 270 279 270 query34 903 494 506 494 query35 868 732 719 719 query36 1061928 955 928 query37 123 70 76 70 query38 4350428142994281 query39 1467143014181418 query40 198 100 99 99 query41 48 44 45 44 query42 108 102 102 102 query43 544 512 509 509 query44 1164813 819 813 query45 183 163 165 163 query46 1096678 691 678 query47 1942184018771840 query48 422 323 316 316 query49 736 411 433 411 query50 809 379 381 379 query51 7357714671377137 query52 98 84 86 84 query53 248 174 176 174 query54 506 399 394 394 query55 75 72 77 72 query56 248 229 234 229 query57 1325119911501150 query58 218 198 202 198 query59 3202335630143014 query60 272 252 245 245 query61 105 108 106 106 query62 795 673 673 673 query63 210 184 184 184 query64 1373636 645 636 query65 3295321932153215 query66 703 291 296 291 query67 15974 15756 15664 15664 query68 3187583 581 581 query69 410 256 251 251 query70 1192116510721072 query71 353 245 247 245 query72 6205411740214021 query73 752 353 360 353 query74 10101 903591419035 query75 3392267326822673 query76 1693108110501050 query77 489 283 266 266 query78 10437 950594879487 query79 1475591 586 586 query80 873 419 431 419 query81 514 239 240 239 query82 1295116 113 113 query83 216 140 145 140 query84 283 69 65 65 query85 886 309 294 294 query86 347 293 308 293 query87 4954465346444644 query88 3556216121342134 query89 414 293 289 289 query90 2050187 187 187 query91 132 105 104 104 query92 72 50 46 46 query93 1912547 534 534 query94 866 300 295 295 query95 340 239 243 239 query96 623 277 282 277 query97 2919271926882688 query98 212 201 202 201 query99 1601128012981280 Total cold run time: 318762 ms Total hot run time: 196089 ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go t
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2453027381 TPC-H: Total hot run time: 41125 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit d779c88172422a9998d2b189fef1bf32ed7f0eaa, data reload: false -- Round 1 -- q1 17569 739772947294 q2 2047163 155 155 q3 10623 109111871091 q4 10585 820 831 820 q5 7775301430683014 q6 232 144 144 144 q7 1006630 597 597 q8 9355193720271937 q9 6541643264936432 q10 7123241224612412 q11 464 253 259 253 q12 404 215 210 210 q13 17759 295529952955 q14 251 206 211 206 q15 572 534 512 512 q16 666 593 584 584 q17 959 493 474 474 q18 7255666368806663 q19 1338104810131013 q20 473 182 182 182 q21 3997322431713171 q22 1142101710061006 Total cold run time: 108136 ms Total hot run time: 41125 ms - Round 2, with runtime_filter_mode=off - q1 7302728572717271 q2 324 235 226 226 q3 2977296429552955 q4 2105188218071807 q5 5771577558265775 q6 233 142 143 142 q7 2267186217831783 q8 3381347234713471 q9 8940898189208920 q10 3614357835833578 q11 613 524 503 503 q12 842 651 638 638 q13 9495314231793142 q14 301 293 298 293 q15 575 529 519 519 q16 676 630 637 630 q17 1838163916161616 q18 8222781877897789 q19 1682148516291485 q20 2105185619151856 q21 5550546354675463 q22 1143106910401040 Total cold run time: 69956 ms Total hot run time: 60902 ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
msridhar78 commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2453017277 run buildall -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
Re: [PR] [Enhancement] (nereids)implement showCreateViewCommand in nereids [doris]
doris-robot commented on PR #43145: URL: https://github.com/apache/doris/pull/43145#issuecomment-2453017242 Thank you for your contribution to Apache Doris. Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR) Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website). See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org