Skip to content

Conversation

@linrrzqqq
Copy link
Contributor

@linrrzqqq linrrzqqq commented Apr 15, 2025

pick: #48695 and #49665

Support for ST_Intersects, ST_Disjoint, ST_Touches sql functions.
@linrrzqqq linrrzqqq requested a review from dataroaring as a code owner April 15, 2025 10:57
@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
Copy link
Contributor Author

run buildall

@linrrzqqq linrrzqqq force-pushed the pick_48695_branch_3_0 branch from 2b73024 to 12370e2 Compare April 16, 2025 11:37
…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 force-pushed the pick_48695_branch_3_0 branch from 12370e2 to f07aa27 Compare April 16, 2025 11:38
@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17582	6951	6585	6585
q2	2061	178	182	178
q3	10668	1109	1155	1109
q4	10555	726	845	726
q5	7770	2889	2826	2826
q6	226	139	136	136
q7	983	624	602	602
q8	9366	1956	2093	1956
q9	6622	6405	6426	6405
q10	7006	2262	2319	2262
q11	454	264	265	264
q12	397	210	205	205
q13	17797	2995	2992	2992
q14	243	211	207	207
q15	521	469	470	469
q16	662	591	588	588
q17	985	569	606	569
q18	7220	6588	6763	6588
q19	1402	1018	1088	1018
q20	485	214	203	203
q21	4017	3161	3355	3161
q22	1093	994	998	994
Total cold run time: 108115 ms
Total hot run time: 40043 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6628	6535	6579	6535
q2	332	231	230	230
q3	2865	2765	2913	2765
q4	2054	1756	1801	1756
q5	5741	5763	5719	5719
q6	210	128	130	128
q7	2189	1803	1842	1803
q8	3374	3568	3510	3510
q9	8713	8883	8849	8849
q10	3565	3537	3513	3513
q11	594	499	496	496
q12	786	620	596	596
q13	10106	3142	3213	3142
q14	294	256	271	256
q15	520	462	462	462
q16	707	641	637	637
q17	1842	1643	1618	1618
q18	8232	7745	7715	7715
q19	1743	1556	1484	1484
q20	2072	1844	1861	1844
q21	5455	5301	5298	5298
q22	1148	1074	1005	1005
Total cold run time: 69170 ms
Total hot run time: 59361 ms

@doris-robot
Copy link

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

query1	1290	899	894	894
query2	6247	2013	2018	2013
query3	10943	4432	4265	4265
query4	61465	28876	23388	23388
query5	5187	460	445	445
query6	391	183	174	174
query7	5439	317	319	317
query8	313	233	230	230
query9	8505	2620	2600	2600
query10	476	279	267	267
query11	17502	15242	15724	15242
query12	164	103	105	103
query13	1465	461	434	434
query14	9883	6916	7394	6916
query15	192	186	178	178
query16	7313	495	515	495
query17	1155	572	604	572
query18	1874	335	323	323
query19	218	161	158	158
query20	119	112	111	111
query21	216	108	107	107
query22	4763	4622	4492	4492
query23	34670	34106	34193	34106
query24	6148	2965	2900	2900
query25	542	420	420	420
query26	661	174	171	171
query27	2051	350	360	350
query28	4887	2465	2421	2421
query29	750	487	485	485
query30	248	168	157	157
query31	990	838	850	838
query32	67	58	55	55
query33	418	293	291	291
query34	915	533	524	524
query35	858	756	746	746
query36	1098	976	947	947
query37	113	63	73	63
query38	4095	3920	3928	3920
query39	1527	1472	1489	1472
query40	211	107	101	101
query41	49	50	49	49
query42	115	104	98	98
query43	529	482	513	482
query44	1178	845	821	821
query45	193	178	167	167
query46	1149	750	729	729
query47	2035	1878	1908	1878
query48	476	388	392	388
query49	724	387	400	387
query50	851	442	440	440
query51	7406	7255	7478	7255
query52	103	93	92	92
query53	266	188	185	185
query54	582	476	480	476
query55	78	77	74	74
query56	272	259	243	243
query57	1265	1091	1099	1091
query58	233	207	211	207
query59	3067	2953	2874	2874
query60	268	262	240	240
query61	110	109	121	109
query62	760	672	687	672
query63	220	190	187	187
query64	1402	691	643	643
query65	3278	3230	3202	3202
query66	695	293	303	293
query67	15859	15446	15369	15369
query68	4171	569	572	569
query69	442	274	268	268
query70	1202	1093	1090	1090
query71	350	262	254	254
query72	6356	4070	4097	4070
query73	756	355	366	355
query74	10689	9280	9011	9011
query75	3337	2669	2605	2605
query76	2002	1026	1000	1000
query77	470	284	281	281
query78	10618	9693	9523	9523
query79	2182	616	607	607
query80	1338	431	443	431
query81	524	245	240	240
query82	1227	92	91	91
query83	176	141	142	141
query84	286	83	78	78
query85	988	302	302	302
query86	403	262	295	262
query87	4447	4250	4289	4250
query88	3910	2389	2357	2357
query89	414	295	280	280
query90	1957	185	188	185
query91	183	151	145	145
query92	67	48	52	48
query93	2765	565	575	565
query94	778	297	295	295
query95	367	257	255	255
query96	617	286	279	279
query97	3293	3177	3143	3143
query98	228	203	200	200
query99	1582	1325	1293	1293
Total cold run time: 316657 ms
Total hot run time: 196815 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 72.45% (660/911) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 40.11% (10527/26248)
Line Coverage 30.86% (88851/287952)
Region Coverage 29.98% (45824/152847)
Branch Coverage 26.45% (23378/88386)

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.06
query4	1.60	0.11	0.11
query5	0.52	0.52	0.49
query6	1.13	0.73	0.73
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.57	0.49	0.51
query10	0.54	0.54	0.54
query11	0.14	0.10	0.10
query12	0.16	0.10	0.11
query13	0.61	0.58	0.59
query14	2.84	2.80	2.75
query15	0.89	0.82	0.82
query16	0.38	0.40	0.36
query17	1.04	1.00	1.07
query18	0.24	0.21	0.22
query19	1.86	1.77	2.09
query20	0.02	0.01	0.01
query21	15.35	0.59	0.59
query22	2.90	2.29	2.43
query23	16.89	1.09	0.84
query24	3.04	1.10	0.37
query25	0.24	0.15	0.15
query26	0.28	0.14	0.14
query27	0.04	0.03	0.04
query28	11.08	0.48	0.47
query29	12.54	3.28	3.24
query30	0.24	0.06	0.06
query31	2.85	0.39	0.38
query32	3.25	0.47	0.46
query33	2.97	3.01	3.07
query34	16.92	4.53	4.59
query35	4.65	4.60	4.52
query36	0.67	0.48	0.48
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.02
query40	0.16	0.12	0.12
query41	0.08	0.02	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 107.32 s
Total hot run time: 32.09 s

Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 22, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

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 e7d4b9f into apache:branch-3.0 Apr 22, 2025
20 of 21 checks passed
@linrrzqqq linrrzqqq deleted the pick_48695_branch_3_0 branch April 22, 2025 07:26
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants