You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "LiBinfeng-01 (via GitHub)" <gi...@apache.org> on 2024/06/12 10:01:51 UTC

[PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

LiBinfeng-01 opened a new pull request, #36193:
URL: https://github.com/apache/doris/pull/36193

   Problem:
   when using leading like:
   leading(t1 {t2 t3} {t4 t5} t6)
   it would not generate correct plan because levellist can not express enough message of braces
   Solved:
   remove levellist express of leading levels and use poland expression
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2162673540

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 172631 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit a7c5347ffe9ad6f4a1550a1f7a03e126de1ac3e1, data reload: false
   
   query1	934	392	379	379
   query2	6457	2433	2307	2307
   query3	6646	219	231	219
   query4	19205	17241	17292	17241
   query5	4146	490	474	474
   query6	250	165	160	160
   query7	4585	297	300	297
   query8	321	298	294	294
   query9	8528	2381	2344	2344
   query10	593	307	294	294
   query11	10638	10136	9993	9993
   query12	146	102	86	86
   query13	1648	394	372	372
   query14	10278	7755	6803	6803
   query15	220	190	195	190
   query16	7912	283	296	283
   query17	1867	564	542	542
   query18	1999	292	301	292
   query19	210	160	162	160
   query20	102	89	89	89
   query21	216	130	136	130
   query22	4234	4146	3953	3953
   query23	33747	33116	33088	33088
   query24	11937	2847	2839	2839
   query25	655	384	357	357
   query26	1796	163	158	158
   query27	3014	316	330	316
   query28	7465	2004	2010	2004
   query29	1124	639	629	629
   query30	294	157	151	151
   query31	946	743	763	743
   query32	93	54	58	54
   query33	790	292	282	282
   query34	947	482	474	474
   query35	743	646	623	623
   query36	1076	915	942	915
   query37	219	73	74	73
   query38	2900	2741	2745	2741
   query39	870	808	807	807
   query40	280	131	131	131
   query41	59	52	52	52
   query42	125	99	103	99
   query43	612	534	539	534
   query44	1264	740	735	735
   query45	205	161	171	161
   query46	1130	758	739	739
   query47	1813	1738	1758	1738
   query48	394	304	300	300
   query49	1203	410	414	410
   query50	768	391	399	391
   query51	6829	6697	6716	6697
   query52	109	91	99	91
   query53	380	294	296	294
   query54	941	449	449	449
   query55	77	73	76	73
   query56	324	260	256	256
   query57	1144	1032	1019	1019
   query58	261	239	291	239
   query59	3315	3244	3013	3013
   query60	314	290	280	280
   query61	89	87	88	87
   query62	652	448	465	448
   query63	330	300	303	300
   query64	9934	2241	1711	1711
   query65	3202	3172	3096	3096
   query66	1365	331	339	331
   query67	15378	14949	14953	14949
   query68	4635	557	558	557
   query69	456	320	316	316
   query70	1180	1102	1065	1065
   query71	403	282	281	281
   query72	7048	5372	5540	5372
   query73	785	334	329	329
   query74	6007	5593	5462	5462
   query75	3619	2673	2662	2662
   query76	2779	915	929	915
   query77	467	313	299	299
   query78	10502	9806	9759	9759
   query79	1696	539	568	539
   query80	814	503	479	479
   query81	576	226	222	222
   query82	798	108	105	105
   query83	270	168	167	167
   query84	237	84	85	84
   query85	1561	290	266	266
   query86	485	342	318	318
   query87	3291	3065	3086	3065
   query88	3915	2456	2456	2456
   query89	484	403	411	403
   query90	1813	197	194	194
   query91	138	104	101	101
   query92	69	51	50	50
   query93	2107	518	512	512
   query94	1210	189	244	189
   query95	413	321	323	321
   query96	598	275	271	271
   query97	3269	3117	3078	3078
   query98	232	206	195	195
   query99	1187	855	820	820
   Total cold run time: 275292 ms
   Total hot run time: 172631 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "LiBinfeng-01 (via GitHub)" <gi...@apache.org>.
LiBinfeng-01 commented on code in PR #36193:
URL: https://github.com/apache/doris/pull/36193#discussion_r1637409945


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java:
##########
@@ -87,81 +87,83 @@ public LeadingHint(String hintName) {
     public LeadingHint(String hintName, List<String> parameters, String originalString) {
         super(hintName);
         this.originalString = originalString;
-        this.parameters = parameters;
-        int level = 0;
-        Stack<Boolean> brace = new Stack<>();
-        String lastParameter = "";
-        for (String parameter : parameters) {
-            if (parameter.equals("{")) {
-                if (lastParameter.equals("}")) {
-                    level += 2;
-                    brace.push(true);
-                } else {
-                    ++level;
-                    brace.push(false);
-                }
-            } else if (parameter.equals("}")) {
-                if (brace.pop().equals(true)) {
-                    level -= 2;
-                } else {
-                    level--;
-                }
-            } else if (parameter.equals("shuffle")) {
-                DistributeHint distributeHint = new DistributeHint(DistributeType.SHUFFLE_RIGHT);
-                distributeHints.put(tablelist.size(), distributeHint);
-                if (!ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) {
-                    ConnectContext.get().getStatementContext().addHint(distributeHint);
-                }
-            } else if (parameter.equals("broadcast")) {
-                DistributeHint distributeHint = new DistributeHint(DistributeType.BROADCAST_RIGHT);
-                distributeHints.put(tablelist.size(), distributeHint);
-                if (!ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) {
-                    ConnectContext.get().getStatementContext().addHint(distributeHint);
-                }
+        addJoinParameters = insertJoinIntoParameters(parameters);
+        normalizedParameters = parseIntoPolandNotation(addJoinParameters);

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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2164280166

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 39750 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 9866eb501b6d0ed6c2fdf3d5491d4c6773e7813c, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17636	4281	4281	4281
   q2	2032	187	193	187
   q3	10468	1114	1106	1106
   q4	10188	818	855	818
   q5	7476	2667	2620	2620
   q6	224	136	136	136
   q7	952	606	596	596
   q8	9228	2048	2077	2048
   q9	8862	6464	6441	6441
   q10	8797	3698	3695	3695
   q11	457	239	235	235
   q12	408	223	219	219
   q13	17787	2975	2985	2975
   q14	261	219	209	209
   q15	513	482	486	482
   q16	524	378	375	375
   q17	962	726	714	714
   q18	7965	7353	7346	7346
   q19	3985	1426	1419	1419
   q20	669	314	305	305
   q21	4892	3215	4028	3215
   q22	391	328	330	328
   Total cold run time: 114677 ms
   Total hot run time: 39750 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	4402	4186	4303	4186
   q2	375	269	258	258
   q3	2972	2780	2920	2780
   q4	1980	1727	1727	1727
   q5	5559	5588	5501	5501
   q6	215	136	130	130
   q7	2147	1792	1889	1792
   q8	3287	3451	3370	3370
   q9	8655	8636	8808	8636
   q10	4090	3886	3826	3826
   q11	571	476	492	476
   q12	756	632	639	632
   q13	16005	3182	3147	3147
   q14	314	283	274	274
   q15	523	486	472	472
   q16	513	428	418	418
   q17	1819	1529	1494	1494
   q18	8090	7868	7729	7729
   q19	3875	1488	1541	1488
   q20	2170	1901	1874	1874
   q21	5072	4885	4884	4884
   q22	590	531	546	531
   Total cold run time: 73980 ms
   Total hot run time: 55625 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2162611385

   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
   
   Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
   See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2164256809

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2164256832

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "LiBinfeng-01 (via GitHub)" <gi...@apache.org>.
LiBinfeng-01 commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2162611552

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2162653856

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 40068 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit a7c5347ffe9ad6f4a1550a1f7a03e126de1ac3e1, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17789	4474	4427	4427
   q2	2386	188	208	188
   q3	10459	1143	1104	1104
   q4	10195	781	849	781
   q5	7495	2817	2653	2653
   q6	223	138	140	138
   q7	961	608	614	608
   q8	9227	2070	2096	2070
   q9	8919	6495	6532	6495
   q10	8937	3731	3758	3731
   q11	449	235	246	235
   q12	411	237	237	237
   q13	17766	2988	3008	2988
   q14	257	229	224	224
   q15	527	478	488	478
   q16	530	383	382	382
   q17	971	746	681	681
   q18	8126	7560	7338	7338
   q19	6101	1491	1470	1470
   q20	677	309	331	309
   q21	4931	3233	3200	3200
   q22	391	331	338	331
   Total cold run time: 117728 ms
   Total hot run time: 40068 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	4377	4225	4222	4222
   q2	366	271	259	259
   q3	3016	2753	2726	2726
   q4	1918	1607	1645	1607
   q5	5244	5278	5283	5278
   q6	217	129	131	129
   q7	2098	1681	1775	1681
   q8	3175	3337	3337	3337
   q9	8297	8327	8401	8327
   q10	3869	3696	3701	3696
   q11	588	477	479	477
   q12	776	576	621	576
   q13	16665	3023	2986	2986
   q14	305	273	263	263
   q15	519	492	477	477
   q16	471	414	423	414
   q17	1776	1500	1457	1457
   q18	7536	7626	7482	7482
   q19	1711	1530	1612	1530
   q20	1977	1768	1781	1768
   q21	4742	4673	4753	4673
   q22	615	547	544	544
   Total cold run time: 70258 ms
   Total hot run time: 53909 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2164289682

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 173901 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 9866eb501b6d0ed6c2fdf3d5491d4c6773e7813c, data reload: false
   
   query1	931	398	375	375
   query2	6446	2308	2208	2208
   query3	6629	205	205	205
   query4	19892	17314	17435	17314
   query5	3569	483	470	470
   query6	237	156	157	156
   query7	4587	300	289	289
   query8	300	262	291	262
   query9	8614	2472	2438	2438
   query10	591	330	284	284
   query11	10671	9955	9970	9955
   query12	125	85	88	85
   query13	1643	365	375	365
   query14	9954	7575	7600	7575
   query15	221	195	186	186
   query16	7774	280	274	274
   query17	1886	564	541	541
   query18	1959	283	284	283
   query19	196	158	155	155
   query20	92	85	82	82
   query21	210	142	131	131
   query22	4258	4151	3983	3983
   query23	33836	33620	33604	33604
   query24	11128	2877	2851	2851
   query25	599	394	384	384
   query26	721	157	157	157
   query27	2249	317	330	317
   query28	6411	2143	2125	2125
   query29	897	643	624	624
   query30	273	160	159	159
   query31	955	780	753	753
   query32	87	51	57	51
   query33	767	273	277	273
   query34	1018	485	472	472
   query35	737	630	629	629
   query36	1127	988	975	975
   query37	143	69	72	69
   query38	2890	2816	2830	2816
   query39	914	862	803	803
   query40	215	128	125	125
   query41	57	54	54	54
   query42	108	98	110	98
   query43	601	552	552	552
   query44	1206	720	724	720
   query45	188	160	164	160
   query46	1065	706	733	706
   query47	1843	1779	1742	1742
   query48	377	301	299	299
   query49	840	387	398	387
   query50	772	389	395	389
   query51	6892	6669	6684	6669
   query52	97	97	85	85
   query53	363	291	286	286
   query54	879	468	445	445
   query55	73	73	72	72
   query56	275	254	256	254
   query57	1118	1039	1044	1039
   query58	236	235	248	235
   query59	3345	3185	3191	3185
   query60	281	264	291	264
   query61	95	89	89	89
   query62	604	447	455	447
   query63	314	281	279	279
   query64	8647	2180	1708	1708
   query65	3200	3088	3113	3088
   query66	786	326	330	326
   query67	15614	15047	15147	15047
   query68	4635	534	537	534
   query69	536	364	337	337
   query70	1163	1133	1127	1127
   query71	413	276	268	268
   query72	7870	5234	5596	5234
   query73	757	327	329	327
   query74	6003	5450	5512	5450
   query75	3960	2614	2665	2614
   query76	2711	935	865	865
   query77	662	290	287	287
   query78	10390	10099	9726	9726
   query79	2467	509	503	503
   query80	2085	479	467	467
   query81	564	228	225	225
   query82	1456	108	99	99
   query83	301	168	171	168
   query84	271	84	102	84
   query85	1303	333	268	268
   query86	463	319	331	319
   query87	3296	3068	3087	3068
   query88	3787	2459	2462	2459
   query89	470	385	372	372
   query90	1798	192	192	192
   query91	130	96	99	96
   query92	61	48	51	48
   query93	2448	502	496	496
   query94	1112	189	197	189
   query95	413	314	326	314
   query96	600	272	272	272
   query97	3188	3061	3045	3045
   query98	226	198	195	195
   query99	1169	830	825	825
   Total cold run time: 272336 ms
   Total hot run time: 173901 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly merged PR #36193:
URL: https://github.com/apache/doris/pull/36193


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2162682357

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 30.48 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit a7c5347ffe9ad6f4a1550a1f7a03e126de1ac3e1, data reload: false
   
   query1	0.04	0.04	0.02
   query2	0.08	0.04	0.04
   query3	0.24	0.05	0.04
   query4	1.67	0.08	0.07
   query5	0.50	0.50	0.48
   query6	1.13	0.72	0.72
   query7	0.02	0.02	0.01
   query8	0.05	0.04	0.04
   query9	0.54	0.49	0.50
   query10	0.54	0.55	0.54
   query11	0.15	0.12	0.11
   query12	0.15	0.12	0.12
   query13	0.60	0.59	0.61
   query14	0.77	0.80	0.77
   query15	0.85	0.82	0.80
   query16	0.36	0.37	0.37
   query17	1.00	0.96	0.98
   query18	0.20	0.25	0.22
   query19	1.78	1.68	1.65
   query20	0.02	0.01	0.01
   query21	15.42	0.66	0.65
   query22	3.89	7.24	1.85
   query23	18.30	1.42	1.35
   query24	2.06	0.22	0.22
   query25	0.17	0.09	0.07
   query26	0.27	0.18	0.17
   query27	0.09	0.08	0.08
   query28	13.25	1.04	1.00
   query29	12.63	3.34	3.35
   query30	0.26	0.06	0.05
   query31	2.85	0.38	0.38
   query32	3.30	0.48	0.48
   query33	2.88	2.88	2.94
   query34	16.98	4.38	4.39
   query35	4.49	4.47	4.46
   query36	0.66	0.48	0.49
   query37	0.19	0.15	0.15
   query38	0.17	0.14	0.14
   query39	0.05	0.03	0.03
   query40	0.18	0.14	0.14
   query41	0.10	0.05	0.05
   query42	0.05	0.04	0.05
   query43	0.04	0.04	0.04
   Total cold run time: 108.97 s
   Total hot run time: 30.48 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on code in PR #36193:
URL: https://github.com/apache/doris/pull/36193#discussion_r1637404929


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java:
##########
@@ -87,81 +87,83 @@ public LeadingHint(String hintName) {
     public LeadingHint(String hintName, List<String> parameters, String originalString) {
         super(hintName);
         this.originalString = originalString;
-        this.parameters = parameters;
-        int level = 0;
-        Stack<Boolean> brace = new Stack<>();
-        String lastParameter = "";
-        for (String parameter : parameters) {
-            if (parameter.equals("{")) {
-                if (lastParameter.equals("}")) {
-                    level += 2;
-                    brace.push(true);
-                } else {
-                    ++level;
-                    brace.push(false);
-                }
-            } else if (parameter.equals("}")) {
-                if (brace.pop().equals(true)) {
-                    level -= 2;
-                } else {
-                    level--;
-                }
-            } else if (parameter.equals("shuffle")) {
-                DistributeHint distributeHint = new DistributeHint(DistributeType.SHUFFLE_RIGHT);
-                distributeHints.put(tablelist.size(), distributeHint);
-                if (!ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) {
-                    ConnectContext.get().getStatementContext().addHint(distributeHint);
-                }
-            } else if (parameter.equals("broadcast")) {
-                DistributeHint distributeHint = new DistributeHint(DistributeType.BROADCAST_RIGHT);
-                distributeHints.put(tablelist.size(), distributeHint);
-                if (!ConnectContext.get().getStatementContext().getHints().contains(distributeHint)) {
-                    ConnectContext.get().getStatementContext().addHint(distributeHint);
-                }
+        addJoinParameters = insertJoinIntoParameters(parameters);
+        normalizedParameters = parseIntoPolandNotation(addJoinParameters);

Review Comment:
   Reverse Polish Notation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "LiBinfeng-01 (via GitHub)" <gi...@apache.org>.
LiBinfeng-01 commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2164239538

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Fix](Nereids) fix leading with brace can not generate correct plan [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #36193:
URL: https://github.com/apache/doris/pull/36193#issuecomment-2164294681

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 30.24 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 9866eb501b6d0ed6c2fdf3d5491d4c6773e7813c, data reload: false
   
   query1	0.04	0.04	0.03
   query2	0.08	0.04	0.04
   query3	0.23	0.05	0.05
   query4	1.66	0.08	0.07
   query5	0.50	0.48	0.47
   query6	1.13	0.72	0.73
   query7	0.02	0.01	0.01
   query8	0.05	0.04	0.04
   query9	0.55	0.48	0.49
   query10	0.53	0.55	0.53
   query11	0.15	0.11	0.12
   query12	0.15	0.12	0.12
   query13	0.61	0.59	0.60
   query14	0.77	0.80	0.77
   query15	0.84	0.82	0.82
   query16	0.37	0.36	0.36
   query17	1.02	1.02	1.02
   query18	0.24	0.25	0.27
   query19	1.79	1.68	1.73
   query20	0.02	0.01	0.01
   query21	15.53	0.64	0.64
   query22	4.12	7.08	1.52
   query23	18.36	1.46	1.28
   query24	2.31	0.25	0.21
   query25	0.16	0.09	0.09
   query26	0.25	0.17	0.18
   query27	0.07	0.08	0.08
   query28	13.28	1.04	1.02
   query29	12.62	3.28	3.29
   query30	0.26	0.06	0.06
   query31	2.86	0.40	0.39
   query32	3.24	0.47	0.48
   query33	2.88	2.97	2.92
   query34	17.17	4.39	4.44
   query35	4.45	4.49	4.49
   query36	0.66	0.47	0.47
   query37	0.19	0.16	0.15
   query38	0.14	0.14	0.15
   query39	0.04	0.03	0.04
   query40	0.18	0.14	0.14
   query41	0.10	0.05	0.05
   query42	0.06	0.04	0.05
   query43	0.05	0.04	0.04
   Total cold run time: 109.73 s
   Total hot run time: 30.24 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org