Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jul 9, 2025

Cherry-picked from #52636

#52636)

### What problem does this PR solve?

Problem Summary:


**Set up two service addresses**
```
Doris > set global sql_converter_service_url = 'http://127.0.0.1:5001/api/v1/convert,http://127.0.0.1:5002/api/v1/convert';
Query OK, 0 rows affected (0.04 sec)

Doris > set sql_dialect = 'clickhouse';
Query OK, 0 rows affected (0.05 sec)

Doris > SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr);
+--------------------+
| ELEMENT_AT(arr, 2) |
+--------------------+
|                  2 |
+--------------------+
1 row in set (0.11 sec)
```

 **Stop one of the services**
```
Doris > SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr);
+--------------------+
| ELEMENT_AT(arr, 2) |
+--------------------+
|                  2 |
+--------------------+
1 row in set (0.14 sec)
```

**Stopping all services resulted in expected errors**
```
Doris > SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr);
ERROR 1105 (HY000): errCode = 2, detailMessage = 
Every derived table must have its own alias(line 1, pos 33)

== SQL ==
SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr)
---------------------------------^^^

Doris > SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr);
ERROR 1105 (HY000): errCode = 2, detailMessage = 
Every derived table must have its own alias(line 1, pos 33)
== SQL ==
SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr)
---------------------------------^^^
```

**Restart one of the services**
```
Doris > SELECT arrayElement(arr, 2) FROM (SELECT [1, 2, 3] AS arr);
+--------------------+
| ELEMENT_AT(arr, 2) |
+--------------------+
|                  2 |
+--------------------+
1 row in set (0.16 sec)
```
@github-actions github-actions bot requested a review from dataroaring as a code owner July 9, 2025 14:27
@Thearas
Copy link
Contributor

Thearas commented Jul 9, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See 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?

@dataroaring dataroaring closed this Jul 9, 2025
@dataroaring dataroaring reopened this Jul 9, 2025
@Thearas
Copy link
Contributor

Thearas commented Jul 9, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17591	6744	6592	6592
q2	2079	191	172	172
q3	10499	1114	1155	1114
q4	10216	735	719	719
q5	7710	2873	2787	2787
q6	214	130	134	130
q7	949	616	604	604
q8	9354	1939	1979	1939
q9	6646	6394	6433	6394
q10	7017	2252	2352	2252
q11	461	250	258	250
q12	399	215	216	215
q13	17787	2945	2946	2945
q14	244	199	198	198
q15	496	460	451	451
q16	479	373	386	373
q17	974	571	563	563
q18	7146	6729	6959	6729
q19	1395	1056	1025	1025
q20	472	197	216	197
q21	3982	3108	3157	3108
q22	1154	987	972	972
Total cold run time: 107264 ms
Total hot run time: 39729 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6601	6537	6528	6528
q2	321	236	237	236
q3	2903	2904	2899	2899
q4	2050	1812	1787	1787
q5	5698	5761	5711	5711
q6	208	132	130	130
q7	2216	1791	1810	1791
q8	3355	3521	3548	3521
q9	8755	8862	8826	8826
q10	3575	3498	3459	3459
q11	590	497	484	484
q12	855	591	594	591
q13	8530	3151	3116	3116
q14	291	277	262	262
q15	514	453	463	453
q16	485	434	452	434
q17	1840	1613	1601	1601
q18	8204	7763	7703	7703
q19	1690	1492	1488	1488
q20	2073	1809	1829	1809
q21	5127	4964	4998	4964
q22	1127	1042	1064	1042
Total cold run time: 67008 ms
Total hot run time: 58835 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197102 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 20293b1c21dcacde050d015cc6f5c65244e9664f, data reload: false

query1	1275	918	927	918
query2	6268	2019	1952	1952
query3	10818	4497	4353	4353
query4	33299	23431	23712	23431
query5	3481	474	474	474
query6	282	188	196	188
query7	4640	336	357	336
query8	401	233	231	231
query9	9737	2697	2672	2672
query10	447	277	269	269
query11	18070	15164	15216	15164
query12	161	102	105	102
query13	1582	427	419	419
query14	9621	6588	6705	6588
query15	238	180	184	180
query16	7867	466	488	466
query17	1608	584	562	562
query18	2054	332	326	326
query19	232	175	170	170
query20	127	119	116	116
query21	214	112	110	110
query22	4649	4273	4373	4273
query23	34857	34327	34107	34107
query24	11958	2990	2957	2957
query25	719	444	444	444
query26	1786	186	174	174
query27	2907	357	366	357
query28	7748	2180	2187	2180
query29	1078	480	470	470
query30	271	165	162	162
query31	984	865	846	846
query32	93	60	61	60
query33	761	303	306	303
query34	1016	535	518	518
query35	897	732	739	732
query36	1118	921	964	921
query37	206	65	71	65
query38	4071	4009	3950	3950
query39	1487	1480	1471	1471
query40	254	105	106	105
query41	89	47	49	47
query42	114	105	99	99
query43	522	486	495	486
query44	1311	816	831	816
query45	190	173	174	173
query46	1196	742	727	727
query47	1998	1904	1924	1904
query48	485	380	392	380
query49	1131	419	400	400
query50	848	430	419	419
query51	7572	7270	7261	7261
query52	100	90	96	90
query53	279	193	190	190
query54	1368	476	471	471
query55	75	76	79	76
query56	269	255	287	255
query57	1325	1197	1201	1197
query58	241	213	213	213
query59	3327	3059	3057	3057
query60	309	277	264	264
query61	141	111	110	110
query62	867	683	699	683
query63	227	219	202	202
query64	5388	701	653	653
query65	3376	3317	3332	3317
query66	1335	295	304	295
query67	16047	15608	15560	15560
query68	5143	580	572	572
query69	445	271	269	269
query70	1195	1107	1096	1096
query71	337	286	259	259
query72	6210	4056	4034	4034
query73	809	357	353	353
query74	10117	9044	9028	9028
query75	3358	2625	2669	2625
query76	2894	1089	1090	1089
query77	406	283	279	279
query78	10537	9590	9533	9533
query79	2004	608	606	606
query80	1180	450	431	431
query81	553	227	218	218
query82	924	91	86	86
query83	238	148	144	144
query84	235	80	82	80
query85	1418	312	300	300
query86	446	303	297	297
query87	4387	4281	4229	4229
query88	3720	2416	2394	2394
query89	428	298	286	286
query90	1965	191	215	191
query91	191	150	150	150
query92	70	52	52	52
query93	2574	555	562	555
query94	920	306	292	292
query95	361	258	261	258
query96	640	279	282	279
query97	3248	3157	3171	3157
query98	220	198	195	195
query99	1459	1298	1303	1298
Total cold run time: 308044 ms
Total hot run time: 197102 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.06	0.04	0.03
query3	0.23	0.06	0.07
query4	1.63	0.11	0.11
query5	0.53	0.52	0.51
query6	1.12	0.73	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.55	0.51	0.49
query10	0.55	0.58	0.56
query11	0.14	0.11	0.10
query12	0.14	0.11	0.11
query13	0.60	0.59	0.59
query14	0.78	0.78	0.84
query15	0.85	0.84	0.83
query16	0.38	0.39	0.39
query17	1.06	0.96	1.00
query18	0.23	0.21	0.21
query19	1.97	1.87	1.89
query20	0.02	0.01	0.01
query21	15.39	0.57	0.55
query22	2.57	1.87	1.49
query23	16.98	1.06	0.83
query24	3.23	1.44	2.48
query25	0.31	0.08	0.07
query26	0.61	0.15	0.14
query27	0.04	0.05	0.06
query28	8.63	0.52	0.48
query29	12.57	3.24	3.28
query30	0.24	0.06	0.06
query31	2.87	0.37	0.39
query32	3.23	0.48	0.46
query33	2.99	3.00	2.99
query34	16.91	4.52	4.50
query35	4.55	4.48	4.53
query36	0.68	0.47	0.47
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.16	0.13	0.12
query41	0.07	0.02	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 103.21 s
Total hot run time: 30.34 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit e0d56af into branch-3.0 Jul 11, 2025
23 of 25 checks passed
@github-actions github-actions bot deleted the auto-pick-52636-branch-3.0 branch July 11, 2025 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants