Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](window_funnel) fix wrong result of window_funnel #38954 #40001

Open
wants to merge 1 commit into
base: branch-2.0
Choose a base branch
from

Conversation

jacktengg
Copy link
Contributor

BP #38954

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@jacktengg
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -21,25 +21,29 @@

#pragma once

#include <stddef.h>
#include <stdint.h>
#include <gen_cpp/data.pb.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gen_cpp/data.pb.h' file not found [clang-diagnostic-error]

#include <gen_cpp/data.pb.h>
         ^

}

template <WindowFunnelMode WINDOW_FUNNEL_MODE>
int _get_internal() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function '_get_internal' should be marked [[nodiscard]] [modernize-use-nodiscard]

Suggested change
int _get_internal() const {
[[nodiscard]] int _get_internal() const {

}
return max_found_event_count;
}
int get() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'get' should be marked [[nodiscard]] [modernize-use-nodiscard]

Suggested change
int get() const {
[[nodiscard]] int get() const {

data->enable_mode = version >= 3;
}

String get_name() const override { return "window_funnel"; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'get_name' should be marked [[nodiscard]] [modernize-use-nodiscard]

Suggested change
String get_name() const override { return "window_funnel"; }
[[nodiscard]] String get_name() const override { return "window_funnel"; }


String get_name() const override { return "window_funnel"; }

DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt32>(); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'get_return_type' should be marked [[nodiscard]] [modernize-use-nodiscard]

Suggested change
DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt32>(); }
[[nodiscard]] DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt32>(); }

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.96% (8149/21466)
Line Coverage: 29.65% (67124/226411)
Region Coverage: 29.12% (34603/118844)
Branch Coverage: 25.00% (17825/71312)
Coverage Report: http://coverage.selectdb-in.cc/coverage/50586c0c1a6027e792b484dc051b2cffbd2eab4c_50586c0c1a6027e792b484dc051b2cffbd2eab4c/report/index.html

@doris-robot
Copy link

TPC-H: Total hot run time: 50112 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 50586c0c1a6027e792b484dc051b2cffbd2eab4c, data reload: false

------ Round 1 ----------------------------------
q1	17776	4467	4330	4330
q2	2029	157	146	146
q3	10454	1939	1956	1939
q4	10364	1245	1305	1245
q5	8645	3994	3933	3933
q6	231	124	125	124
q7	1993	1629	1606	1606
q8	9344	2749	2712	2712
q9	10893	10676	10590	10590
q10	8650	3542	3516	3516
q11	417	250	254	250
q12	480	307	305	305
q13	18345	3985	4025	3985
q14	353	322	325	322
q15	518	462	457	457
q16	680	577	576	576
q17	1139	956	992	956
q18	7353	6877	6799	6799
q19	1706	1551	1525	1525
q20	520	312	294	294
q21	4431	4136	4117	4117
q22	485	399	385	385
Total cold run time: 116806 ms
Total hot run time: 50112 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4346	4295	4303	4295
q2	326	219	222	219
q3	4186	4168	4171	4168
q4	2737	2750	2731	2731
q5	7224	7160	7205	7160
q6	233	119	119	119
q7	3226	2913	2879	2879
q8	4408	4507	4521	4507
q9	17378	17372	17205	17205
q10	4291	4268	4281	4268
q11	760	680	689	680
q12	1031	862	841	841
q13	6824	3790	3735	3735
q14	471	417	415	415
q15	502	465	461	461
q16	746	702	669	669
q17	3854	3890	3800	3800
q18	8736	8825	8766	8766
q19	1725	1699	1676	1676
q20	2374	2114	2123	2114
q21	8551	8524	8538	8524
q22	1006	958	948	948
Total cold run time: 84935 ms
Total hot run time: 80180 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 201670 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 50586c0c1a6027e792b484dc051b2cffbd2eab4c, data reload: false

query1	927	388	414	388
query2	6582	2344	2164	2164
query3	6924	205	198	198
query4	21417	18000	17838	17838
query5	19746	6554	6544	6544
query6	284	218	231	218
query7	4166	295	307	295
query8	253	249	245	245
query9	3168	2728	2650	2650
query10	423	317	300	300
query11	11340	10647	10678	10647
query12	127	80	74	74
query13	5606	675	662	662
query14	17442	13797	13706	13706
query15	395	219	224	219
query16	6507	286	265	265
query17	1725	1444	877	877
query18	2332	418	408	408
query19	219	148	150	148
query20	83	79	79	79
query21	192	95	100	95
query22	5318	5070	4979	4979
query23	32385	31858	31824	31824
query24	7007	6492	6473	6473
query25	512	438	444	438
query26	527	163	160	160
query27	1839	294	299	294
query28	6152	2278	2243	2243
query29	3045	2741	2705	2705
query30	249	169	167	167
query31	902	738	740	738
query32	70	63	62	62
query33	412	269	257	257
query34	869	489	480	480
query35	1129	909	914	909
query36	1353	1148	1079	1079
query37	90	62	62	62
query38	3093	2933	2930	2930
query39	1375	1328	1311	1311
query40	213	99	95	95
query41	39	38	38	38
query42	88	88	80	80
query43	629	633	585	585
query44	1134	716	718	716
query45	242	230	237	230
query46	1224	979	967	967
query47	1824	1806	1714	1714
query48	970	682	653	653
query49	629	371	371	371
query50	872	621	579	579
query51	4767	4711	4599	4599
query52	103	72	86	72
query53	451	326	323	323
query54	2661	2450	2465	2450
query55	84	77	80	77
query56	216	208	188	188
query57	1228	1063	1098	1063
query58	231	203	212	203
query59	3540	3210	3222	3210
query60	215	202	208	202
query61	98	97	106	97
query62	823	461	454	454
query63	487	339	344	339
query64	2414	1441	1458	1441
query65	3636	3539	3572	3539
query66	773	384	371	371
query67	15290	15081	15245	15081
query68	10057	637	638	637
query69	579	350	348	348
query70	1793	1335	1361	1335
query71	399	317	309	309
query72	6486	3466	3490	3466
query73	734	326	323	323
query74	6212	5876	5869	5869
query75	5215	3695	3806	3695
query76	6537	1135	1210	1135
query77	1119	264	261	261
query78	12829	11608	12440	11608
query79	9140	646	634	634
query80	952	409	423	409
query81	488	240	236	236
query82	1492	99	100	99
query83	183	139	134	134
query84	267	73	73	73
query85	877	329	325	325
query86	312	315	311	311
query87	3215	3078	3026	3026
query88	4598	2305	2293	2293
query89	469	299	280	280
query90	1859	213	216	213
query91	165	122	123	122
query92	63	56	55	55
query93	5715	553	590	553
query94	649	222	209	209
query95	1137	1067	1066	1066
query96	641	321	322	321
query97	6439	6379	6463	6379
query98	188	186	180	180
query99	2927	975	898	898
Total cold run time: 314802 ms
Total hot run time: 201670 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.55 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 50586c0c1a6027e792b484dc051b2cffbd2eab4c, data reload: false

query1	0.02	0.02	0.02
query2	0.07	0.02	0.03
query3	0.25	0.05	0.05
query4	1.77	0.06	0.06
query5	0.52	0.53	0.53
query6	1.23	0.62	0.67
query7	0.02	0.01	0.01
query8	0.03	0.02	0.02
query9	0.50	0.50	0.48
query10	0.54	0.52	0.54
query11	0.12	0.09	0.10
query12	0.12	0.10	0.10
query13	0.63	0.62	0.62
query14	0.78	0.79	0.78
query15	0.79	0.77	0.78
query16	0.37	0.39	0.39
query17	1.00	1.03	1.02
query18	0.20	0.26	0.23
query19	1.90	1.86	1.87
query20	0.01	0.01	0.01
query21	15.48	0.57	0.55
query22	2.09	1.83	1.32
query23	17.05	1.01	0.97
query24	4.62	1.81	1.95
query25	0.43	0.06	0.05
query26	0.75	0.17	0.18
query27	0.04	0.03	0.04
query28	6.82	0.75	0.73
query29	12.66	2.40	2.35
query30	0.58	0.56	0.54
query31	2.80	0.38	0.37
query32	3.41	0.50	0.49
query33	3.06	3.04	3.09
query34	15.65	4.83	4.84
query35	4.89	4.83	4.86
query36	1.05	1.02	1.02
query37	0.06	0.05	0.04
query38	0.03	0.02	0.02
query39	0.03	0.02	0.01
query40	0.16	0.14	0.14
query41	0.07	0.02	0.01
query42	0.02	0.02	0.01
query43	0.02	0.02	0.02
Total cold run time: 102.64 s
Total hot run time: 31.55 s

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 50586c0c1a6027e792b484dc051b2cffbd2eab4c with default session variables
Stream load json:         20 seconds loaded 2358488459 Bytes, about 112 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       22.4 seconds inserted 10000000 Rows, about 446K ops/s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 27, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. kind/test reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants