Skip to content

Conversation

@924060929
Copy link
Contributor

@924060929 924060929 commented Apr 1, 2024

Proposed changes

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

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

@924060929
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

2 similar comments
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17676	4172	4138	4138
q2	2018	190	191	190
q3	10462	1278	1442	1278
q4	10204	852	973	852
q5	7464	3021	2944	2944
q6	218	136	134	134
q7	1112	650	606	606
q8	9429	2083	2058	2058
q9	6690	6217	6177	6177
q10	8460	3517	3522	3517
q11	416	243	240	240
q12	382	216	216	216
q13	17772	2906	2903	2903
q14	277	239	249	239
q15	535	485	476	476
q16	492	409	383	383
q17	975	928	922	922
q18	7185	6458	6395	6395
q19	1634	1562	1549	1549
q20	600	322	308	308
q21	3584	3137	3108	3108
q22	367	308	307	307
Total cold run time: 107952 ms
Total hot run time: 38940 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4120	4084	4060	4060
q2	330	217	227	217
q3	2986	2981	2953	2953
q4	1880	1888	1799	1799
q5	5266	5238	5254	5238
q6	212	134	129	129
q7	2285	1817	1806	1806
q8	3235	3343	3315	3315
q9	8531	8518	8512	8512
q10	3749	5004	4004	4004
q11	575	488	473	473
q12	775	640	611	611
q13	16852	3230	3106	3106
q14	307	308	280	280
q15	538	489	493	489
q16	479	439	453	439
q17	1771	1773	1774	1773
q18	8297	7966	7772	7772
q19	1722	1714	1672	1672
q20	1988	1816	1823	1816
q21	5290	4984	4984	4984
q22	492	440	435	435
Total cold run time: 71680 ms
Total hot run time: 55883 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.54% (8840/24870)
Line Coverage: 27.28% (72502/265806)
Region Coverage: 26.48% (37524/141709)
Branch Coverage: 23.29% (19136/82164)
Coverage Report: http://coverage.selectdb-in.cc/coverage/3dfbe6e56bee8f5453a4a0251f30d2b861b12961_3dfbe6e56bee8f5453a4a0251f30d2b861b12961/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 182522 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 3dfbe6e56bee8f5453a4a0251f30d2b861b12961, data reload: false

query1	882	1118	1120	1118
query2	6193	1894	1997	1894
query3	6652	212	203	203
query4	24181	21461	21371	21371
query5	4156	406	396	396
query6	278	188	188	188
query7	4610	294	306	294
query8	226	179	168	168
query9	8467	2225	2235	2225
query10	445	252	260	252
query11	14997	14462	14551	14462
query12	142	97	93	93
query13	1635	383	382	382
query14	8533	6998	6941	6941
query15	204	172	178	172
query16	6726	286	283	283
query17	959	614	582	582
query18	1844	289	286	286
query19	208	167	170	167
query20	98	94	98	94
query21	200	130	129	129
query22	4958	4791	4766	4766
query23	33487	32952	32919	32919
query24	13471	3265	3403	3265
query25	737	413	414	413
query26	1721	172	164	164
query27	3279	377	405	377
query28	6957	1916	1870	1870
query29	1220	672	625	625
query30	305	159	155	155
query31	1077	746	756	746
query32	102	63	60	60
query33	716	258	256	256
query34	1300	519	527	519
query35	848	740	759	740
query36	1024	894	876	876
query37	146	83	76	76
query38	3785	3632	3574	3574
query39	1652	1627	1595	1595
query40	233	138	140	138
query41	48	44	43	43
query42	119	109	102	102
query43	450	412	411	411
query44	1098	753	732	732
query45	302	274	260	260
query46	1101	820	793	793
query47	2006	1863	1897	1863
query48	382	314	313	313
query49	896	370	377	370
query50	835	408	415	408
query51	7048	6896	6812	6812
query52	126	102	98	98
query53	368	296	302	296
query54	323	233	228	228
query55	85	77	77	77
query56	247	224	230	224
query57	1290	1171	1186	1171
query58	242	230	217	217
query59	2651	2485	2383	2383
query60	249	243	230	230
query61	113	93	86	86
query62	651	456	457	456
query63	308	281	297	281
query64	5816	3386	3178	3178
query65	3067	3031	3005	3005
query66	1334	325	323	323
query67	15451	14861	15145	14861
query68	8515	571	579	571
query69	568	336	335	335
query70	1200	1130	1098	1098
query71	486	286	282	282
query72	6383	2711	2472	2472
query73	809	322	321	321
query74	6670	6309	6450	6309
query75	3257	2263	2277	2263
query76	4812	1123	1224	1123
query77	561	242	243	242
query78	10824	10074	10102	10074
query79	9920	541	526	526
query80	1478	422	410	410
query81	494	228	222	222
query82	755	109	103	103
query83	215	163	162	162
query84	262	88	87	87
query85	1329	283	277	277
query86	435	279	302	279
query87	3729	3511	3508	3508
query88	4219	2275	2301	2275
query89	549	367	377	367
query90	1907	173	173	173
query91	129	104	108	104
query92	65	51	51	51
query93	6960	542	539	539
query94	1006	187	194	187
query95	438	348	339	339
query96	622	269	275	269
query97	2655	2467	2481	2467
query98	228	228	213	213
query99	1267	823	819	819
Total cold run time: 298007 ms
Total hot run time: 182522 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.04	0.04
query3	0.23	0.05	0.04
query4	1.67	0.06	0.06
query5	0.50	0.49	0.49
query6	1.12	0.65	0.65
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.58	0.51	0.51
query10	0.57	0.57	0.57
query11	0.14	0.11	0.11
query12	0.14	0.12	0.12
query13	0.62	0.60	0.59
query14	0.76	0.80	0.77
query15	0.86	0.83	0.85
query16	0.35	0.35	0.35
query17	0.99	0.99	0.98
query18	0.25	0.25	0.25
query19	1.83	1.81	1.72
query20	0.01	0.01	0.01
query21	15.40	0.76	0.68
query22	2.79	5.06	3.04
query23	17.54	1.21	1.15
query24	1.49	0.35	0.22
query25	0.14	0.10	0.08
query26	0.28	0.17	0.18
query27	0.08	0.09	0.09
query28	13.49	0.95	0.97
query29	12.65	3.33	3.29
query30	0.26	0.05	0.05
query31	2.86	0.40	0.39
query32	3.26	0.47	0.47
query33	2.85	2.90	2.84
query34	15.49	4.34	4.33
query35	4.38	4.36	4.40
query36	0.67	0.47	0.46
query37	0.20	0.17	0.17
query38	0.17	0.18	0.16
query39	0.05	0.03	0.04
query40	0.18	0.14	0.14
query41	0.10	0.05	0.06
query42	0.06	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 105.22 s
Total hot run time: 31.38 s

@doris-robot
Copy link

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

Load test result on commit 3dfbe6e56bee8f5453a4a0251f30d2b861b12961 with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       16.3 seconds inserted 10000000 Rows, about 613K ops/s

@924060929
Copy link
Contributor Author

run buildall

@924060929 924060929 changed the title [fix](Nereids) Fix group concat [fix](Nereids) fix group concat Apr 1, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17654	4137	4104	4104
q2	2002	189	182	182
q3	10486	1314	1404	1314
q4	10213	874	1022	874
q5	7497	3007	2931	2931
q6	220	138	138	138
q7	1135	620	611	611
q8	9399	2090	2063	2063
q9	6687	6208	6189	6189
q10	8454	3528	3521	3521
q11	420	242	239	239
q12	388	227	220	220
q13	17793	2885	2896	2885
q14	274	239	245	239
q15	539	490	479	479
q16	522	394	375	375
q17	963	924	926	924
q18	7139	6522	6483	6483
q19	1625	1547	1555	1547
q20	586	322	305	305
q21	3583	3161	3113	3113
q22	366	313	315	313
Total cold run time: 107945 ms
Total hot run time: 39049 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4127	4062	4081	4062
q2	330	224	222	222
q3	2973	2979	2951	2951
q4	1878	1845	1796	1796
q5	5224	5212	5208	5208
q6	213	131	130	130
q7	2248	1798	1792	1792
q8	3246	3325	3334	3325
q9	8561	8520	8518	8518
q10	3780	4002	3988	3988
q11	569	464	501	464
q12	742	588	597	588
q13	16934	3095	3083	3083
q14	307	267	293	267
q15	541	515	503	503
q16	500	453	434	434
q17	1782	1757	1726	1726
q18	8269	7749	7529	7529
q19	1688	1694	1693	1693
q20	2038	1827	1866	1827
q21	5217	4959	4933	4933
q22	487	438	454	438
Total cold run time: 71654 ms
Total hot run time: 55477 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.54% (8840/24870)
Line Coverage: 27.28% (72497/265761)
Region Coverage: 26.48% (37522/141726)
Branch Coverage: 23.28% (19133/82174)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ae9c0ec395000b9a490c7133ee8cfb81dcd76e32_ae9c0ec395000b9a490c7133ee8cfb81dcd76e32/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 182564 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 ae9c0ec395000b9a490c7133ee8cfb81dcd76e32, data reload: false

query1	1238	1114	1126	1114
query2	6325	1805	1937	1805
query3	6663	216	212	212
query4	24888	21479	21433	21433
query5	4176	396	387	387
query6	268	185	180	180
query7	4599	304	295	295
query8	224	169	168	168
query9	8430	2251	2238	2238
query10	442	245	265	245
query11	14885	14429	14491	14429
query12	135	97	101	97
query13	1633	402	395	395
query14	8542	6992	7065	6992
query15	210	174	190	174
query16	6846	278	275	275
query17	984	603	589	589
query18	1853	302	298	298
query19	215	163	169	163
query20	104	96	94	94
query21	200	135	133	133
query22	5042	4831	4858	4831
query23	33521	32702	32728	32702
query24	11564	3268	3180	3180
query25	693	451	435	435
query26	1508	176	172	172
query27	3139	377	404	377
query28	7074	1892	1878	1878
query29	1080	610	598	598
query30	301	161	159	159
query31	1016	741	769	741
query32	97	64	62	62
query33	700	250	249	249
query34	1139	512	539	512
query35	860	746	777	746
query36	1018	853	873	853
query37	140	76	82	76
query38	3733	3564	3635	3564
query39	1609	1586	1599	1586
query40	238	157	141	141
query41	45	45	44	44
query42	120	113	111	111
query43	431	409	415	409
query44	1116	723	731	723
query45	307	272	267	267
query46	1102	831	792	792
query47	1979	1877	1910	1877
query48	396	308	313	308
query49	869	375	354	354
query50	824	427	408	408
query51	6946	6853	6922	6853
query52	115	100	100	100
query53	373	313	293	293
query54	299	253	242	242
query55	92	79	79	79
query56	255	241	241	241
query57	1299	1209	1194	1194
query58	252	234	236	234
query59	2605	2454	2471	2454
query60	268	240	233	233
query61	111	109	106	106
query62	660	452	451	451
query63	315	286	292	286
query64	5111	3091	3199	3091
query65	3036	3008	3028	3008
query66	997	324	321	321
query67	15329	14898	14856	14856
query68	8837	576	591	576
query69	567	336	331	331
query70	1228	1116	1081	1081
query71	528	288	284	284
query72	6458	2622	2469	2469
query73	919	322	325	322
query74	6658	6395	6389	6389
query75	3625	2329	2263	2263
query76	5564	1137	1201	1137
query77	590	243	250	243
query78	10819	10080	10122	10080
query79	8662	532	543	532
query80	1327	424	415	415
query81	486	224	226	224
query82	722	103	104	103
query83	210	162	163	162
query84	272	87	88	87
query85	1304	279	284	279
query86	423	310	299	299
query87	3669	3507	3513	3507
query88	4022	2288	2291	2288
query89	562	377	381	377
query90	1939	185	193	185
query91	134	104	112	104
query92	61	55	52	52
query93	6535	539	540	539
query94	969	205	195	195
query95	435	336	337	336
query96	621	272	268	268
query97	2668	2535	2488	2488
query98	233	220	213	213
query99	1370	823	828	823
Total cold run time: 295001 ms
Total hot run time: 182564 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.05	0.04
query3	0.24	0.04	0.05
query4	1.66	0.07	0.07
query5	0.48	0.49	0.48
query6	1.13	0.66	0.65
query7	0.02	0.02	0.01
query8	0.06	0.04	0.04
query9	0.56	0.50	0.49
query10	0.54	0.58	0.56
query11	0.16	0.11	0.11
query12	0.14	0.12	0.12
query13	0.63	0.59	0.59
query14	0.77	0.78	0.79
query15	0.85	0.83	0.86
query16	0.35	0.35	0.36
query17	0.98	0.98	1.00
query18	0.24	0.25	0.25
query19	1.79	1.77	1.72
query20	0.01	0.01	0.01
query21	15.43	0.77	0.69
query22	2.80	6.06	2.61
query23	17.67	1.25	1.05
query24	1.40	0.24	0.23
query25	0.14	0.09	0.08
query26	0.29	0.17	0.18
query27	0.08	0.09	0.08
query28	13.83	0.96	0.92
query29	12.59	3.29	3.40
query30	0.26	0.06	0.06
query31	2.86	0.38	0.38
query32	3.28	0.47	0.47
query33	2.86	2.85	2.87
query34	15.51	4.37	4.38
query35	4.39	4.36	4.39
query36	0.68	0.48	0.47
query37	0.20	0.16	0.18
query38	0.16	0.17	0.16
query39	0.04	0.04	0.04
query40	0.18	0.16	0.15
query41	0.10	0.06	0.06
query42	0.06	0.06	0.05
query43	0.04	0.04	0.04
Total cold run time: 105.58 s
Total hot run time: 30.89 s

