Skip to content

Conversation

@linrrzqqq
Copy link
Contributor

@linrrzqqq linrrzqqq commented Mar 29, 2025

What problem does this PR solve?

  1. Enhances the GeometryFromText function to support parsing MULTIPOLYGON WKT
  2. Support ST_CONTAINS , ST_INTERSECTS, ST_TOUCHES for it and other shapes.
  3. Fixed the behavior of ST_Touches between two polygons, which has been updated to return true when they touch at a single point that is not on a horizontal or vertical edge.
    For example, the following polygons now return true for ST_Touches:
    - POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))
    - POLYGON((5 10, 0 15, 10 15))
    Obviously, they touches at the point (5 10)

Issue Number: close #49481

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

Check List (For Reviewer who merge this PR)

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

@hello-stephen
Copy link
Contributor

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?

@linrrzqqq linrrzqqq force-pushed the mtPolygon branch 2 times, most recently from 7c0a233 to eacdd3d Compare March 30, 2025 06:44
@linrrzqqq linrrzqqq changed the title [Enhancement] Support MultiPolygon for Geometry functions [Enhancement] (GEO) Support MultiPolygon for Geometry functions Mar 30, 2025
@linrrzqqq linrrzqqq force-pushed the mtPolygon branch 2 times, most recently from cddc1ef to 6d6de26 Compare April 7, 2025 07:19
@linrrzqqq linrrzqqq marked this pull request as ready for review April 7, 2025 07:31
@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26095	4999	4938	4938
q2	2081	293	200	200
q3	10359	1275	687	687
q4	10223	1026	538	538
q5	7527	2364	2342	2342
q6	184	163	130	130
q7	907	804	616	616
q8	9312	1258	1083	1083
q9	6757	5068	5129	5068
q10	6844	2288	1919	1919
q11	491	292	279	279
q12	357	396	221	221
q13	17760	3721	3110	3110
q14	227	232	211	211
q15	533	480	495	480
q16	619	639	575	575
q17	596	864	359	359
q18	7460	7106	7160	7106
q19	1611	948	581	581
q20	326	313	217	217
q21	4100	2683	2468	2468
q22	1017	1021	997	997
Total cold run time: 115386 ms
Total hot run time: 34125 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5131	5059	5060	5059
q2	248	322	233	233
q3	2123	2644	2295	2295
q4	1443	1811	1395	1395
q5	4468	4405	4358	4358
q6	211	173	125	125
q7	1984	1907	1750	1750
q8	2627	2669	2595	2595
q9	7200	7150	6883	6883
q10	2968	3191	2687	2687
q11	576	530	502	502
q12	688	750	592	592
q13	3484	3888	3324	3324
q14	285	303	270	270
q15	521	486	480	480
q16	668	690	635	635
q17	1141	1536	1406	1406
q18	7745	7573	7439	7439
q19	835	808	856	808
q20	1952	2079	1837	1837
q21	5222	4883	4808	4808
q22	1107	1080	1039	1039
Total cold run time: 52627 ms
Total hot run time: 50520 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193478 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 6d6de26f3695a60b4e28a7abf31e9841beff9050, data reload: false

query1	1387	1085	1048	1048
query2	6346	1889	1871	1871
query3	11035	4498	4500	4498
query4	54800	24207	23409	23409
query5	5298	485	489	485
query6	399	198	199	198
query7	5271	495	289	289
query8	330	276	237	237
query9	7129	2554	2577	2554
query10	421	319	258	258
query11	15340	15108	14802	14802
query12	159	120	106	106
query13	1298	509	431	431
query14	10166	6400	6415	6400
query15	204	198	191	191
query16	6994	633	504	504
query17	1113	760	608	608
query18	1586	417	328	328
query19	217	200	181	181
query20	131	125	121	121
query21	212	130	108	108
query22	4509	4482	4322	4322
query23	34071	33357	33501	33357
query24	6593	2440	2402	2402
query25	476	470	415	415
query26	723	269	152	152
query27	2462	508	335	335
query28	3022	2464	2465	2464
query29	589	560	429	429
query30	284	224	194	194
query31	880	896	782	782
query32	77	72	63	63
query33	450	392	300	300
query34	752	867	532	532
query35	811	864	778	778
query36	948	1010	936	936
query37	130	104	82	82
query38	4208	4191	4159	4159
query39	1508	1427	1432	1427
query40	214	120	111	111
query41	54	55	51	51
query42	122	112	109	109
query43	493	495	502	495
query44	1319	806	806	806
query45	188	173	176	173
query46	850	1037	644	644
query47	1897	1910	1788	1788
query48	394	432	314	314
query49	699	537	463	463
query50	651	697	440	440
query51	4218	4274	4254	4254
query52	110	105	98	98
query53	235	258	186	186
query54	578	601	535	535
query55	102	83	90	83
query56	336	319	288	288
query57	1202	1172	1140	1140
query58	265	264	283	264
query59	2668	2885	2717	2717
query60	327	316	297	297
query61	133	132	134	132
query62	713	748	676	676
query63	222	183	194	183
query64	1810	1052	744	744
query65	4429	4479	4237	4237
query66	748	415	312	312
query67	15964	15746	15440	15440
query68	7366	819	519	519
query69	553	303	262	262
query70	1192	1086	1131	1086
query71	502	313	298	298
query72	5958	4856	4896	4856
query73	1196	660	350	350
query74	8907	9329	8637	8637
query75	3779	3255	2770	2770
query76	4255	1170	732	732
query77	619	360	285	285
query78	10122	10008	9303	9303
query79	2191	803	569	569
query80	626	517	475	475
query81	487	261	220	220
query82	477	131	102	102
query83	419	256	250	250
query84	296	109	84	84
query85	812	352	329	329
query86	418	296	267	267
query87	4373	4525	4392	4392
query88	3649	2209	2211	2209
query89	389	317	283	283
query90	1816	206	224	206
query91	143	138	115	115
query92	75	61	59	59
query93	2046	941	582	582
query94	677	381	318	318
query95	377	301	285	285
query96	479	557	282	282
query97	3109	3213	3098	3098
query98	241	219	202	202
query99	1432	1377	1317	1317
Total cold run time: 302251 ms
Total hot run time: 193478 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.12	0.11	0.10
query3	0.24	0.19	0.19
query4	1.59	0.20	0.20
query5	0.57	0.54	0.55
query6	1.19	0.72	0.72
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.59	0.52	0.52
query10	0.56	0.58	0.57
query11	0.15	0.11	0.11
query12	0.14	0.11	0.11
query13	0.61	0.60	0.60
query14	2.81	2.69	2.74
query15	0.94	0.84	0.86
query16	0.38	0.38	0.37
query17	0.99	1.02	1.06
query18	0.21	0.19	0.19
query19	2.00	1.91	1.75
query20	0.02	0.00	0.01
query21	15.37	0.91	0.55
query22	0.76	1.22	0.63
query23	14.93	1.37	0.64
query24	7.64	0.80	1.40
query25	0.49	0.14	0.13
query26	0.58	0.16	0.13
query27	0.05	0.06	0.05
query28	9.42	0.82	0.42
query29	12.57	3.96	3.29
query30	0.25	0.08	0.06
query31	2.83	0.58	0.38
query32	3.22	0.54	0.48
query33	3.04	3.00	3.11
query34	15.95	5.12	4.50
query35	4.51	4.52	4.47
query36	0.66	0.50	0.48
query37	0.08	0.07	0.06
query38	0.04	0.04	0.04
query39	0.03	0.03	0.02
query40	0.16	0.14	0.13
query41	0.08	0.02	0.03
query42	0.04	0.03	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.94 s
Total hot run time: 30.92 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.67% (1/149) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.24% (14023/26843)
Line Coverage 41.03% (121069/295091)
Region Coverage 39.76% (61605/154953)
Branch Coverage 34.43% (30847/89600)

@linrrzqqq linrrzqqq force-pushed the mtPolygon branch 2 times, most recently from 3cd8e0d to 1bd72c1 Compare April 7, 2025 22:45
@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26036	5040	5010	5010
q2	2067	278	179	179
q3	10403	1231	666	666
q4	10237	981	534	534
q5	7567	2353	2357	2353
q6	182	161	130	130
q7	912	729	608	608
q8	9328	1287	1089	1089
q9	6800	5066	5013	5013
q10	6850	2298	1877	1877
q11	493	288	268	268
q12	353	353	216	216
q13	17796	3725	3152	3152
q14	222	231	203	203
q15	528	488	484	484
q16	636	599	587	587
q17	606	838	360	360
q18	7470	7229	7150	7150
q19	1381	944	560	560
q20	336	318	222	222
q21	4087	3385	2445	2445
q22	1050	994	956	956
Total cold run time: 115340 ms
Total hot run time: 34062 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5178	5154	5152	5152
q2	235	327	231	231
q3	2121	2636	2274	2274
q4	1432	1796	1394	1394
q5	4494	4425	4369	4369
q6	214	168	129	129
q7	1990	1947	1803	1803
q8	2568	2559	2545	2545
q9	7317	7198	7147	7147
q10	2961	3182	2720	2720
q11	571	503	499	499
q12	666	771	612	612
q13	3510	3818	3328	3328
q14	297	308	296	296
q15	544	496	506	496
q16	662	685	652	652
q17	1140	1581	1328	1328
q18	7719	7561	7402	7402
q19	822	878	873	873
q20	1929	1966	1842	1842
q21	5312	4944	4745	4745
q22	1097	1030	1031	1030
Total cold run time: 52779 ms
Total hot run time: 50867 ms

@doris-robot
Copy link

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

query1	1402	1038	1037	1037
query2	6266	1882	1907	1882
query3	11022	4650	4640	4640
query4	56536	25600	24099	24099
query5	5098	486	470	470
query6	340	199	189	189
query7	4933	500	283	283
query8	304	248	225	225
query9	5676	2561	2572	2561
query10	437	331	255	255
query11	15492	15260	14912	14912
query12	169	117	108	108
query13	1084	502	393	393
query14	10247	6332	6348	6332
query15	203	202	196	196
query16	7179	657	501	501
query17	1093	769	601	601
query18	1621	414	345	345
query19	206	216	178	178
query20	127	121	124	121
query21	224	132	104	104
query22	4385	4452	4221	4221
query23	33994	33466	33252	33252
query24	6803	2467	2456	2456
query25	474	475	414	414
query26	697	280	152	152
query27	2283	508	339	339
query28	3017	2441	2455	2441
query29	588	572	447	447
query30	280	228	198	198
query31	880	893	763	763
query32	74	64	66	64
query33	453	365	325	325
query34	777	870	534	534
query35	805	875	753	753
query36	965	1001	905	905
query37	120	103	78	78
query38	4217	4095	4115	4095
query39	1499	1441	1442	1441
query40	226	126	111	111
query41	56	63	62	62
query42	128	121	114	114
query43	500	540	490	490
query44	1405	845	816	816
query45	187	177	175	175
query46	851	1036	642	642
query47	1841	1875	1782	1782
query48	414	424	324	324
query49	694	515	440	440
query50	680	701	419	419
query51	4328	4201	4202	4201
query52	118	110	101	101
query53	237	265	187	187
query54	594	583	541	541
query55	86	92	87	87
query56	329	308	308	308
query57	1183	1214	1125	1125
query58	274	266	269	266
query59	2717	2842	2659	2659
query60	357	352	314	314
query61	133	126	125	125
query62	723	761	701	701
query63	241	187	189	187
query64	1724	1072	769	769
query65	4435	4369	4250	4250
query66	708	399	300	300
query67	15803	15621	15403	15403
query68	8349	825	523	523
query69	543	314	267	267
query70	1317	1162	1094	1094
query71	498	322	293	293
query72	5952	4842	4909	4842
query73	1304	700	347	347
query74	9185	9039	8877	8877
query75	3708	3200	2663	2663
query76	4111	1186	748	748
query77	623	378	291	291
query78	10214	10018	9217	9217
query79	2934	805	557	557
query80	660	519	436	436
query81	483	262	223	223
query82	471	129	96	96
query83	392	258	240	240
query84	302	105	85	85
query85	807	359	317	317
query86	412	301	277	277
query87	4579	4448	4464	4448
query88	3810	2226	2251	2226
query89	404	313	282	282
query90	1837	217	216	216
query91	138	142	110	110
query92	77	62	55	55
query93	2120	938	576	576
query94	660	414	316	316
query95	371	302	281	281
query96	497	556	274	274
query97	3178	3217	3116	3116
query98	227	206	209	206
query99	1452	1451	1277	1277
Total cold run time: 304557 ms
Total hot run time: 193985 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.12	0.10	0.10
query3	0.24	0.19	0.19
query4	1.60	0.19	0.20
query5	0.58	0.56	0.58
query6	1.21	0.73	0.72
query7	0.02	0.02	0.02
query8	0.05	0.03	0.03
query9	0.57	0.52	0.52
query10	0.59	0.58	0.57
query11	0.15	0.10	0.10
query12	0.14	0.11	0.11
query13	0.62	0.59	0.61
query14	2.70	2.67	2.72
query15	0.90	0.84	0.84
query16	0.38	0.37	0.37
query17	1.08	1.05	1.02
query18	0.22	0.20	0.20
query19	1.93	1.93	1.82
query20	0.02	0.01	0.01
query21	15.37	0.90	0.55
query22	0.78	1.26	0.75
query23	14.75	1.37	0.64
query24	6.95	0.80	1.40
query25	0.49	0.07	0.14
query26	0.57	0.17	0.13
query27	0.06	0.05	0.04
query28	9.92	0.88	0.44
query29	12.55	3.96	3.33
query30	0.25	0.09	0.06
query31	2.81	0.61	0.39
query32	3.24	0.55	0.46
query33	3.01	3.06	3.02
query34	15.79	5.07	4.47
query35	4.48	4.51	4.49
query36	0.65	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.05	0.03
query39	0.03	0.03	0.02
query40	0.17	0.13	0.12
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.32 s
Total hot run time: 31.09 s

@linrrzqqq linrrzqqq force-pushed the mtPolygon branch 3 times, most recently from 0283175 to c2c05ad Compare April 7, 2025 23:46
@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26113	5047	5015	5015
q2	2068	283	199	199
q3	10385	1225	676	676
q4	10226	1030	543	543
q5	7527	2358	2267	2267
q6	190	160	130	130
q7	923	733	613	613
q8	9306	1222	1102	1102
q9	6874	5108	5058	5058
q10	6820	2296	1894	1894
q11	485	278	272	272
q12	353	361	219	219
q13	17777	3660	3087	3087
q14	221	222	209	209
q15	528	497	500	497
q16	617	640	571	571
q17	589	845	351	351
q18	7491	7137	7063	7063
q19	1809	952	543	543
q20	323	326	222	222
q21	3929	2629	2436	2436
q22	1006	1023	962	962
Total cold run time: 115560 ms
Total hot run time: 33929 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5139	5085	5097	5085
q2	236	333	231	231
q3	2106	2641	2228	2228
q4	1433	1803	1383	1383
q5	4416	4342	4353	4342
q6	213	162	129	129
q7	1992	1901	1758	1758
q8	2606	2680	2597	2597
q9	7230	7190	7033	7033
q10	2926	3177	2852	2852
q11	565	523	478	478
q12	692	749	662	662
q13	3579	3822	3252	3252
q14	327	310	274	274
q15	493	457	474	457
q16	644	690	644	644
q17	1157	1410	1408	1408
q18	7625	7676	7331	7331
q19	813	888	1137	888
q20	1973	1945	1883	1883
q21	5357	4984	4802	4802
q22	1110	1094	1000	1000
Total cold run time: 52632 ms
Total hot run time: 50717 ms

@doris-robot
Copy link

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

query1	1362	1069	1029	1029
query2	6033	1883	1910	1883
query3	11062	4512	4474	4474
query4	56031	25483	23295	23295
query5	5072	480	453	453
query6	347	217	192	192
query7	4892	513	283	283
query8	307	237	227	227
query9	5755	2564	2569	2564
query10	435	320	250	250
query11	15047	15019	14779	14779
query12	162	114	107	107
query13	1055	505	394	394
query14	10245	6253	6314	6253
query15	204	201	187	187
query16	7168	645	493	493
query17	1061	754	594	594
query18	1584	466	309	309
query19	197	186	163	163
query20	125	129	116	116
query21	212	129	105	105
query22	4707	4539	4480	4480
query23	33943	33329	33369	33329
query24	6575	2423	2391	2391
query25	462	456	399	399
query26	685	267	151	151
query27	2385	504	333	333
query28	3237	2457	2443	2443
query29	564	553	447	447
query30	308	220	195	195
query31	880	899	805	805
query32	75	65	59	59
query33	454	372	326	326
query34	796	853	519	519
query35	863	858	755	755
query36	954	1015	883	883
query37	120	105	72	72
query38	4062	4271	4133	4133
query39	1516	1444	1432	1432
query40	213	129	107	107
query41	53	49	51	49
query42	120	109	114	109
query43	501	508	489	489
query44	1335	809	820	809
query45	186	184	174	174
query46	867	1050	663	663
query47	1814	1921	1848	1848
query48	390	420	319	319
query49	711	571	462	462
query50	663	705	414	414
query51	4300	4364	4202	4202
query52	111	110	106	106
query53	258	276	187	187
query54	590	599	557	557
query55	96	92	94	92
query56	325	338	317	317
query57	1176	1194	1128	1128
query58	275	277	272	272
query59	2804	2744	2715	2715
query60	321	326	344	326
query61	129	130	133	130
query62	755	739	669	669
query63	229	190	187	187
query64	1679	1051	705	705
query65	4399	4227	4227	4227
query66	711	398	307	307
query67	16065	15716	15372	15372
query68	9125	869	530	530
query69	549	305	266	266
query70	1233	1104	989	989
query71	485	314	301	301
query72	5738	4609	4870	4609
query73	1434	641	342	342
query74	9197	8809	8660	8660
query75	4143	3257	2714	2714
query76	4272	1201	763	763
query77	616	376	288	288
query78	9942	10014	9295	9295
query79	5098	800	552	552
query80	746	499	444	444
query81	489	258	220	220
query82	646	131	108	108
query83	365	253	239	239
query84	298	109	88	88
query85	812	361	322	322
query86	387	295	295	295
query87	4524	4387	4552	4387
query88	2905	2216	2236	2216
query89	445	311	287	287
query90	1920	211	209	209
query91	155	146	114	114
query92	74	62	55	55
query93	2517	967	573	573
query94	707	407	273	273
query95	370	286	293	286
query96	489	566	281	281
query97	3167	3206	3103	3103
query98	228	207	203	203
query99	1430	1400	1322	1322
Total cold run time: 306524 ms
Total hot run time: 192578 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.12	0.10	0.11
query3	0.25	0.19	0.19
query4	1.59	0.20	0.20
query5	0.59	0.58	0.58
query6	1.18	0.71	0.73
query7	0.03	0.02	0.02
query8	0.04	0.03	0.04
query9	0.58	0.54	0.52
query10	0.58	0.58	0.58
query11	0.16	0.11	0.11
query12	0.14	0.12	0.12
query13	0.61	0.60	0.60
query14	2.68	2.80	2.69
query15	0.91	0.85	0.85
query16	0.38	0.38	0.41
query17	1.02	1.03	1.06
query18	0.21	0.20	0.19
query19	1.88	1.92	1.81
query20	0.01	0.01	0.02
query21	15.36	0.94	0.55
query22	0.77	1.22	0.70
query23	14.82	1.36	0.66
query24	7.47	1.22	0.54
query25	0.48	0.49	0.12
query26	0.70	0.16	0.15
query27	0.07	0.05	0.05
query28	9.72	0.90	0.43
query29	12.61	4.03	3.30
query30	0.26	0.09	0.06
query31	2.82	0.60	0.39
query32	3.22	0.56	0.46
query33	3.01	3.01	3.11
query34	15.78	5.03	4.49
query35	4.50	4.52	4.50
query36	0.67	0.49	0.47
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.02
query40	0.17	0.14	0.13
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.75 s
Total hot run time: 30.96 s

@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26074	5050	5006	5006
q2	2071	284	180	180
q3	10391	1230	682	682
q4	10224	1001	542	542
q5	7541	2383	2311	2311
q6	196	165	142	142
q7	909	745	601	601
q8	9301	1305	1137	1137
q9	6761	5098	5115	5098
q10	6831	2312	1884	1884
q11	484	287	272	272
q12	367	358	219	219
q13	17782	3635	3129	3129
q14	230	227	210	210
q15	527	481	473	473
q16	608	616	592	592
q17	585	860	367	367
q18	7695	7139	7204	7139
q19	1107	953	581	581
q20	334	338	231	231
q21	4063	3410	2500	2500
q22	1031	993	932	932
Total cold run time: 115112 ms
Total hot run time: 34228 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5130	5107	5113	5107
q2	242	330	227	227
q3	2140	2650	2291	2291
q4	1447	1840	1444	1444
q5	4542	4483	4374	4374
q6	211	163	126	126
q7	1936	1917	1806	1806
q8	2594	2580	2532	2532
q9	7142	7192	7227	7192
q10	2963	3145	2727	2727
q11	579	504	490	490
q12	700	778	609	609
q13	3482	3856	3291	3291
q14	280	297	276	276
q15	526	462	476	462
q16	654	678	636	636
q17	1207	1557	1352	1352
q18	7827	7642	7365	7365
q19	825	802	883	802
q20	2012	1995	1771	1771
q21	5342	4812	4590	4590
q22	1014	1023	991	991
Total cold run time: 52795 ms
Total hot run time: 50461 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186471 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 4d46f07e04fe3cc77ee4daf17d1cbb846afff25b, data reload: false

query1	1004	502	475	475
query2	6548	1883	1879	1879
query3	6741	225	215	215
query4	26034	23610	23186	23186
query5	4388	640	476	476
query6	305	211	204	204
query7	4632	491	285	285
query8	305	272	244	244
query9	8604	2580	2573	2573
query10	506	324	275	275
query11	15700	15032	14957	14957
query12	154	115	106	106
query13	1649	508	382	382
query14	9141	6128	6170	6128
query15	201	190	163	163
query16	7217	615	453	453
query17	1197	716	583	583
query18	1960	391	299	299
query19	186	182	160	160
query20	119	109	115	109
query21	216	117	102	102
query22	4326	4380	4403	4380
query23	33834	32824	32935	32824
query24	8481	2363	2384	2363
query25	523	448	435	435
query26	1229	277	146	146
query27	2741	507	333	333
query28	4308	2404	2380	2380
query29	761	578	424	424
query30	288	233	189	189
query31	954	889	768	768
query32	73	68	64	64
query33	589	367	314	314
query34	788	862	498	498
query35	785	822	755	755
query36	935	959	871	871
query37	115	104	80	80
query38	4070	4123	4129	4123
query39	1467	1426	1387	1387
query40	205	121	107	107
query41	57	54	56	54
query42	122	107	105	105
query43	504	503	467	467
query44	1284	789	781	781
query45	181	178	173	173
query46	830	1011	611	611
query47	1758	1824	1735	1735
query48	368	407	304	304
query49	791	538	424	424
query50	632	672	406	406
query51	4186	4170	4112	4112
query52	119	116	103	103
query53	236	248	182	182
query54	568	579	514	514
query55	88	83	84	83
query56	309	316	309	309
query57	1123	1157	1091	1091
query58	284	290	269	269
query59	2661	2688	2494	2494
query60	350	337	314	314
query61	150	152	149	149
query62	789	765	661	661
query63	226	189	190	189
query64	4428	1105	845	845
query65	4374	4225	4248	4225
query66	1148	442	323	323
query67	15719	15513	15218	15218
query68	8558	873	510	510
query69	474	299	264	264
query70	1217	1145	1137	1137
query71	457	315	287	287
query72	5558	4755	4779	4755
query73	729	600	342	342
query74	8879	8983	8800	8800
query75	4071	3198	2732	2732
query76	3670	1177	746	746
query77	802	372	287	287
query78	10050	10263	9292	9292
query79	3910	820	543	543
query80	647	508	457	457
query81	482	260	219	219
query82	550	128	100	100
query83	293	254	242	242
query84	296	172	89	89
query85	798	357	316	316
query86	337	307	290	290
query87	4526	4423	4280	4280
query88	3200	2210	2236	2210
query89	444	306	282	282
query90	1970	211	204	204
query91	153	137	115	115
query92	79	68	58	58
query93	2606	946	577	577
query94	677	415	306	306
query95	382	292	307	292
query96	499	566	280	280
query97	3177	3191	3134	3134
query98	227	209	206	206
query99	1469	1382	1283	1283
Total cold run time: 277751 ms
Total hot run time: 186471 ms

@yiguolei yiguolei merged commit 9e6857a into apache:master Apr 15, 2025
28 of 29 checks passed
@linrrzqqq linrrzqqq deleted the mtPolygon branch April 15, 2025 08:32
@linrrzqqq linrrzqqq restored the mtPolygon branch April 15, 2025 08:54
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 15, 2025
…he#49665)

1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))`
Obviously, they touches at the point `(5 10)`
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 15, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))` 
Obviously, they touches at the point `(5 10)`
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 15, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))` 
Obviously, they touches at the point `(5 10)`
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 16, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))`
Obviously, they touches at the point `(5 10)`
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 16, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))`
Obviously, they touches at the point `(5 10)`
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 16, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))`
Obviously, they touches at the point `(5 10)`
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Apr 16, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))`
Obviously, they touches at the point `(5 10)`
yiguolei pushed a commit that referenced this pull request Apr 17, 2025
seawinde pushed a commit to seawinde/doris that referenced this pull request Apr 17, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))` 
Obviously, they touches at the point `(5 10)`
@linrrzqqq linrrzqqq deleted the mtPolygon branch April 21, 2025 12:39
dataroaring pushed a commit that referenced this pull request Apr 22, 2025
@yiguolei yiguolei mentioned this pull request May 13, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
…he#49665)

### What problem does this PR solve?
1. Enhances the `GeometryFromText` function to support parsing
`MULTIPOLYGON` WKT
2. Support `ST_CONTAINS ` , `ST_INTERSECTS`, `ST_TOUCHES` for it and
other shapes.
3. Fixed the behavior of `ST_Touches` between two polygons, which has
been updated to return `true` when they touch at a single point that is
not on a horizontal or vertical edge.
For example, the following polygons now return true for ST_Touches:
         - `POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))`
         -  `POLYGON((5 10, 0 15, 10 15))` 
Obviously, they touches at the point `(5 10)`
@gavinchou gavinchou mentioned this pull request Jun 11, 2025
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.10-merged dev/3.0.6-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doris-Future] Support MultiPolygon for Geometry functions

7 participants