[feature](function) Add ST_NumGeometries, ST_NumPoints, ST_Geometries functions#63049
[feature](function) Add ST_NumGeometries, ST_NumPoints, ST_Geometries functions#63049acarofpigs wants to merge 4 commits into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
0a9a3ff to
e870bd2
Compare
|
run buildall |
|
/review |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
facf26f to
0d5d800
Compare
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
0d5d800 to
0fdb594
Compare
0fdb594 to
8feb287
Compare
|
run buildall |
1 similar comment
|
run buildall |
TPC-H: Total hot run time: 30924 ms |
TPC-DS: Total hot run time: 170352 ms |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
303b19f to
fb632cd
Compare
|
run buildall |
fb632cd to
4eef041
Compare
|
run buildall |
4eef041 to
fb632cd
Compare
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 31061 ms |
TPC-DS: Total hot run time: 169633 ms |
|
run cloud_p0 |
FE UT Coverage ReportIncrement line coverage |
|
run external |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 31101 ms |
TPC-DS: Total hot run time: 169952 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
b07854b to
fb632cd
Compare
|
run buildall |
TPC-H: Total hot run time: 31041 ms |
TPC-DS: Total hot run time: 170122 ms |
FE Regression Coverage ReportIncrement line coverage |
|
run beut |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
/review |
1 similar comment
|
/review |
There was a problem hiding this comment.
I found one blocking correctness issue in the new spatial function behavior.
Critical checkpoint conclusions:
- Goal and tests: The PR adds ST_NumGeometries, ST_NumPoints, and ST_Geometries with FE/BE registration plus BE, FE, and regression tests. The tests cover normal geometry/null/invalid paths, but one expected result codifies an invalid sentinel value.
- Scope/focus: The actual GitHub PR diff is focused on the spatial functions and their tests.
- Concurrency/lifecycle/config/transaction/persistence: Not applicable; this is scalar function execution and type registration only.
- FE-BE consistency: Mostly aligned for function names and return families, but ST_NumPoints currently exposes an internal BE sentinel for unsupported shapes.
- Data correctness: Blocking issue below; valid input can return -1 as a point count.
- Tests/results: Regression output currently expects -1 for ST_Circle, which should be corrected together with the implementation.
- Observability/performance: No additional observability required; performance is acceptable for scalar spatial decoding at this scope.
User focus: No additional user-provided review focus was supplied.
| } | ||
|
|
||
| res->insert_value(shape->num_points()); | ||
| } |
There was a problem hiding this comment.
GeoShape::num_points() uses -1 as the base-class sentinel for shapes that do not implement a point count, and GeoCircle does not override it. This line therefore returns -1 for ST_NumPoints(ST_Circle(...)) (the new regression output also locks that in), which exposes an internal sentinel as a user-visible count. A point-count function should not return a negative count for a valid geometry; please convert negative num_points() results to NULL (or define a real non-negative count for circles) before inserting the value.
Possible file(s) that should be tracked in LFS detected: 🚨The following file(s) exceeds the file size limit:
Consider using |
b37bae6 to
29bda20
Compare
|
run buildall |
1 similar comment
|
run buildall |
TPC-H: Total hot run time: 31517 ms |
TPC-DS: Total hot run time: 171687 ms |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
FE UT Coverage ReportIncrement line coverage |
… functions
What problem does this PR solve?
Issue Number: ref #48203
Related PR: apache/doris-website#3623
Problem Summary:
Add three new spatial functions for geometry collection operations:
ST_NumGeometries: Returns the number of sub-geometries in a geometry object.ST_NumPoints: Returns the total number of vertices (points) in a geometry object.ST_Geometries: Decomposes a geometry object into an array of its sub-geometries.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)