@doris-robot
Copy link

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

Load test result on commit ae9c0ec395000b9a490c7133ee8cfb81dcd76e32 with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      32 seconds loaded 861443392 Bytes, about 25 MB/s
Insert into select:       16.2 seconds inserted 10000000 Rows, about 617K ops/s

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Apr 1, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

PR approved by anyone and no changes requested.

@starocean999 starocean999 merged commit e7d6697 into apache:master Apr 1, 2024
@924060929 924060929 deleted the fix_group_concat branch April 2, 2024 02:12
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Apr 10, 2024
Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Apr 10, 2024
Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty
yiguolei pushed a commit that referenced this pull request Apr 10, 2024
Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty
924060929 added a commit to 924060929/incubator-doris that referenced this pull request May 24, 2024
Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)
morrySnow pushed a commit that referenced this pull request May 24, 2024
cherry pick from #33091
commit e7d6697

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)

* [fix](Nereids) fix group concat (#33091)

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty
morrySnow pushed a commit that referenced this pull request May 28, 2024
…ty (#35497)

fix Illegal aggregate node: group by and output is empty.
introduced by #33091
yiguolei pushed a commit that referenced this pull request May 29, 2024
…ty (#35497)

fix Illegal aggregate node: group by and output is empty.
introduced by #33091
dataroaring pushed a commit that referenced this pull request May 31, 2024
…ty (#35497)

fix Illegal aggregate node: group by and output is empty.
introduced by #33091
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Jul 2, 2024
Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
cherry pick from apache#33091
commit e7d6697

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)

* [fix](Nereids) fix group concat (apache#33091)

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty
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.0.11-merged dev/2.1.3-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants