Skip to content

[Enhancement](geo) Support ST_Within spatial functions#65790

Open
yy782 wants to merge 2 commits into
apache:masterfrom
yy782:enhancement-st_within
Open

[Enhancement](geo) Support ST_Within spatial functions#65790
yy782 wants to merge 2 commits into
apache:masterfrom
yy782:enhancement-st_within

Conversation

@yy782

@yy782 yy782 commented Jul 19, 2026

Copy link
Copy Markdown

What problem does this PR solve?

Related PR: #48203

Problem Summary:
Support ST_Within spatial functions

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
Copy Markdown
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?

@yy782

yy782 commented Jul 19, 2026

Copy link
Copy Markdown
Author

/review

@yy782

yy782 commented Jul 19, 2026

Copy link
Copy Markdown
Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17646	4311	4282	4282
q2	2038	341	212	212
q3	10225	1488	848	848
q4	4684	480	347	347
q5	7514	877	573	573
q6	208	188	147	147
q7	802	826	647	647
q8	9430	1618	1607	1607
q9	5637	4408	4370	4370
q10	6769	1742	1499	1499
q11	497	360	320	320
q12	721	582	467	467
q13	18107	3382	2741	2741
q14	280	277	258	258
q15	q16	796	778	709	709
q17	1053	1062	1031	1031
q18	6912	5843	5597	5597
q19	1326	1402	1075	1075
q20	826	718	624	624
q21	6029	2635	2568	2568
q22	432	368	311	311
Total cold run time: 101932 ms
Total hot run time: 30233 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4617	4450	4501	4450
q2	314	331	234	234
q3	4637	5015	4389	4389
q4	2191	2204	1411	1411
q5	4541	4406	4540	4406
q6	255	187	137	137
q7	2503	1928	1705	1705
q8	2586	2367	2411	2367
q9	8156	7879	7845	7845
q10	4752	4659	4214	4214
q11	608	447	424	424
q12	776	785	565	565
q13	3361	3558	2970	2970
q14	309	307	277	277
q15	q16	748	736	643	643
q17	1419	1399	1563	1399
q18	8155	7611	7426	7426
q19	1219	1117	1110	1110
q20	2237	2217	1961	1961
q21	5429	4758	4628	4628
q22	545	468	409	409
Total cold run time: 59358 ms
Total hot run time: 52970 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 178298 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 fe8d6fa3f4b3e6f114ee725def778585da7a7e0a, data reload: false

query5	4339	632	503	503
query6	470	238	207	207
query7	4840	620	350	350
query8	341	192	175	175
query9	8822	4092	4105	4092
query10	457	353	312	312
query11	5899	2330	2142	2142
query12	156	104	101	101
query13	1244	625	447	447
query14	6100	5241	4891	4891
query14_1	4271	4229	4274	4229
query15	235	197	189	189
query16	985	440	469	440
query17	919	709	570	570
query18	2428	482	329	329
query19	211	189	145	145
query20	111	111	107	107
query21	227	158	137	137
query22	13539	13571	13396	13396
query23	17448	16662	16123	16123
query23_1	16348	16136	16261	16136
query24	7511	1742	1309	1309
query24_1	1303	1281	1289	1281
query25	533	445	362	362
query26	1330	357	216	216
query27	2594	612	381	381
query28	4508	2002	1968	1968
query29	1069	617	464	464
query30	338	268	234	234
query31	1110	1095	995	995
query32	108	62	60	60
query33	519	352	249	249
query34	1168	1086	624	624
query35	780	776	660	660
query36	1179	1183	1055	1055
query37	157	104	90	90
query38	1875	1695	1645	1645
query39	891	876	859	859
query39_1	851	833	853	833
query40	253	167	144	144
query41	64	65	60	60
query42	94	91	92	91
query43	320	332	283	283
query44	1423	778	774	774
query45	198	182	165	165
query46	1088	1188	765	765
query47	2199	2152	1982	1982
query48	419	432	292	292
query49	571	421	320	320
query50	1096	417	359	359
query51	10943	11112	10941	10941
query52	90	84	74	74
query53	273	273	197	197
query54	280	250	219	219
query55	79	72	67	67
query56	303	323	292	292
query57	1312	1301	1203	1203
query58	299	303	281	281
query59	1574	1648	1433	1433
query60	312	278	257	257
query61	158	154	154	154
query62	545	499	436	436
query63	248	207	208	207
query64	2861	1176	871	871
query65	4714	4649	4629	4629
query66	1807	502	386	386
query67	29300	29282	29083	29083
query68	3305	1505	1064	1064
query69	397	305	271	271
query70	1051	951	959	951
query71	367	345	325	325
query72	3064	2674	2327	2327
query73	849	827	415	415
query74	5060	4918	4737	4737
query75	2548	2548	2142	2142
query76	2335	1192	771	771
query77	360	378	295	295
query78	11806	11905	11254	11254
query79	1204	1149	765	765
query80	631	594	499	499
query81	465	341	289	289
query82	235	164	131	131
query83	329	332	319	319
query84	321	162	139	139
query85	960	680	630	630
query86	322	303	279	279
query87	1819	1815	1780	1780
query88	3740	2857	2762	2762
query89	416	387	333	333
query90	2189	198	197	197
query91	204	201	159	159
query92	63	61	53	53
query93	1687	1569	1017	1017
query94	539	364	318	318
query95	791	593	457	457
query96	1070	788	360	360
query97	2605	2629	2483	2483
query98	211	208	202	202
query99	1077	1112	980	980
Total cold run time: 262473 ms
Total hot run time: 178298 ms

@hello-stephen

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

query1	0.01	0.00	0.00
query2	0.10	0.04	0.05
query3	0.25	0.14	0.13
query4	1.60	0.14	0.14
query5	0.26	0.27	0.23
query6	1.24	1.11	1.09
query7	0.04	0.01	0.01
query8	0.05	0.04	0.03
query9	0.41	0.33	0.32
query10	0.58	0.57	0.59
query11	0.19	0.14	0.14
query12	0.18	0.14	0.14
query13	0.49	0.49	0.49
query14	1.02	1.01	1.00
query15	0.62	0.60	0.61
query16	0.31	0.33	0.32
query17	1.13	1.13	1.16
query18	0.24	0.22	0.21
query19	2.06	2.01	1.97
query20	0.01	0.01	0.01
query21	15.42	0.20	0.14
query22	4.96	0.05	0.06
query23	16.14	0.33	0.12
query24	2.88	0.43	0.35
query25	0.11	0.05	0.05
query26	0.73	0.22	0.16
query27	0.04	0.03	0.04
query28	3.53	0.99	0.55
query29	12.48	4.20	3.33
query30	0.28	0.16	0.15
query31	2.76	0.57	0.33
query32	3.21	0.60	0.49
query33	3.25	3.26	3.26
query34	15.54	4.22	3.53
query35	3.53	3.52	3.58
query36	0.55	0.43	0.43
query37	0.10	0.06	0.07
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.16
query41	0.09	0.03	0.02
query42	0.04	0.03	0.03
query43	0.05	0.03	0.04
Total cold run time: 96.75 s
Total hot run time: 25.43 s

@yy782

yy782 commented Jul 19, 2026

Copy link
Copy Markdown
Author

/review

@yy782 yy782 changed the title [Enhancement] Support ST_Within spatial functions [Enhancement] (geo)Support ST_Within spatial functions Jul 19, 2026
@yy782 yy782 changed the title [Enhancement] (geo)Support ST_Within spatial functions [Enhancement](geo) Support ST_Within spatial functions Jul 19, 2026
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (3/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.06% (30527/40668)
Line Coverage 59.20% (336579/568503)
Region Coverage 55.89% (282175/504841)
Branch Coverage 57.28% (125402/218926)

yy782 added 2 commits July 20, 2026 11:00
Signed-off-by: yy <736262857@qq.com>
Signed-off-by: yy <736262857@qq.com>
@yy782
yy782 force-pushed the enhancement-st_within branch from fe8d6fa to 00298e4 Compare July 20, 2026 03:00
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.

2 participants