Skip to content

Conversation

@zxc20041
Copy link

@zxc20041 zxc20041 commented Jan 23, 2026

What problem does this PR solve?

Issue Number: close #48203

Related PR: #48695

Problem Summary:
Support for ST_Distance, ST_GeometryType, ST_Length sql functions.

Release note

None

Check List (For Author)

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Jan 23, 2026

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?

@zclllyybb zclllyybb self-assigned this Jan 23, 2026
@zxc20041
Copy link
Author

run buildall

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements three spatial SQL functions (ST_Distance, ST_GeometryType, ST_Length) to improve compatibility with other database systems like Trino, Presto, and PostgreSQL, as part of the broader effort outlined in issue #48203.

Changes:

  • Adds ST_Length function to calculate the length/perimeter of geometry objects (in meters for LineString/Polygon/Circle, 0 for Point)
  • Adds ST_GeometryType function to return the geometry type name (e.g., "ST_POINT", "ST_LINESTRING")
  • Adds ST_Distance function to calculate the geodesic distance between two geometry objects (in meters)

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
be/src/geo/geo_types.h Adds virtual method declarations for GeometryType(), Length(), and Distance() to the GeoShape base class and implements them in all derived classes
be/src/geo/st_length.cpp Implements Length() calculations for all geometry types using S2Earth library for geodesic measurements
be/src/geo/st_distance.cpp Implements Distance() calculations between all geometry type combinations with helper functions for point-to-segment, point-to-polyline, and point-to-polygon distances
be/src/geo/CMakeLists.txt Updates build configuration to include the new st_length.cpp and st_distance.cpp source files
be/src/vec/functions/functions_geo.cpp Registers the three new functions (StLength, StGeometryType, StDistance) with the function factory
be/test/geo/geo_types_test.cpp Adds comprehensive C++ unit tests covering all geometry types and type combinations for the new functions
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/StLength.java Frontend scalar function class for ST_Length with proper signature (VARCHAR -> DOUBLE)
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/StGeometryType.java Frontend scalar function class for ST_GeometryType with proper signature (VARCHAR -> VARCHAR)
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/StDistance.java Frontend scalar function class for ST_Distance with proper signature (VARCHAR, VARCHAR -> DOUBLE)
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/visitor/ScalarFunctionVisitor.java Adds visitor methods for the three new function types
fe/fe-core/src/main/java/org/apache/doris/catalog/BuiltinScalarFunctions.java Registers the three new scalar functions in the builtin function catalog
regression-test/suites/nereids_p0/sql_functions/spatial_functions/test_gis_function.groovy Adds extensive regression test cases covering all geometry type combinations for the new functions
regression-test/data/nereids_p0/sql_functions/spatial_functions/test_gis_function.out Expected output for the regression tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17617	4705	4546	4546
q2	2023	342	201	201
q3	10232	1267	719	719
q4	10215	811	313	313
q5	7528	2119	1817	1817
q6	185	175	145	145
q7	874	721	595	595
q8	9272	1435	1114	1114
q9	4858	4529	4605	4529
q10	6792	1658	1270	1270
q11	528	292	272	272
q12	335	369	230	230
q13	17795	3778	3111	3111
q14	234	230	210	210
q15	602	531	538	531
q16	641	656	581	581
q17	658	779	505	505
q18	6645	6351	6652	6351
q19	1305	1117	665	665
q20	416	366	247	247
q21	2998	2578	2020	2020
q22	1122	1071	1065	1065
Total cold run time: 102875 ms
Total hot run time: 31037 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5041	4880	4926	4880
q2	332	425	351	351
q3	2359	2865	2426	2426
q4	1406	1876	1503	1503
q5	4525	4426	4420	4420
q6	218	168	140	140
q7	2122	2094	1795	1795
q8	2578	2463	2509	2463
q9	7247	7276	7314	7276
q10	2514	2661	2160	2160
q11	508	454	436	436
q12	675	703	569	569
q13	3352	3809	3106	3106
q14	266	281	275	275
q15	539	503	494	494
q16	637	650	619	619
q17	1121	1289	1329	1289
q18	7424	7332	7150	7150
q19	847	792	802	792
q20	1926	1961	1828	1828
q21	4536	4310	4181	4181
q22	1123	1037	967	967
Total cold run time: 51296 ms
Total hot run time: 49120 ms

@zxc20041
Copy link
Author

oops, I forgot to modify be-ut testcase after changing geometry_type

@doris-robot
Copy link

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

query5	4421	640	501	501
query6	328	226	210	210
query7	4221	464	259	259
query8	341	256	269	256
query9	8731	2838	2874	2838
query10	472	345	269	269
query11	15187	15058	14715	14715
query12	177	120	120	120
query13	1264	471	369	369
query14	6310	3008	2752	2752
query14_1	2689	2616	2653	2616
query15	199	196	179	179
query16	1000	404	452	404
query17	1106	678	576	576
query18	2567	429	338	338
query19	202	182	156	156
query20	126	120	119	119
query21	222	137	116	116
query22	3857	3985	4074	3985
query23	16139	15686	15331	15331
query23_1	15481	15504	15436	15436
query24	7160	1536	1127	1127
query24_1	1134	1174	1168	1168
query25	553	458	442	442
query26	1242	263	145	145
query27	2772	441	280	280
query28	4551	2136	2136	2136
query29	784	528	434	434
query30	306	236	205	205
query31	786	637	577	577
query32	86	74	72	72
query33	518	360	307	307
query34	903	859	521	521
query35	710	769	647	647
query36	880	889	868	868
query37	141	94	91	91
query38	2724	2741	2666	2666
query39	782	754	748	748
query39_1	725	734	706	706
query40	223	134	117	117
query41	67	63	65	63
query42	94	94	95	94
query43	433	437	412	412
query44	1322	735	743	735
query45	188	181	180	180
query46	828	935	585	585
query47	1366	1527	1405	1405
query48	308	311	237	237
query49	609	434	387	387
query50	664	263	199	199
query51	3738	3757	3836	3757
query52	90	93	81	81
query53	208	220	162	162
query54	286	259	249	249
query55	80	77	72	72
query56	293	295	295	295
query57	1026	1030	905	905
query58	270	258	263	258
query59	2081	2170	2112	2112
query60	327	333	310	310
query61	160	157	149	149
query62	379	350	315	315
query63	186	158	166	158
query64	4944	1134	862	862
query65	3852	3731	3769	3731
query66	1439	418	327	327
query67	15545	15618	15528	15528
query68	2499	1055	721	721
query69	394	317	275	275
query70	965	944	943	943
query71	300	276	271	271
query72	5267	3121	3348	3121
query73	607	720	321	321
query74	8716	8710	8650	8650
query75	2314	2351	1907	1907
query76	2297	1043	644	644
query77	385	395	319	319
query78	9754	9849	9099	9099
query79	1077	903	571	571
query80	669	558	486	486
query81	482	260	233	233
query82	1404	148	117	117
query83	366	265	247	247
query84	252	125	96	96
query85	826	491	430	430
query86	368	288	321	288
query87	2896	2857	2767	2767
query88	3438	2582	2538	2538
query89	305	250	226	226
query90	1881	173	166	166
query91	167	162	134	134
query92	80	74	73	73
query93	1051	1029	632	632
query94	449	317	287	287
query95	586	383	308	308
query96	642	493	227	227
query97	2341	2370	2317	2317
query98	215	199	195	195
query99	599	596	532	532
Total cold run time: 245543 ms
Total hot run time: 172396 ms

@doris-robot
Copy link

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

query1	0.06	0.04	0.04
query2	0.09	0.06	0.05
query3	0.26	0.09	0.09
query4	1.61	0.12	0.11
query5	0.28	0.26	0.26
query6	1.14	0.65	0.65
query7	0.03	0.03	0.02
query8	0.05	0.04	0.04
query9	0.58	0.49	0.49
query10	0.55	0.55	0.55
query11	0.14	0.10	0.10
query12	0.14	0.11	0.11
query13	0.60	0.58	0.58
query14	0.96	0.94	0.93
query15	0.79	0.77	0.78
query16	0.39	0.39	0.40
query17	1.05	1.02	1.04
query18	0.24	0.22	0.21
query19	1.90	1.90	1.89
query20	0.02	0.02	0.02
query21	15.43	0.26	0.13
query22	5.36	0.05	0.05
query23	15.80	0.29	0.10
query24	1.21	0.24	0.56
query25	0.09	0.08	0.06
query26	0.14	0.13	0.13
query27	0.08	0.06	0.06
query28	4.59	1.08	0.89
query29	12.54	3.91	3.13
query30	0.28	0.13	0.12
query31	2.81	0.66	0.38
query32	3.24	0.57	0.46
query33	2.95	3.05	3.06
query34	16.21	5.08	4.43
query35	4.42	4.40	4.43
query36	0.66	0.50	0.48
query37	0.11	0.06	0.06
query38	0.07	0.04	0.04
query39	0.05	0.03	0.03
query40	0.17	0.14	0.13
query41	0.08	0.04	0.03
query42	0.05	0.03	0.03
query43	0.05	0.03	0.03
Total cold run time: 97.27 s
Total hot run time: 26.78 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 8.33% (3/36) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 91.67% (33/36) 🎉
Increment coverage report
Complete coverage report

@zxc20041
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17699	4840	4560	4560
q2	2059	337	198	198
q3	10171	1277	742	742
q4	10200	813	308	308
q5	7531	2055	1812	1812
q6	192	172	141	141
q7	869	726	583	583
q8	9276	1388	1075	1075
q9	5027	4607	4536	4536
q10	6837	1699	1276	1276
q11	546	306	282	282
q12	392	385	225	225
q13	17797	3837	3085	3085
q14	241	249	219	219
q15	599	530	538	530
q16	631	634	590	590
q17	657	824	486	486
q18	6518	6538	6611	6538
q19	1424	1058	667	667
q20	432	376	240	240
q21	3047	2277	2207	2207
q22	1129	1092	1028	1028
Total cold run time: 103274 ms
Total hot run time: 31328 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5146	4852	4990	4852
q2	341	399	340	340
q3	2373	2889	2527	2527
q4	1409	1923	1473	1473
q5	4615	4432	4551	4432
q6	218	168	131	131
q7	2095	2027	1758	1758
q8	2518	2418	2402	2402
q9	7071	7321	7120	7120
q10	2483	2730	2250	2250
q11	534	454	432	432
q12	667	684	582	582
q13	3365	3796	3082	3082
q14	276	283	259	259
q15	542	500	502	500
q16	606	666	629	629
q17	1093	1313	1409	1313
q18	7146	7392	7267	7267
q19	817	819	813	813
q20	1918	1961	1809	1809
q21	4509	4275	4122	4122
q22	1081	1053	985	985
Total cold run time: 50823 ms
Total hot run time: 49078 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172939 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 1aae56ddc136ea939b623d88dc99660ada2b0b3d, data reload: false

query5	4362	643	483	483
query6	331	221	209	209
query7	4218	463	268	268
query8	360	277	238	238
query9	8710	2880	2901	2880
query10	469	313	288	288
query11	15168	15114	15050	15050
query12	183	125	117	117
query13	1253	482	381	381
query14	6467	3066	2812	2812
query14_1	2783	2659	2672	2659
query15	200	193	174	174
query16	983	477	482	477
query17	1122	681	575	575
query18	2582	431	344	344
query19	214	194	153	153
query20	124	119	116	116
query21	220	136	124	124
query22	3886	3913	3843	3843
query23	15990	15501	15336	15336
query23_1	15237	15447	15401	15401
query24	7131	1547	1156	1156
query24_1	1158	1175	1191	1175
query25	542	460	416	416
query26	842	285	150	150
query27	2730	439	279	279
query28	4485	2183	2163	2163
query29	756	549	444	444
query30	319	248	212	212
query31	756	632	568	568
query32	91	78	75	75
query33	529	352	324	324
query34	867	881	556	556
query35	717	795	688	688
query36	913	890	837	837
query37	142	102	88	88
query38	2747	2691	2652	2652
query39	788	755	739	739
query39_1	710	714	714	714
query40	229	140	120	120
query41	74	67	67	67
query42	99	94	96	94
query43	473	448	422	422
query44	1329	767	753	753
query45	194	202	188	188
query46	832	979	577	577
query47	1372	1472	1385	1385
query48	313	323	237	237
query49	589	417	340	340
query50	666	273	198	198
query51	3814	3797	3751	3751
query52	86	92	84	84
query53	213	216	162	162
query54	274	257	259	257
query55	84	80	76	76
query56	300	284	287	284
query57	1008	1021	966	966
query58	263	257	256	256
query59	2058	2215	2037	2037
query60	339	348	311	311
query61	146	147	147	147
query62	377	355	299	299
query63	196	165	166	165
query64	4115	1216	850	850
query65	3789	3735	3770	3735
query66	1352	411	333	333
query67	15598	15676	15405	15405
query68	2764	1069	716	716
query69	417	314	276	276
query70	994	970	950	950
query71	301	305	276	276
query72	5417	3210	3232	3210
query73	624	723	314	314
query74	8715	8791	8590	8590
query75	2313	2329	1912	1912
query76	2388	1044	683	683
query77	364	387	300	300
query78	9865	9962	9128	9128
query79	1075	935	583	583
query80	1263	523	436	436
query81	540	263	233	233
query82	989	155	120	120
query83	347	265	245	245
query84	253	112	99	99
query85	874	493	403	403
query86	403	290	321	290
query87	2879	2892	2750	2750
query88	3534	2604	2576	2576
query89	300	267	243	243
query90	1924	175	158	158
query91	163	152	132	132
query92	74	74	68	68
query93	1170	1048	640	640
query94	635	316	296	296
query95	576	350	369	350
query96	653	494	235	235
query97	2367	2331	2336	2331
query98	213	199	196	196
query99	602	573	508	508
Total cold run time: 244968 ms
Total hot run time: 172939 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.05
query2	0.10	0.05	0.05
query3	0.27	0.09	0.08
query4	1.61	0.11	0.10
query5	0.27	0.25	0.25
query6	1.14	0.67	0.64
query7	0.03	0.03	0.02
query8	0.06	0.04	0.03
query9	0.57	0.51	0.48
query10	0.54	0.55	0.55
query11	0.14	0.09	0.10
query12	0.15	0.11	0.11
query13	0.61	0.59	0.60
query14	0.95	0.94	0.94
query15	0.79	0.77	0.79
query16	0.40	0.40	0.39
query17	1.06	1.04	1.00
query18	0.22	0.22	0.22
query19	1.91	1.88	1.82
query20	0.02	0.01	0.02
query21	15.45	0.23	0.13
query22	5.07	0.07	0.05
query23	15.76	0.29	0.10
query24	1.07	0.37	0.70
query25	0.10	0.10	0.10
query26	0.14	0.13	0.13
query27	0.07	0.06	0.05
query28	4.47	1.08	0.88
query29	12.54	3.95	3.13
query30	0.28	0.14	0.12
query31	2.82	0.61	0.39
query32	3.24	0.56	0.45
query33	2.97	2.99	3.08
query34	16.25	5.11	4.42
query35	4.43	4.44	4.45
query36	0.65	0.50	0.49
query37	0.10	0.06	0.06
query38	0.08	0.04	0.04
query39	0.04	0.03	0.03
query40	0.17	0.14	0.14
query41	0.10	0.03	0.03
query42	0.05	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 96.79 s
Total hot run time: 26.8 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 8.33% (3/36) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 63.12% (243/385) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.47% (19135/36469)
Line Coverage 35.85% (177841/496056)
Region Coverage 32.30% (137349/425181)
Branch Coverage 33.26% (59517/178943)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 84.68% (326/385) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.53% (25570/35748)
Line Coverage 54.11% (268125/495524)
Region Coverage 51.52% (221389/429694)
Branch Coverage 53.10% (95425/179714)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 91.67% (33/36) 🎉
Increment coverage report
Complete coverage report

qt_sql "SELECT ST_ANGLE_SPHERE(116.35620117, 39.939093, 116.4274406433, 39.9020987219);"
qt_sql "SELECT ST_ANGLE_SPHERE(0, 0, 45, 0);"

// ST_Length tests for all geometry types
Copy link
Contributor

Choose a reason for hiding this comment

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

need more testcases of data in tables.

const size_t size) {
std::vector<std::unique_ptr<GeoShape>> shapes(2);
for (int row = 0; row < size; ++row) {
auto lhs_value = left_column->get_data_at(row);
Copy link
Contributor

Choose a reason for hiding this comment

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

all get_data_at here may be virtual function. you can assert_cast column ptrs and pass with concrete types

Copy link
Author

Choose a reason for hiding this comment

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

ok, shall I use assert_cast() or check_and_get_column()?

Copy link
Contributor

Choose a reason for hiding this comment

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

when you know what the type this column should be, use assert_cast.

double GeoPolygon::Length() const {
// GeoPolygon is always valid with at least one loop (guaranteed by constructor)
double perimeter = 0.0;
const S2Loop* outer_loop = _polygon->loop(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

why only consider loop0? what if compute with others within holes?

return S2Earth::GetDistanceMeters(point_ll, start_ll);
}

double t = ((px - x1) * dx + (py - y1) * dy) / (dx * dx + dy * dy);
Copy link
Contributor

Choose a reason for hiding this comment

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

it's this a planar projection? I think lat and lng have no absolute relation with distance. so maybe directly use S2Earth's function?

const GeoPoint* point = static_cast<const GeoPoint*>(rhs);
return distance_point_to_polyline(*point->point(), _polyline.get());
}
case GEO_SHAPE_LINE_STRING: {
Copy link
Contributor

Choose a reason for hiding this comment

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

what if line crosses?

Copy link
Contributor

Choose a reason for hiding this comment

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

plygon-polygon and circle-line seem to have this issue as well

ColumnFloat64::MutablePtr& res, NullMap& null_map, int row) {
StringRef* strs[2] = {&lhs_value, &rhs_value};
for (int i = 0; i < 2; ++i) {
std::unique_ptr<GeoShape> shape(GeoShape::from_encoded(strs[i]->data, strs[i]->size));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we decode const column outside the loop to avoid unnecessary repeated calculations?

…ction short-circuits; include all polygon loops in length; refactor vectorized StDistance and move implementations into geo_types.cpp;
@zclllyybb
Copy link
Contributor

btw, @zxc20041 if you'd like to easier communicate, you can add my wechat torch-wood_

return -1.0;
}
}

Copy link
Author

Choose a reason for hiding this comment

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

now lines and polygons will consider Intersect first


return total_length;
}

Copy link
Author

Choose a reason for hiding this comment

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

polygon will sum all loops

qt_sql "SELECT ST_AsText(ST_GeomFromWKB(ST_AsBinary(ST_GeometryFromText(\"LINESTRING (1 1, 2 2)\"))));"
qt_sql "SELECT ST_AsText(ST_GeomFromWKB(ST_AsBinary(ST_Polygon(\"POLYGON ((114.104486 22.547119,114.093758 22.547753,114.096504 22.532057,114.104229 22.539826,114.106203 22.542680,114.104486 22.547119))\"))));"

// table-driven tests for ST_Length/ST_GeometryType/ST_Distance
Copy link
Author

Choose a reason for hiding this comment

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

create a table to test 3 functions

@zxc20041
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	16114	5162	5022	5022
q2	2064	316	195	195
q3	9841	1293	712	712
q4	9765	827	315	315
q5	7194	2149	1889	1889
q6	206	183	149	149
q7	872	736	599	599
q8	8931	1314	1114	1114
q9	5132	4770	4960	4770
q10	6754	1965	1572	1572
q11	479	288	280	280
q12	332	374	218	218
q13	17799	4015	3224	3224
q14	237	241	221	221
q15	874	832	817	817
q16	693	684	628	628
q17	628	758	498	498
q18	6771	6676	6995	6676
q19	1172	1076	643	643
q20	448	372	233	233
q21	3029	2182	2105	2105
q22	1162	1080	1009	1009
Total cold run time: 100497 ms
Total hot run time: 32889 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5402	5471	5497	5471
q2	277	355	257	257
q3	2407	2859	2477	2477
q4	1426	1896	1519	1519
q5	4844	4655	4382	4382
q6	226	177	144	144
q7	2019	1888	1850	1850
q8	2558	2504	2434	2434
q9	7601	7505	7448	7448
q10	2736	3011	2587	2587
q11	532	464	457	457
q12	630	670	572	572
q13	3534	4070	3220	3220
q14	284	286	282	282
q15	832	803	797	797
q16	634	695	633	633
q17	1076	1297	1343	1297
q18	7558	7494	7188	7188
q19	836	795	755	755
q20	1958	2034	1932	1932
q21	4548	4325	4069	4069
q22	1089	1068	984	984
Total cold run time: 53007 ms
Total hot run time: 50755 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.10	0.05	0.04
query3	0.26	0.08	0.09
query4	1.63	0.11	0.11
query5	0.29	0.25	0.24
query6	1.18	0.67	0.67
query7	0.04	0.03	0.03
query8	0.05	0.04	0.04
query9	0.56	0.49	0.49
query10	0.56	0.55	0.55
query11	0.13	0.09	0.10
query12	0.14	0.10	0.10
query13	0.64	0.62	0.61
query14	1.05	1.05	1.05
query15	0.88	0.87	0.88
query16	0.38	0.41	0.38
query17	1.16	1.10	1.16
query18	0.22	0.20	0.21
query19	2.08	2.01	2.01
query20	0.02	0.02	0.01
query21	15.41	0.26	0.14
query22	5.36	0.05	0.05
query23	16.12	0.27	0.10
query24	1.32	0.71	0.75
query25	0.12	0.09	0.06
query26	0.16	0.13	0.14
query27	0.07	0.05	0.08
query28	4.68	1.13	0.97
query29	12.60	3.92	3.19
query30	0.28	0.13	0.11
query31	2.82	0.64	0.40
query32	3.24	0.60	0.49
query33	3.28	3.27	3.23
query34	16.82	5.33	4.71
query35	4.82	4.81	4.93
query36	0.66	0.51	0.48
query37	0.11	0.08	0.06
query38	0.08	0.05	0.04
query39	0.05	0.03	0.04
query40	0.18	0.16	0.15
query41	0.09	0.04	0.03
query42	0.04	0.04	0.03
query43	0.05	0.04	0.04
Total cold run time: 99.79 s
Total hot run time: 28.73 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 61.14% (258/422) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.50% (19178/36529)
Line Coverage 35.92% (178490/496955)
Region Coverage 32.37% (137958/426166)
Branch Coverage 33.32% (59767/179351)

@zxc20041
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17658	5287	5012	5012
q2	2079	312	187	187
q3	10165	1353	736	736
q4	10228	858	321	321
q5	7524	2214	1911	1911
q6	208	180	155	155
q7	911	729	601	601
q8	9276	1378	1069	1069
q9	5147	4823	4923	4823
q10	6774	1960	1568	1568
q11	512	278	286	278
q12	339	377	225	225
q13	17755	4076	3238	3238
q14	241	241	215	215
q15	865	815	827	815
q16	662	707	618	618
q17	640	795	466	466
q18	6753	6578	7432	6578
q19	1166	1020	665	665
q20	424	383	264	264
q21	3126	2304	2065	2065
q22	1146	1016	1177	1016
Total cold run time: 103599 ms
Total hot run time: 32826 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5393	5516	5599	5516
q2	257	358	241	241
q3	2431	2886	2415	2415
q4	1428	1861	1435	1435
q5	4659	4685	4897	4685
q6	224	180	143	143
q7	2001	1904	1826	1826
q8	2529	2423	2406	2406
q9	7457	7485	7558	7485
q10	2803	3042	2637	2637
q11	540	485	444	444
q12	652	773	649	649
q13	3766	4383	3384	3384
q14	281	289	260	260
q15	840	788	782	782
q16	626	680	639	639
q17	1089	1310	1360	1310
q18	7513	7352	7385	7352
q19	834	804	795	795
q20	2015	2044	1907	1907
q21	4502	4253	4117	4117
q22	1093	1022	960	960
Total cold run time: 52933 ms
Total hot run time: 51388 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.11	0.05	0.04
query3	0.25	0.09	0.08
query4	1.61	0.11	0.10
query5	0.26	0.25	0.25
query6	1.16	0.68	0.67
query7	0.03	0.03	0.02
query8	0.04	0.04	0.04
query9	0.56	0.50	0.50
query10	0.55	0.55	0.54
query11	0.14	0.10	0.11
query12	0.14	0.11	0.10
query13	0.63	0.62	0.63
query14	1.05	1.05	1.04
query15	0.87	0.85	0.88
query16	0.39	0.38	0.41
query17	1.12	1.12	1.10
query18	0.22	0.20	0.21
query19	2.13	1.92	2.07
query20	0.02	0.01	0.01
query21	15.40	0.26	0.13
query22	5.37	0.05	0.04
query23	16.09	0.29	0.10
query24	1.85	0.46	0.19
query25	0.09	0.06	0.06
query26	0.14	0.13	0.14
query27	0.06	0.08	0.06
query28	3.97	1.14	0.96
query29	12.56	3.97	3.22
query30	0.27	0.13	0.10
query31	2.81	0.63	0.40
query32	3.24	0.59	0.49
query33	3.21	3.16	3.23
query34	16.25	5.39	4.68
query35	4.78	4.83	4.77
query36	0.65	0.50	0.49
query37	0.10	0.07	0.06
query38	0.08	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.15
query41	0.09	0.04	0.03
query42	0.04	0.03	0.02
query43	0.05	0.04	0.03
Total cold run time: 98.65 s
Total hot run time: 27.94 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 61.14% (258/422) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.74% (19270/36540)
Line Coverage 36.14% (179623/497059)
Region Coverage 32.60% (138989/426342)
Branch Coverage 33.54% (60177/179423)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 84.36% (356/422) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.45% (25593/35817)
Line Coverage 54.11% (268655/496521)
Region Coverage 51.67% (222603/430850)
Branch Coverage 53.06% (95608/180193)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 91.67% (33/36) 🎉
Increment coverage report
Complete coverage report

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.

[Good First Issue] Support All SQL Functions in Other SQL System

6 participants