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

[enhancement](nereids)support subquery in LogicalGenerator #40663

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

starocean999
Copy link
Contributor

Proposed changes

select e1 from (select 1) t lateral view explode((select sequence(CURRENT_DATE(), date_add(CURRENT_DATE(), interval 2 day)))) t2 as e1;

The subquery in explode is supported by this pr

@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.

@starocean999
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17787	4979	4360	4360
q2	2013	187	182	182
q3	11871	974	1138	974
q4	10510	714	788	714
q5	7776	2889	2835	2835
q6	224	138	136	136
q7	956	637	619	619
q8	9882	2138	2072	2072
q9	7477	6628	6615	6615
q10	7010	2252	2209	2209
q11	472	250	241	241
q12	404	225	221	221
q13	18179	3144	3117	3117
q14	292	241	242	241
q15	558	489	499	489
q16	551	476	465	465
q17	1041	753	716	716
q18	7942	7401	7412	7401
q19	2853	1071	1035	1035
q20	705	334	329	329
q21	4076	3091	3084	3084
q22	1145	1064	1066	1064
Total cold run time: 113724 ms
Total hot run time: 39119 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4573	4372	4357	4357
q2	385	283	283	283
q3	2887	2620	2674	2620
q4	2078	1788	1806	1788
q5	5721	5779	5675	5675
q6	224	140	139	139
q7	2178	1803	1855	1803
q8	3349	3506	3463	3463
q9	8915	8812	9015	8812
q10	3577	3382	3411	3382
q11	596	502	487	487
q12	802	658	658	658
q13	15852	3262	3341	3262
q14	319	309	308	308
q15	550	504	494	494
q16	535	494	486	486
q17	1863	1540	1531	1531
q18	8086	7882	7816	7816
q19	1073	1019	957	957
q20	2021	2031	2003	2003
q21	5250	5224	5028	5028
q22	1130	1148	1121	1121
Total cold run time: 71964 ms
Total hot run time: 56473 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197513 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 623df8dc9e43cbaddddba4d876f0ab0ecbb6b777, data reload: false

query1	1254	890	879	879
query2	6452	1863	1845	1845
query3	10638	3761	3910	3761
query4	60530	27843	23167	23167
query5	4986	503	500	500
query6	396	184	163	163
query7	5624	305	297	297
query8	307	223	224	223
query9	7458	2500	2496	2496
query10	450	277	269	269
query11	17373	15047	15471	15047
query12	159	107	102	102
query13	1447	408	396	396
query14	10779	7451	6910	6910
query15	231	175	175	175
query16	6810	503	509	503
query17	1086	587	586	586
query18	919	306	305	305
query19	204	163	151	151
query20	122	117	117	117
query21	206	105	107	105
query22	4838	4408	4660	4408
query23	34645	33585	33816	33585
query24	6045	2953	2933	2933
query25	508	409	399	399
query26	629	155	159	155
query27	1608	284	284	284
query28	3736	2079	2050	2050
query29	654	433	430	430
query30	232	152	156	152
query31	957	773	798	773
query32	77	57	58	57
query33	427	303	292	292
query34	886	486	490	486
query35	868	746	741	741
query36	1065	945	940	940
query37	154	90	89	89
query38	4021	3908	4004	3908
query39	1446	1408	1408	1408
query40	201	118	117	117
query41	48	44	45	44
query42	120	96	97	96
query43	526	478	491	478
query44	1117	767	757	757
query45	201	170	168	168
query46	1100	759	769	759
query47	1862	1820	1791	1791
query48	375	291	286	286
query49	761	438	444	438
query50	841	413	423	413
query51	6942	7003	6921	6921
query52	99	86	91	86
query53	261	177	194	177
query54	579	454	457	454
query55	73	76	82	76
query56	306	263	264	263
query57	1213	1023	1078	1023
query58	221	231	252	231
query59	3004	2854	2871	2854
query60	287	287	267	267
query61	110	99	100	99
query62	754	633	625	625
query63	216	191	183	183
query64	1378	680	685	680
query65	3231	3172	3216	3172
query66	654	373	352	352
query67	15844	15567	15205	15205
query68	2121	866	855	855
query69	428	330	329	329
query70	1219	1188	1214	1188
query71	358	348	352	348
query72	4602	3483	3622	3483
query73	598	583	583	583
query74	9083	8940	9032	8940
query75	3104	2924	3023	2924
query76	973	872	862	862
query77	517	424	424	424
query78	9397	9512	9291	9291
query79	902	877	857	857
query80	836	823	824	823
query81	455	261	259	259
query82	279	265	269	265
query83	192	189	193	189
query84	202	107	106	106
query85	628	425	391	391
query86	335	325	291	291
query87	4366	4441	4325	4325
query88	4295	4172	4072	4072
query89	384	370	370	370
query90	1352	316	313	313
query91	124	123	123	123
query92	79	71	77	71
query93	935	931	925	925
query94	513	355	354	354
query95	432	420	411	411
query96	475	472	472	472
query97	3143	3115	3076	3076
query98	232	220	237	220
query99	1315	1276	1271	1271
Total cold run time: 296425 ms
Total hot run time: 197513 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.04
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.08	0.08
query5	0.50	0.50	0.49
query6	1.12	0.74	0.72
query7	0.02	0.02	0.01
query8	0.06	0.05	0.05
query9	0.54	0.49	0.49
query10	0.54	0.55	0.55
query11	0.16	0.12	0.12
query12	0.15	0.13	0.12
query13	0.60	0.58	0.58
query14	1.43	1.42	1.44
query15	0.85	0.84	0.81
query16	0.38	0.37	0.38
query17	0.95	0.97	1.02
query18	0.21	0.20	0.21
query19	1.93	1.77	1.74
query20	0.02	0.01	0.01
query21	15.39	0.68	0.66
query22	3.72	7.53	1.65
query23	18.27	1.44	1.24
query24	2.16	0.22	0.21
query25	0.16	0.09	0.07
query26	0.28	0.18	0.18
query27	0.08	0.09	0.08
query28	13.26	1.03	1.00
query29	12.64	3.39	3.32
query30	0.24	0.06	0.06
query31	2.87	0.40	0.39
query32	3.23	0.48	0.49
query33	3.02	3.02	3.02
query34	17.05	4.36	4.39
query35	4.47	4.43	4.43
query36	0.66	0.48	0.52
query37	0.18	0.15	0.16
query38	0.15	0.14	0.15
query39	0.05	0.04	0.04
query40	0.16	0.12	0.12
query41	0.10	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.75 s
Total hot run time: 31.08 s

@starocean999 starocean999 marked this pull request as ready for review September 12, 2024 02:02
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 18, 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.

@starocean999 starocean999 merged commit 83f899b into apache:master Sep 19, 2024
26 of 29 checks passed
dataroaring pushed a commit that referenced this pull request Oct 9, 2024
select e1 from (select 1) t lateral view explode(**(select
sequence(CURRENT_DATE(), date_add(CURRENT_DATE(), interval 2 day)))**)
t2 as e1;

The **subquery** in explode is supported by this pr
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. dev/2.1.x-experimental dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants