Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo closed pull request #47591: [feat](nereids) support show query stats in nereids URL: https://github.com/apache/doris/pull/47591 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2961932599 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2961717883 > need rebase done -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2961717018 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
starocean999 commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2960968937 need rebase -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2709700187 ClickBench: Total hot run time: 30.63 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit ad6f6938716ae367acc4f1b5793604084c4a676f, data reload: false query1 0.040.040.03 query2 0.070.030.03 query3 0.240.070.06 query4 1.620.100.10 query5 0.580.550.53 query6 1.180.720.72 query7 0.020.020.02 query8 0.040.030.04 query9 0.580.520.51 query10 0.570.630.58 query11 0.160.110.10 query12 0.140.110.11 query13 0.630.610.60 query14 2.662.812.69 query15 0.920.840.85 query16 0.380.380.38 query17 1.001.031.02 query18 0.220.200.19 query19 1.911.971.82 query20 0.010.020.02 query21 15.37 0.900.53 query22 0.751.280.73 query23 14.76 1.380.63 query24 7.241.610.53 query25 0.510.110.12 query26 0.650.170.13 query27 0.050.060.04 query28 8.880.880.44 query29 12.57 4.023.34 query30 0.250.090.06 query31 2.820.580.38 query32 3.230.550.49 query33 2.943.023.03 query34 15.75 5.104.50 query35 4.514.554.53 query36 0.670.500.48 query37 0.100.060.07 query38 0.060.040.04 query39 0.030.020.03 query40 0.160.120.13 query41 0.080.020.02 query42 0.040.020.02 query43 0.030.030.03 Total cold run time: 104.42 s Total hot run time: 30.63 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2709690096 TPC-DS: Total hot run time: 191972 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 ad6f6938716ae367acc4f1b5793604084c4a676f, data reload: false query1 14121023991 991 query2 6177201219421942 query3 10993 452845124512 query4 25669 24006 23323 23323 query5 4306667 479 479 query6 325 203 189 189 query7 3994494 296 296 query8 301 259 226 226 query9 8490267626282628 query10 448 328 274 274 query11 15569 15179 14865 14865 query12 157 116 113 113 query13 1580525 409 409 query14 9928630164576301 query15 211 188 174 174 query16 7642614 522 522 query17 1315760 606 606 query18 2049421 329 329 query19 196 191 169 169 query20 132 128 125 125 query21 208 141 114 114 query22 4366461343864386 query23 34383 33350 33629 33350 query24 7438240624102406 query25 492 482 410 410 query26 1249279 156 156 query27 2457526 337 337 query28 4671250724802480 query29 683 566 434 434 query30 296 218 196 196 query31 912 863 774 774 query32 78 64 62 62 query33 551 363 298 298 query34 793 875 501 501 query35 808 863 768 768 query36 10341017890 890 query37 125 102 76 76 query38 4185420742294207 query39 1525141614201416 query40 217 116 103 103 query41 54 55 50 50 query42 124 105 110 105 query43 500 523 492 492 query44 1346819 828 819 query45 183 182 171 171 query46 882 1052640 640 query47 1847188017931793 query48 389 418 323 323 query49 802 516 450 450 query50 701 758 401 401 query51 4297430343794303 query52 100 105 98 98 query53 251 256 191 191 query54 490 503 423 423 query55 84 80 91 80 query56 299 257 263 257 query57 1143117611391139 query58 253 236 252 236 query59 2814298928452845 query60 297 272 264 264 query61 155 117 116 116 query62 785 739 671 671 query63 230 194 190 190 query64 40021006704 704 query65 4468430743584307 query66 929 400 286 286 query67 15622 15401 15219 15219 query68 6613880 524 524 query69 486 290 259 259 query70 1222110211171102 query71 420 286 261 261 query72 5163350137093501 query73 705 730 344 344 query74 9010880790118807 query75 3991322427092709 query76 47051184748 748 query77 904 369 277 277 query78 998510385 93239323 query79 2368875 594 594 query80 660 523 448 448 query81 475 258 220 220 query82 689 126 100 100 query83 183 184 158 158 query84 238 90 75 75 query85 781 345 309 309 query86 336 308 304 304 query87 4557456544754475 query88 2943221721982198 query89 397 324 283 283 query90 1881218 217 217 query91 143 145 109 109 query92 79 62 54 54 query93 11311055590 590 query94 676 383 294 294 query95 344 265 262 262 query96 485 552 271 271 query97 3369338332743274 query98 217 201 205 201 query99 1477137612711271 Total cold run time: 277045 ms Total hot run time: 191972 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] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2709667581 TPC-H: Total hot run time: 32323 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit ad6f6938716ae367acc4f1b5793604084c4a676f, data reload: false -- Round 1 -- q1 17628 516850675067 q2 2046294 161 161 q3 10418 1352713 713 q4 10212 1028571 571 q5 7513240323762376 q6 187 165 131 131 q7 935 748 614 614 q8 9326132610561056 q9 4984485846844684 q10 6824231218761876 q11 484 270 255 255 q12 351 345 216 216 q13 17785 366530913091 q14 226 228 214 214 q15 526 479 495 479 q16 618 609 575 575 q17 581 867 355 355 q18 7265639062186218 q19 1606968 566 566 q20 329 335 195 195 q21 2980213419241924 q22 10221043986 986 Total cold run time: 103846 ms Total hot run time: 32323 ms - Round 2, with runtime_filter_mode=off - q1 5178512850845084 q2 231 330 227 227 q3 2188267422922292 q4 1406182513811381 q5 4256414141474141 q6 205 167 127 127 q7 1910189217581758 q8 2662259325712571 q9 7292735469946994 q10 2959319327462746 q11 581 507 484 484 q12 678 771 643 643 q13 3444392232683268 q14 275 318 262 262 q15 526 472 472 472 q16 661 707 658 658 q17 1142165813181318 q18 7738762475617561 q19 827 801 967 801 q20 2001202318281828 q21 5230488949284889 q22 1136111310271027 Total cold run time: 52526 ms Total hot run time: 50532 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2709552148 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on code in PR #47591:
URL: https://github.com/apache/doris/pull/47591#discussion_r1986031363
##
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowQueryStatsCommand.java:
##
@@ -0,0 +1,188 @@
+// 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.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+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 org.apache.doris.statistics.query.QueryStatsUtil;
+
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * show query stats command
+ */
+public class ShowQueryStatsCommand extends ShowCommand {
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_CATALOG_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Database", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_DATABASE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("TableName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_VERBOSE_META_DATA
+= ShowResultSetMetaData.builder().addColumn(new
Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+
+private final String database;
+private final String table;
Review Comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2707209382 TPC-DS: Total hot run time: 192079 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 42c21e761178e2d266f6cc8ca0ca00c4dea71da7, data reload: false query1 1373975 1023975 query2 6237190718671867 query3 11062 470947604709 query4 26228 23615 23425 23425 query5 4788668 483 483 query6 302 207 207 207 query7 3981504 296 296 query8 301 241 237 237 query9 8510253525252525 query10 476 305 243 243 query11 15732 15004 14824 14824 query12 154 105 101 101 query13 1546509 393 393 query14 9475633362056205 query15 214 191 181 181 query16 7591622 523 523 query17 1109754 611 611 query18 1945409 314 314 query19 202 199 152 152 query20 131 119 122 119 query21 206 118 105 105 query22 4561441743374337 query23 34326 33636 33462 33462 query24 7839239924352399 query25 491 469 396 396 query26 1267279 155 155 query27 2435483 335 335 query28 4747245124042404 query29 683 587 454 454 query30 272 227 200 200 query31 913 886 802 802 query32 84 65 61 61 query33 583 351 324 324 query34 799 871 523 523 query35 800 858 782 782 query36 985 1003915 915 query37 119 102 75 75 query38 4376440042504250 query39 1515141114801411 query40 237 118 102 102 query41 52 52 49 49 query42 125 111 107 107 query43 503 502 486 486 query44 1315837 814 814 query45 182 173 173 173 query46 842 1042644 644 query47 1898190818321832 query48 389 429 323 323 query49 805 527 469 469 query50 711 756 440 440 query51 4221430442294229 query52 116 102 94 94 query53 224 263 192 192 query54 503 499 441 441 query55 84 83 82 82 query56 285 263 250 250 query57 1146117411221122 query58 253 239 231 231 query59 2782287627582758 query60 292 273 265 265 query61 123 120 113 113 query62 807 734 693 693 query63 234 190 192 190 query64 42101084676 676 query65 4708444945014449 query66 999 406 298 298 query67 16051 15487 15259 15259 query68 8298882 514 514 query69 481 298 271 271 query70 1185111311151113 query71 418 303 256 256 query72 5611355936913559 query73 737 737 338 338 query74 9206890687468746 query75 3328318026902690 query76 32941187734 734 query77 708 396 277 277 query78 10025 10185 93229322 query79 1939842 575 575 query80 715 513 449 449 query81 491 263 233 233 query82 420 126 96 96 query83 174 164 149 149 query84 252 97 75 75 query85 756 382 447 382 query86 391 305 277 277 query87 4498450644594459 query88 2838222322342223 query89 392 309 284 284 query90 1690206 206 206 query91 143 141 107 107 query92 63 57 57 57 query93 16951067583 583 query94 625 420 292 292 query95 352 267 256 256 query96 472 546 267 267 query97 3346337732623262 query98 216 209 207 207 query99 1314140312591259 Total cold run time: 278528 ms Total hot run time: 192079 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] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2707218155 ClickBench: Total hot run time: 31.24 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit 42c21e761178e2d266f6cc8ca0ca00c4dea71da7, data reload: false query1 0.030.030.02 query2 0.070.030.04 query3 0.230.060.06 query4 1.630.100.11 query5 0.560.560.55 query6 1.210.720.72 query7 0.020.010.02 query8 0.040.030.04 query9 0.580.510.51 query10 0.580.630.58 query11 0.150.110.12 query12 0.160.120.11 query13 0.620.600.60 query14 2.672.812.70 query15 0.930.860.85 query16 0.380.370.38 query17 1.031.071.03 query18 0.210.190.19 query19 1.931.811.92 query20 0.010.010.01 query21 15.36 0.880.55 query22 0.771.060.70 query23 14.99 1.400.60 query24 6.941.611.09 query25 0.510.110.22 query26 0.640.160.13 query27 0.050.050.04 query28 9.740.900.45 query29 12.51 4.053.38 query30 0.250.080.06 query31 2.810.580.39 query32 3.240.540.46 query33 3.043.023.04 query34 15.85 5.204.50 query35 4.554.534.58 query36 0.680.510.51 query37 0.090.070.07 query38 0.040.040.04 query39 0.030.030.02 query40 0.160.130.13 query41 0.080.030.03 query42 0.040.020.02 query43 0.040.030.02 Total cold run time: 105.45 s Total hot run time: 31.24 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2707187700 TPC-H: Total hot run time: 32947 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit 42c21e761178e2d266f6cc8ca0ca00c4dea71da7, data reload: false -- Round 1 -- q1 17574 530351355135 q2 2055318 178 178 q3 10602 1273783 783 q4 10209 1047553 553 q5 7521241923882388 q6 189 170 137 137 q7 931 757 622 622 q8 9317132011301130 q9 5049482047584758 q10 6863233219031903 q11 503 284 257 257 q12 357 353 229 229 q13 17766 369031203120 q14 238 226 220 220 q15 537 507 492 492 q16 637 616 590 590 q17 597 890 359 359 q18 6976635563236323 q19 1908988 576 576 q20 334 330 202 202 q21 3089223820042004 q22 10721054988 988 Total cold run time: 104324 ms Total hot run time: 32947 ms - Round 2, with runtime_filter_mode=off - q1 5248519652335196 q2 237 339 240 240 q3 2141268922992299 q4 1464186214311431 q5 4272414041544140 q6 212 167 126 126 q7 1996192318071807 q8 2684270826072607 q9 7252706872157068 q10 3071326927782778 q11 587 516 481 481 q12 689 765 597 597 q13 3455402732753275 q14 299 285 267 267 q15 529 490 474 474 q16 668 709 651 651 q17 1174160213841384 q18 7718766774527452 q19 843 798 959 798 q20 2014202718801880 q21 5625513946964696 q22 1127105010291029 Total cold run time: 53305 ms Total hot run time: 50676 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2707052048 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
starocean999 commented on code in PR #47591:
URL: https://github.com/apache/doris/pull/47591#discussion_r1984357754
##
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowQueryStatsCommand.java:
##
@@ -0,0 +1,165 @@
+// 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.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+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 org.apache.doris.statistics.query.QueryStatsUtil;
+
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * show query stats command
+ */
+public class ShowQueryStatsCommand extends ShowCommand {
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_CATALOG_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Database", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_DATABASE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("TableName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_VERBOSE_META_DATA
+= ShowResultSetMetaData.builder().addColumn(new
Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+
+private final String database;
+private final String table;
+private final boolean isAll;
+private final boolean isVerbose;
+
+/**
+ * Constructor
+ */
+public ShowQueryStatsCommand(String database, String table, boolean isAll,
boolean isVerbose) {
+super(PlanType.SHOW_QUERY_STATS_COMMAND);
+this.database = database;
+this.table = table;
+this.isAll = isAll;
+this.isVerbose = isVerbose;
+}
+
+@Override
+public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor)
throws Exception {
+String catalog = ctx.getCurrentCatalog().getName();
Review Comment:
please check the ShowQueryStatsStmt.analyze() method, there are some code
missing like bellow:
```
if (tableName != null) {
tableName.analyze(analyzer);
dbName = tableName.getDb();
}
Database db = (Database)
Env.getCurrentEnv().getCurrentCatalog().getDbOrDdlException(dbName);
String ctlName = db.getCatalog().getName();
if (tableName != null) {
db.getTableOrDdlException(tableName.getTbl());
}
```
you can create a `void validate(ConnectContext ctx)`method to wrap all
validation code to do exact same thing as old analyze() method. and just call
validate(ctx) here
--
This is an automated message from the
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
starocean999 commented on code in PR #47591:
URL: https://github.com/apache/doris/pull/47591#discussion_r1984355476
##
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowQueryStatsCommand.java:
##
@@ -0,0 +1,188 @@
+// 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.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+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 org.apache.doris.statistics.query.QueryStatsUtil;
+
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * show query stats command
+ */
+public class ShowQueryStatsCommand extends ShowCommand {
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_CATALOG_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Database", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_DATABASE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("TableName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_VERBOSE_META_DATA
+= ShowResultSetMetaData.builder().addColumn(new
Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+
+private final String database;
+private final String table;
Review Comment:
```suggestion
private final TableNameInfo table;
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2703892760 TPC-H: Total hot run time: 32643 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit bcf36947b8fb6d6531630d9d6cc0498bbb77e62f, data reload: false -- Round 1 -- q1 17582 517151085108 q2 2047304 164 164 q3 10411 1253740 740 q4 10212 1048510 510 q5 7639235823212321 q6 190 168 133 133 q7 872 744 608 608 q8 9290127010891089 q9 4899486348724863 q10 6845229618651865 q11 489 290 259 259 q12 347 353 212 212 q13 17773 369230663066 q14 232 231 221 221 q15 554 513 486 486 q16 643 642 587 587 q17 590 878 350 350 q18 7319650063956395 q19 2454967 553 553 q20 301 318 184 184 q21 2745208719471947 q22 11031017982 982 Total cold run time: 104537 ms Total hot run time: 32643 ms - Round 2, with runtime_filter_mode=off - q1 5293518751565156 q2 237 325 236 236 q3 2162266322842284 q4 1406184113951395 q5 4253409540834083 q6 207 160 125 125 q7 1951190218091809 q8 2625265525812581 q9 7198720671387138 q10 3051325228012801 q11 569 512 492 492 q12 656 748 572 572 q13 3432395632733273 q14 280 300 261 261 q15 511 488 475 475 q16 673 681 646 646 q17 1148159013641364 q18 7714755874787478 q19 807 843 1123843 q20 1945202518881888 q21 5397505747374737 q22 1126108010241024 Total cold run time: 52641 ms Total hot run time: 50661 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2703936031 ClickBench: Total hot run time: 31.63 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit bcf36947b8fb6d6531630d9d6cc0498bbb77e62f, data reload: false query1 0.040.030.03 query2 0.070.040.04 query3 0.230.060.07 query4 1.630.100.10 query5 0.560.550.57 query6 1.180.720.72 query7 0.030.020.02 query8 0.050.030.03 query9 0.600.510.52 query10 0.600.610.59 query11 0.150.110.11 query12 0.140.120.11 query13 0.640.610.60 query14 2.672.682.75 query15 0.910.850.85 query16 0.380.380.38 query17 1.061.021.05 query18 0.210.190.19 query19 1.941.971.80 query20 0.020.010.01 query21 15.36 0.890.53 query22 0.741.140.94 query23 14.72 1.390.66 query24 7.381.581.08 query25 0.470.270.16 query26 0.550.160.13 query27 0.050.050.05 query28 9.770.820.43 query29 12.58 4.123.41 query30 0.250.090.07 query31 2.810.580.39 query32 3.210.560.46 query33 3.003.023.05 query34 15.77 5.164.58 query35 4.554.594.52 query36 0.660.490.48 query37 0.100.070.06 query38 0.060.040.04 query39 0.030.030.02 query40 0.170.140.13 query41 0.080.020.02 query42 0.040.020.02 query43 0.040.030.04 Total cold run time: 105.5 s Total hot run time: 31.63 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2703921934 TPC-DS: Total hot run time: 191604 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 bcf36947b8fb6d6531630d9d6cc0498bbb77e62f, data reload: false query1 1393962 982 962 query2 6201199519431943 query3 11147 455244154415 query4 25690 23466 22960 22960 query5 3604649 493 493 query6 293 195 186 186 query7 3977491 291 291 query8 286 250 246 246 query9 8494256625502550 query10 470 316 267 267 query11 15295 15167 14842 14842 query12 179 109 107 107 query13 1564522 396 396 query14 9394623963406239 query15 208 192 180 180 query16 7572672 478 478 query17 1201715 588 588 query18 2032437 325 325 query19 209 210 166 166 query20 124 118 127 118 query21 206 124 105 105 query22 4430463345004500 query23 34171 33806 33674 33674 query24 8360248424642464 query25 519 501 424 424 query26 864 273 158 158 query27 2774505 337 337 query28 4828246024362436 query29 631 576 453 453 query30 273 247 192 192 query31 906 856 792 792 query32 72 66 65 65 query33 525 363 301 301 query34 791 870 541 541 query35 801 867 746 746 query36 10011048959 959 query37 129 106 76 76 query38 4174424641454145 query39 1491146714291429 query40 238 119 107 107 query41 59 55 52 52 query42 120 113 107 107 query43 533 528 503 503 query44 1335808 820 808 query45 185 177 166 166 query46 842 1033637 637 query47 1803189318111811 query48 385 435 310 310 query49 717 531 437 437 query50 686 736 419 419 query51 4339434242874287 query52 108 108 98 98 query53 240 268 203 203 query54 489 506 430 430 query55 92 89 90 89 query56 266 280 245 245 query57 1186118611321132 query58 253 247 243 243 query59 2693291729582917 query60 297 268 281 268 query61 126 122 117 117 query62 806 729 656 656 query63 237 197 192 192 query64 34171052692 692 query65 4478447344514451 query66 881 402 335 335 query67 16232 15560 15107 15107 query68 9559877 512 512 query69 484 305 271 271 query70 1235113211041104 query71 452 297 274 274 query72 5296345037363450 query73 778 727 355 355 query74 9266899187978797 query75 4227316626382638 query76 36621180747 747 query77 951 371 284 284 query78 999210235 92079207 query79 1594826 591 591 query80 626 574 463 463 query81 481 269 222 222 query82 506 130 96 96 query83 176 176 151 151 query84 234 92 74 74 query85 767 357 297 297 query86 332 296 280 280 query87 4516462743054305 query88 2874223422232223 query89 407 318 280 280 query90 1887215 217 215 query91 144 147 107 107 query92 71 60 58 58 query93 11501054588 588 query94 642 392 308 308 query95 351 277 262 262 query96 477 555 278 278 query97 3365339432793279 query98 219 211 206 206 query99 1591142213141314 Total cold run time: 277634 ms Total hot run time: 191604 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] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2703798205 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670814190 ClickBench: Total hot run time: 31.27 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit a2543103f06cef2606f61484b38b5b0dbb6a065d, data reload: false query1 0.030.030.03 query2 0.080.040.03 query3 0.250.060.06 query4 1.620.100.11 query5 0.400.420.40 query6 1.180.680.66 query7 0.020.020.01 query8 0.040.030.04 query9 0.590.510.54 query10 0.580.590.59 query11 0.150.110.11 query12 0.140.110.11 query13 0.620.610.60 query14 2.722.732.73 query15 0.930.850.84 query16 0.380.390.39 query17 1.051.011.02 query18 0.220.200.19 query19 1.931.821.99 query20 0.010.020.01 query21 15.34 0.870.53 query22 0.751.150.75 query23 14.87 1.400.61 query24 8.682.141.29 query25 0.500.220.17 query26 0.820.180.14 query27 0.050.040.04 query28 7.290.770.42 query29 12.52 3.903.24 query30 0.250.090.06 query31 2.820.600.39 query32 3.220.550.48 query33 3.022.982.99 query34 15.96 5.164.57 query35 4.574.544.61 query36 0.670.510.50 query37 0.090.060.06 query38 0.050.040.04 query39 0.030.020.03 query40 0.170.130.13 query41 0.080.030.03 query42 0.030.020.02 query43 0.040.040.03 Total cold run time: 104.76 s Total hot run time: 31.27 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670802730 TPC-DS: Total hot run time: 183641 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 a2543103f06cef2606f61484b38b5b0dbb6a065d, data reload: false query1 959 379 377 377 query2 6518186018281828 query3 6783219 209 209 query4 26207 24087 23751 23751 query5 4309661 482 482 query6 286 195 190 190 query7 4624507 300 300 query8 299 250 238 238 query9 8626254125362536 query10 444 329 271 271 query11 15670 15064 14986 14986 query12 155 106 108 106 query13 1698522 394 394 query14 9059605561256055 query15 215 190 170 170 query16 7115650 464 464 query17 908 692 532 532 query18 1945401 290 290 query19 189 182 158 158 query20 128 113 111 111 query21 214 117 99 99 query22 4075428043094280 query23 34402 33706 32811 32811 query24 7701238123222322 query25 505 451 407 407 query26 1230262 150 150 query27 2564498 334 334 query28 4317243123872387 query29 744 531 417 417 query30 224 191 160 160 query31 910 850 805 805 query32 70 63 60 60 query33 549 372 322 322 query34 761 836 500 500 query35 784 808 721 721 query36 962 970 884 884 query37 121 98 73 73 query38 4130423841324132 query39 1415142013861386 query40 203 113 99 99 query41 54 52 51 51 query42 134 104 106 104 query43 491 488 475 475 query44 1263788 789 788 query45 186 170 167 167 query46 886 1037670 670 query47 1748179017071707 query48 385 407 295 295 query49 756 501 386 386 query50 682 750 410 410 query51 4160417941284128 query52 103 107 102 102 query53 223 249 183 183 query54 469 487 401 401 query55 86 78 76 76 query56 254 279 247 247 query57 1109113010671067 query58 247 238 242 238 query59 2506267325282528 query60 275 259 255 255 query61 119 115 111 111 query62 802 712 662 662 query63 227 188 186 186 query64 43201034648 648 query65 3207314831333133 query66 1130387 303 303 query67 15799 15689 15534 15534 query68 2314793 566 566 query69 418 296 277 277 query70 1176110510941094 query71 340 289 265 265 query72 5903359237393592 query73 649 756 360 360 query74 9070899489248924 query75 3089316026752675 query76 22261155740 740 query77 338 386 281 281 query78 987210028 92319231 query79 1019877 601 601 query80 1185539 450 450 query81 538 272 244 244 query82 398 125 97 97 query83 261 180 156 156 query84 284 95 70 70 query85 768 344 291 291 query86 374 300 279 279 query87 4441450243614361 query88 2931221522412215 query89 395 318 276 276 query90 1822194 195 194 query91 131 143 106 106 query92 60 60 54 54 query93 1106991 585 585 query94 651 402 293 293 query95 345 279 262 262 query96 499 544 280 280 query97 2729285426962696 query98 220 211 203 203 query99 1311142612711271 Total cold run time: 260502 ms Total hot run time: 183641 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] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670779114 TPC-H: Total hot run time: 31477 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit a2543103f06cef2606f61484b38b5b0dbb6a065d, data reload: false -- Round 1 -- q1 17642 552551085108 q2 2039286 165 165 q3 10430 1341727 727 q4 10206 1029524 524 q5 7500250522952295 q6 191 167 142 142 q7 921 758 601 601 q8 9301134611511151 q9 4913456947104569 q10 6849233718981898 q11 498 275 252 252 q12 348 354 232 232 q13 17769 364630383038 q14 240 223 206 206 q15 505 465 454 454 q16 632 615 575 575 q17 595 867 345 345 q18 6497627162466246 q19 1213959 554 554 q20 314 321 199 199 q21 2769213618951895 q22 368 337 301 301 Total cold run time: 101740 ms Total hot run time: 31477 ms - Round 2, with runtime_filter_mode=off - q1 5163516051815160 q2 226 329 232 232 q3 2184267522922292 q4 1448180113751375 q5 4201415641564156 q6 208 166 127 127 q7 1891185216731673 q8 2657266225562556 q9 7351717671917176 q10 2981321327332733 q11 567 497 490 490 q12 696 746 593 593 q13 3523391432633263 q14 273 285 259 259 q15 523 470 453 453 q16 636 679 626 626 q17 1152161713061306 q18 7472729572827282 q19 792 858 1075858 q20 1954201818641864 q21 5328486248154815 q22 617 581 522 522 Total cold run time: 51843 ms Total hot run time: 49811 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670736374 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670450431 ClickBench: Total hot run time: 30.67 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit c2b00ae59f4f95382477360ce4397eff826a4381, data reload: false query1 0.030.030.04 query2 0.070.030.03 query3 0.240.060.07 query4 1.630.100.11 query5 0.420.410.39 query6 1.170.650.65 query7 0.030.010.01 query8 0.040.030.04 query9 0.600.520.53 query10 0.580.580.57 query11 0.140.110.11 query12 0.140.110.11 query13 0.630.600.60 query14 2.702.742.71 query15 0.910.850.84 query16 0.380.380.38 query17 1.011.021.03 query18 0.220.190.20 query19 1.861.971.82 query20 0.010.010.01 query21 15.35 0.850.54 query22 0.761.180.68 query23 14.91 1.340.65 query24 8.521.630.93 query25 0.450.280.13 query26 0.710.170.14 query27 0.050.050.05 query28 8.830.870.43 query29 12.59 3.923.28 query30 0.240.090.05 query31 2.830.590.38 query32 3.220.540.47 query33 3.013.093.03 query34 15.79 5.124.45 query35 4.544.484.54 query36 0.660.490.49 query37 0.080.060.06 query38 0.040.040.03 query39 0.030.020.03 query40 0.180.130.14 query41 0.070.020.02 query42 0.040.020.02 query43 0.040.040.03 Total cold run time: 105.75 s Total hot run time: 30.67 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670444580 TPC-DS: Total hot run time: 183287 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 c2b00ae59f4f95382477360ce4397eff826a4381, data reload: false query1 986 376 389 376 query2 6540184018241824 query3 6792214 224 214 query4 26399 23834 23474 23474 query5 4405690 475 475 query6 308 208 185 185 query7 4608510 297 297 query8 301 245 238 238 query9 8651254325792543 query10 440 340 257 257 query11 15552 15096 14856 14856 query12 152 116 112 112 query13 1662521 388 388 query14 8688650362076207 query15 217 199 170 170 query16 7147635 457 457 query17 1077723 562 562 query18 1954415 318 318 query19 191 188 160 160 query20 121 117 122 117 query21 213 121 102 102 query22 4089412244154122 query23 34438 33569 33061 33061 query24 7719237124242371 query25 529 452 382 382 query26 1226281 148 148 query27 2442481 338 338 query28 4181242923952395 query29 755 535 424 424 query30 229 185 147 147 query31 928 842 776 776 query32 75 60 63 60 query33 557 365 295 295 query34 763 840 519 519 query35 816 822 762 762 query36 968 972 881 881 query37 116 95 72 72 query38 4152418540604060 query39 1440138213891382 query40 202 115 98 98 query41 57 49 54 49 query42 120 104 104 104 query43 494 495 468 468 query44 1290795 796 795 query45 173 169 156 156 query46 855 1049643 643 query47 1729178016801680 query48 393 417 324 324 query49 789 484 424 424 query50 695 747 419 419 query51 4162414040944094 query52 109 102 95 95 query53 226 259 190 190 query54 489 504 420 420 query55 82 78 80 78 query56 252 252 237 237 query57 1142113510401040 query58 242 229 241 229 query59 2577256126732561 query60 295 268 263 263 query61 120 111 114 111 query62 781 729 656 656 query63 238 197 193 193 query64 4392982 695 695 query65 3237313931233123 query66 1151393 291 291 query67 16161 15520 15347 15347 query68 6827783 544 544 query69 477 298 254 254 query70 1168112410291029 query71 386 288 264 264 query72 6103359636623596 query73 713 745 359 359 query74 9188913589318931 query75 3134315227072707 query76 31571163743 743 query77 478 377 296 296 query78 10005 10022 92519251 query79 2716813 617 617 query80 629 514 447 447 query81 509 266 233 233 query82 377 129 95 95 query83 171 169 149 149 query84 268 99 79 79 query85 836 344 311 311 query86 377 300 287 287 query87 4566442043244324 query88 4287221222172212 query89 395 309 286 286 query90 1930194 191 191 query91 133 138 108 108 query92 73 57 55 55 query93 2531990 587 587 query94 742 417 293 293 query95 349 261 259 259 query96 496 543 274 274 query97 2797283627282728 query98 229 209 199 199 query99 1323142012691269 Total cold run time: 271650 ms Total hot run time: 183287 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] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670432686 TPC-H: Total hot run time: 31493 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit c2b00ae59f4f95382477360ce4397eff826a4381, data reload: false -- Round 1 -- q1 17593 530251045104 q2 2052293 172 172 q3 10421 1292712 712 q4 10211 1013539 539 q5 7502246422842284 q6 190 168 133 133 q7 938 757 623 623 q8 9302131411831183 q9 4976459146884591 q10 6805230918901890 q11 516 270 241 241 q12 357 347 226 226 q13 17775 366430463046 q14 223 221 216 216 q15 503 476 456 456 q16 620 614 582 582 q17 582 859 328 328 q18 6672616161806161 q19 1220951 541 541 q20 317 326 193 193 q21 2753216119691969 q22 360 322 303 303 Total cold run time: 101888 ms Total hot run time: 31493 ms - Round 2, with runtime_filter_mode=off - q1 5117516451485148 q2 233 325 239 239 q3 2164265922612261 q4 1414182213711371 q5 4201416841934168 q6 212 164 127 127 q7 1872182416801680 q8 2595256624982498 q9 7319718671867186 q10 2963314827232723 q11 579 507 492 492 q12 699 790 652 652 q13 3511382832733273 q14 271 302 261 261 q15 521 465 467 465 q16 632 682 627 627 q17 1124158513501350 q18 7548729974007299 q19 831 807 902 807 q20 1964199418491849 q21 5358482548444825 q22 667 584 536 536 Total cold run time: 51795 ms Total hot run time: 49837 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670407484 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2670404837 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2669274756 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2669409830 ClickBench: Total hot run time: 30.45 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit 4b8770ae49c5db13098eb7fa10c0a5947fade2a0, data reload: false query1 0.030.030.03 query2 0.080.030.04 query3 0.230.060.07 query4 1.630.110.10 query5 0.440.430.39 query6 1.150.660.67 query7 0.020.010.01 query8 0.040.030.03 query9 0.610.520.51 query10 0.560.560.58 query11 0.160.110.11 query12 0.150.110.11 query13 0.630.600.61 query14 2.762.712.72 query15 0.920.870.85 query16 0.370.370.39 query17 1.020.991.01 query18 0.220.200.20 query19 1.911.792.00 query20 0.010.020.01 query21 15.37 0.880.53 query22 0.761.100.71 query23 15.00 1.300.59 query24 11.15 1.210.74 query25 0.480.220.13 query26 0.890.190.13 query27 0.050.050.05 query28 6.460.800.44 query29 12.65 4.073.31 query30 0.250.100.06 query31 2.830.590.40 query32 3.230.540.47 query33 3.103.023.03 query34 15.76 5.104.47 query35 4.554.484.51 query36 0.670.520.48 query37 0.100.060.06 query38 0.060.040.04 query39 0.030.020.02 query40 0.180.130.13 query41 0.080.030.02 query42 0.030.020.02 query43 0.040.040.03 Total cold run time: 106.66 s Total hot run time: 30.45 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2669395994 TPC-DS: Total hot run time: 190434 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 4b8770ae49c5db13098eb7fa10c0a5947fade2a0, data reload: false query1 1355948 948 948 query2 6209185817961796 query3 10930 460145984598 query4 56305 24312 23342 23342 query5 5171540 503 503 query6 372 195 190 190 query7 5166509 296 296 query8 332 250 246 246 query9 6294254425412541 query10 425 296 247 247 query11 15190 15042 14890 14890 query12 164 112 111 111 query13 1156541 369 369 query14 10694 634068106340 query15 210 209 192 192 query16 7112639 494 494 query17 1078756 607 607 query18 1585421 327 327 query19 204 218 172 172 query20 131 123 120 120 query21 208 133 106 106 query22 4597453643964396 query23 33792 33159 33144 33144 query24 5779244624612446 query25 449 457 407 407 query26 706 296 149 149 query27 1804514 331 331 query28 2804249724362436 query29 595 568 438 438 query30 211 193 159 159 query31 963 856 831 831 query32 74 61 59 59 query33 442 367 314 314 query34 751 866 532 532 query35 824 846 743 743 query36 964 983 909 909 query37 119 99 72 72 query38 4290431542564256 query39 1462143014261426 query40 207 120 109 109 query41 51 52 53 52 query42 135 106 108 106 query43 469 499 481 481 query44 1348814 811 811 query45 185 178 167 167 query46 885 1047655 655 query47 1834192617971797 query48 408 432 316 316 query49 699 536 388 388 query50 743 743 432 432 query51 4299430342854285 query52 110 106 100 100 query53 235 255 189 189 query54 485 502 431 431 query55 87 80 79 79 query56 264 275 257 257 query57 1149118611471147 query58 236 237 246 237 query59 2723272126992699 query60 290 275 257 257 query61 115 119 123 119 query62 728 756 667 667 query63 239 197 189 189 query64 15201091664 664 query65 3225310831413108 query66 733 383 297 297 query67 15898 15603 15583 15583 query68 5364771 533 533 query69 516 306 276 276 query70 1213112611301126 query71 447 323 266 266 query72 5900356636823566 query73 1014753 351 351 query74 9221908289928992 query75 3279313426512651 query76 38531167732 732 query77 559 367 280 280 query78 10020 10134 92979297 query79 2736844 624 624 query80 819 527 443 443 query81 538 282 242 242 query82 512 124 98 98 query83 181 175 150 150 query84 291 95 85 85 query85 807 350 307 307 query86 449 311 280 280 query87 4472449645274496 query88 3938221722172217 query89 419 321 299 299 query90 1809195 194 194 query91 139 144 109 109 query92 74 58 60 58 query93 27151021583 583 query94 668 404 296 296 query95 345 271 267 267 query96 506 557 280 280 query97 2766285327642764 query98 227 202 193 193 query99 1278141912741274 Total cold run time: 297292 ms Total hot run time: 190434 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] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2669366339 TPC-H: Total hot run time: 31393 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit 4b8770ae49c5db13098eb7fa10c0a5947fade2a0, data reload: false -- Round 1 -- q1 17636 528051085108 q2 2058300 169 169 q3 10410 1234756 756 q4 10205 1001542 542 q5 7468243422482248 q6 184 167 131 131 q7 902 734 606 606 q8 9288128211591159 q9 4862466846294629 q10 6809229119081908 q11 472 282 258 258 q12 349 352 221 221 q13 17778 363930443044 q14 219 226 216 216 q15 520 460 455 455 q16 623 608 580 580 q17 586 847 329 329 q18 6788605161436051 q19 1212940 542 542 q20 297 318 187 187 q21 2734211619491949 q22 356 326 305 305 Total cold run time: 101756 ms Total hot run time: 31393 ms - Round 2, with runtime_filter_mode=off - q1 5128519251625162 q2 239 344 242 242 q3 2112266522872287 q4 1426180613511351 q5 4236409441114094 q6 207 171 124 124 q7 1853181016451645 q8 2556258825292529 q9 7137714371617143 q10 3243318727742774 q11 578 512 492 492 q12 688 779 609 609 q13 3643380433933393 q14 275 304 282 282 q15 519 460 451 451 q16 620 676 634 634 q17 1125161413191319 q18 7738734072707270 q19 823 912 1082912 q20 1971200218811881 q21 5483499747844784 q22 607 603 527 527 Total cold run time: 52207 ms Total hot run time: 49905 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2669290796 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
morrySnow commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2668324419 need rebase -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2648648067 ClickBench: Total hot run time: 31.06 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit 0eecad004b49c0eba6b0018e7e2239a20fe1897a, data reload: false query1 0.040.030.04 query2 0.060.040.02 query3 0.240.060.06 query4 1.630.100.10 query5 0.420.430.39 query6 1.180.670.65 query7 0.020.010.02 query8 0.040.030.03 query9 0.610.520.53 query10 0.570.580.58 query11 0.160.110.11 query12 0.140.110.11 query13 0.620.600.60 query14 2.792.692.70 query15 0.920.860.87 query16 0.370.390.38 query17 1.031.051.00 query18 0.210.190.19 query19 1.941.772.08 query20 0.020.010.02 query21 15.36 0.890.56 query22 0.751.180.64 query23 14.97 1.410.62 query24 6.662.371.18 query25 0.440.300.21 query26 0.610.160.15 query27 0.050.050.06 query28 10.14 0.820.45 query29 12.54 4.023.37 query30 0.240.090.06 query31 2.840.590.39 query32 3.240.550.46 query33 3.043.023.05 query34 15.84 5.104.51 query35 4.534.534.50 query36 0.670.500.48 query37 0.090.070.06 query38 0.050.030.04 query39 0.040.020.02 query40 0.170.130.12 query41 0.080.030.02 query42 0.040.020.02 query43 0.040.030.03 Total cold run time: 105.44 s Total hot run time: 31.06 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2648633629 TPC-DS: Total hot run time: 192025 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 0eecad004b49c0eba6b0018e7e2239a20fe1897a, data reload: false query1 1326939 948 939 query2 6140185018271827 query3 10988 446243474347 query4 52996 25696 23652 23652 query5 5049640 483 483 query6 344 195 211 195 query7 4882542 302 302 query8 316 267 258 258 query9 5495253925142514 query10 438 322 260 260 query11 15055 15279 14937 14937 query12 164 111 110 110 query13 1036528 412 412 query14 9961699471666994 query15 212 210 185 185 query16 6827693 480 480 query17 1084754 585 585 query18 1562428 330 330 query19 220 213 172 172 query20 136 127 134 127 query21 220 126 112 112 query22 4334457545194519 query23 34400 33639 33481 33481 query24 5686242223962396 query25 460 467 418 418 query26 636 272 157 157 query27 1813483 343 343 query28 2811242624202420 query29 571 569 440 440 query30 215 185 166 166 query31 897 908 831 831 query32 73 61 60 60 query33 430 368 310 310 query34 791 861 516 516 query35 797 846 796 796 query36 963 999 909 909 query37 129 109 81 81 query38 4256444842444244 query39 1527144114441441 query40 207 120 112 112 query41 54 66 50 50 query42 134 109 113 109 query43 529 527 495 495 query44 1376832 823 823 query45 183 175 179 175 query46 896 1061668 668 query47 1849188518271827 query48 392 419 313 313 query49 690 536 426 426 query50 738 775 415 415 query51 4219428942204220 query52 119 112 101 101 query53 242 270 188 188 query54 496 523 429 429 query55 84 77 86 77 query56 267 285 258 258 query57 1137118511421142 query58 266 259 241 241 query59 2711280527882788 query60 283 271 274 271 query61 115 120 116 116 query62 766 761 694 694 query63 231 191 210 191 query64 13701021672 672 query65 3329315431643154 query66 758 390 297 297 query67 15873 15463 15460 15460 query68 5682784 513 513 query69 542 290 264 264 query70 1232114311261126 query71 439 295 274 274 query72 6050370239093702 query73 1333760 353 353 query74 8954909789888988 query75 3198311627002700 query76 38971179741 741 query77 488 375 297 297 query78 10072 10178 93189318 query79 2011831 606 606 query80 682 535 495 495 query81 499 273 251 251 query82 254 154 116 116 query83 187 172 158 158 query84 284 95 76 76 query85 748 347 299 299 query86 347 314 293 293 query87 4658463845214521 query88 2945223321872187 query89 391 308 291 291 query90 1676196 192 192 query91 140 139 109 109 query92 79 61 53 53 query93 22441024583 583 query94 696 409 304 304 query95 347 275 263 263 query96 487 552 266 266 query97 2775285927602760 query98 242 208 201 201 query99 1302143112641264 Total cold run time: 289435 ms Total hot run time: 192025 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
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2648600875 TPC-H: Total hot run time: 31671 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit 0eecad004b49c0eba6b0018e7e2239a20fe1897a, data reload: false -- Round 1 -- q1 17599 524250155015 q2 2039302 165 165 q3 10410 1257750 750 q4 10203 1023550 550 q5 7742240923712371 q6 192 163 136 136 q7 891 775 621 621 q8 9296122811131113 q9 4876466847774668 q10 6823231118841884 q11 458 283 258 258 q12 347 370 224 224 q13 17765 371031193119 q14 224 227 214 214 q15 500 460 446 446 q16 640 602 610 602 q17 588 870 345 345 q18 6524635162266226 q19 1207946 541 541 q20 315 332 195 195 q21 2961216019291929 q22 362 336 299 299 Total cold run time: 101962 ms Total hot run time: 31671 ms - Round 2, with runtime_filter_mode=off - q1 5162513851745138 q2 253 326 240 240 q3 2129269123162316 q4 1457183613901390 q5 4270413241404132 q6 213 169 126 126 q7 1865183116831683 q8 2626265825942594 q9 7249711171287111 q10 2979318327952795 q11 582 541 499 499 q12 703 801 661 661 q13 3547390433543354 q14 278 291 284 284 q15 511 454 484 454 q16 654 677 650 650 q17 1163162913711371 q18 7617736771967196 q19 782 809 779 779 q20 1970203619061906 q21 5311506548204820 q22 643 594 579 579 Total cold run time: 51964 ms Total hot run time: 50078 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on code in PR #47591:
URL: https://github.com/apache/doris/pull/47591#discussion_r1949382244
##
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowQueryStatsCommand.java:
##
@@ -0,0 +1,165 @@
+// 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.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+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 org.apache.doris.statistics.query.QueryStatsUtil;
+
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * show query stats command
+ */
+public class ShowQueryStatsCommand extends ShowCommand {
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_CATALOG_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Database", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_DATABASE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("TableName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_VERBOSE_META_DATA
+= ShowResultSetMetaData.builder().addColumn(new
Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+
+private final String database;
+private final String table;
+private final boolean isAll;
+private final boolean isVerbose;
+
+/**
+ * Constructor
+ */
+public ShowQueryStatsCommand(String database, String table, boolean isAll,
boolean isVerbose) {
+super(PlanType.SHOW_QUERY_STATS_COMMAND);
+this.database = database;
+this.table = table;
+this.isAll = isAll;
+this.isVerbose = isVerbose;
+}
+
+@Override
+public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor)
throws Exception {
+String catalog = ctx.getCurrentCatalog().getName();
Review Comment:
Thank you. Please help to review again.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2648471155 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
starocean999 commented on code in PR #47591:
URL: https://github.com/apache/doris/pull/47591#discussion_r1948465799
##
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowQueryStatsCommand.java:
##
@@ -0,0 +1,165 @@
+// 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.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+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 org.apache.doris.statistics.query.QueryStatsUtil;
+
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * show query stats command
+ */
+public class ShowQueryStatsCommand extends ShowCommand {
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_CATALOG_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Database", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_DATABASE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("TableName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_META_DATA = ShowResultSetMetaData.builder()
+.addColumn(new Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount",
ScalarType.createVarchar(30))).build();
+private static final ShowResultSetMetaData
SHOW_QUERY_STATS_TABLE_ALL_VERBOSE_META_DATA
+= ShowResultSetMetaData.builder().addColumn(new
Column("IndexName", ScalarType.createVarchar(20)))
+.addColumn(new Column("Field", ScalarType.createVarchar(20)))
+.addColumn(new Column("QueryCount", ScalarType.createVarchar(30)))
+.addColumn(new Column("FilterCount",
ScalarType.createVarchar(30))).build();
+
+private final String database;
+private final String table;
+private final boolean isAll;
+private final boolean isVerbose;
+
+/**
+ * Constructor
+ */
+public ShowQueryStatsCommand(String database, String table, boolean isAll,
boolean isVerbose) {
+super(PlanType.SHOW_QUERY_STATS_COMMAND);
+this.database = database;
+this.table = table;
+this.isAll = isAll;
+this.isVerbose = isVerbose;
+}
+
+@Override
+public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor)
throws Exception {
+String catalog = ctx.getCurrentCatalog().getName();
Review Comment:
The new code is slightly different from old analyze method in
ShowQueryStatsStmt.java. Could you please do exactly the same thing for
nereids. ( like use default db if database is null, and some checkGlobalPriv
calls are missing)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: commits-unsub
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2642486278 run external -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2642243369 ClickBench: Total hot run time: 30.21 s ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools ClickBench test result on commit b179dd76d767e1614677e76ab2fe50c0ece7c8f9, data reload: false query1 0.040.040.04 query2 0.070.030.03 query3 0.240.060.07 query4 1.630.100.10 query5 0.420.420.41 query6 1.160.680.65 query7 0.020.020.01 query8 0.040.020.03 query9 0.610.520.50 query10 0.570.580.56 query11 0.160.110.10 query12 0.150.110.11 query13 0.630.590.62 query14 2.802.742.68 query15 0.930.860.84 query16 0.370.370.36 query17 1.061.061.03 query18 0.210.200.20 query19 1.921.842.02 query20 0.010.010.02 query21 15.41 0.870.56 query22 0.751.130.61 query23 15.07 1.380.59 query24 6.811.700.64 query25 0.520.240.10 query26 0.600.170.15 query27 0.040.040.04 query28 9.200.880.43 query29 12.53 3.943.30 query30 0.250.090.06 query31 2.860.590.39 query32 3.220.540.46 query33 3.023.023.05 query34 15.76 5.134.47 query35 4.534.554.47 query36 0.650.480.49 query37 0.100.060.07 query38 0.050.040.03 query39 0.020.020.02 query40 0.170.130.12 query41 0.080.030.02 query42 0.040.030.02 query43 0.030.040.03 Total cold run time: 104.75 s Total hot run time: 30.21 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2642233608 TPC-DS: Total hot run time: 183779 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 b179dd76d767e1614677e76ab2fe50c0ece7c8f9, data reload: false query1 974 390 381 381 query2 6528182118211821 query3 6795213 220 213 query4 26490 23448 23614 23448 query5 4367668 495 495 query6 296 199 195 195 query7 4609512 304 304 query8 296 244 240 240 query9 8608250124952495 query10 482 320 248 248 query11 15568 15069 15071 15069 query12 158 113 111 111 query13 1665530 411 411 query14 8984638363006300 query15 203 195 177 177 query16 7381600 464 464 query17 1189696 540 540 query18 1960402 298 298 query19 214 204 151 151 query20 119 117 111 111 query21 207 121 100 100 query22 4236428741974197 query23 33750 32884 32956 32884 query24 7900240924132409 query25 543 447 387 387 query26 1227275 153 153 query27 2522478 334 334 query28 4218238123762376 query29 783 536 412 412 query30 234 181 156 156 query31 947 831 791 791 query32 78 65 64 64 query33 562 362 305 305 query34 786 852 524 524 query35 799 819 739 739 query36 965 998 899 899 query37 124 102 86 86 query38 4288411640594059 query39 1438138813931388 query40 213 120 110 110 query41 54 53 50 50 query42 121 107 102 102 query43 516 515 480 480 query44 1322779 777 777 query45 182 168 159 159 query46 850 1042650 650 query47 1749180017351735 query48 371 409 329 329 query49 773 535 425 425 query50 695 738 416 416 query51 4192419141254125 query52 109 110 96 96 query53 226 264 191 191 query54 478 494 401 401 query55 86 83 83 83 query56 267 277 253 253 query57 1144115010751075 query58 252 239 239 239 query59 2744261726582617 query60 320 273 264 264 query61 117 113 126 113 query62 791 717 668 668 query63 236 203 194 194 query64 43821002690 690 query65 3220314031493140 query66 1163477 301 301 query67 15702 15477 15342 15342 query68 6787769 509 509 query69 488 297 273 273 query70 1249115511201120 query71 400 306 257 257 query72 5617361136723611 query73 760 746 360 360 query74 9370913088448844 query75 3139316727162716 query76 31741167735 735 query77 473 378 277 277 query78 995910080 91699169 query79 1751846 584 584 query80 619 537 472 472 query81 502 277 240 240 query82 225 151 126 126 query83 169 183 161 161 query84 244 91 83 83 query85 742 342 301 301 query86 378 309 297 297 query87 4359458844374437 query88 3172217121622162 query89 394 312 287 287 query90 1983201 193 193 query91 131 137 105 105 query92 79 63 58 58 query93 17461016589 589 query94 677 464 301 301 query95 356 275 266 266 query96 488 560 270 270 query97 2754284227412741 query98 229 218 203 203 query99 1294144612721272 Total cold run time: 268476 ms Total hot run time: 183779 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] [feat](nereids) support show query stats in nereids [doris]
doris-robot commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2642210938 TPC-H: Total hot run time: 31697 ms ``` machine: 'aliyun_ecs.c7a.8xlarge_32C64G' scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools Tpch sf100 test result on commit b179dd76d767e1614677e76ab2fe50c0ece7c8f9, data reload: false -- Round 1 -- q1 17631 523051355135 q2 2044313 167 167 q3 10481 1314720 720 q4 10300 1009536 536 q5 8316244223232323 q6 211 171 140 140 q7 921 746 623 623 q8 9293135210671067 q9 5529467646604660 q10 6801233418851885 q11 488 278 264 264 q12 348 347 220 220 q13 17760 368331343134 q14 231 229 206 206 q15 505 473 473 473 q16 613 616 583 583 q17 589 874 334 334 q18 7166622162686221 q19 1330945 545 545 q20 313 331 195 195 q21 2926217119641964 q22 366 330 302 302 Total cold run time: 104162 ms Total hot run time: 31697 ms - Round 2, with runtime_filter_mode=off - q1 5186513851335133 q2 241 326 232 232 q3 2166267822722272 q4 1486183313931393 q5 4235419941944194 q6 199 164 123 123 q7 1859187817991799 q8 2574291325252525 q9 7258707072337070 q10 3011321227292729 q11 565 509 478 478 q12 675 743 634 634 q13 3570391632463246 q14 286 294 270 270 q15 505 456 446 446 q16 641 675 641 641 q17 1142161513481348 q18 7616723673487236 q19 809 813 953 813 q20 1952201718641864 q21 5385498848504850 q22 677 596 549 549 Total cold run time: 52038 ms Total hot run time: 49845 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
Thearas commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2642175315 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). Please clearly describe your PR: 1. What problem was fixed (it's best to include specific error reporting information). How it was fixed. 2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be. 3. What features were added. Why was this function added? 4. Which code was refactored and why was this part of the code refactored? 5. Which functions were optimized and what is the difference before and after the optimization? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [feat](nereids) support show query stats in nereids [doris]
felixwluo commented on PR #47591: URL: https://github.com/apache/doris/pull/47591#issuecomment-2642175810 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
