Repository navigation
[feature](be,fe) Add 3D dimension support for GEO functions (ST_Z, ST_M, ST_NDims, ST_ZmFlag, ST_AsEWKB - #68693
kaori-seasons wants to merge 5 commits into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
@zclllyybb Could you please start CI? |
TPC-H: Total hot run time: 27817 ms |
TPC-DS: Total hot run time: 153021 ms |
ClickBench: Total hot run time: 24.06 s |
d9a9fb7 to
9b23847
Compare
|
run buildall |
TPC-H: Total hot run time: 27714 ms |
TPC-DS: Total hot run time: 152531 ms |
ClickBench: Total hot run time: 23.99 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
9b23847 to
72c0bfb
Compare
|
run buildall |
TPC-H: Total hot run time: 27811 ms |
TPC-DS: Total hot run time: 153108 ms |
ClickBench: Total hot run time: 24 s |
c07654d to
f610235
Compare
|
run buildall |
TPC-H: Total hot run time: 27697 ms |
TPC-DS: Total hot run time: 152566 ms |
ClickBench: Total hot run time: 23.86 s |
…_M, ST_NDims, ST_ZmFlag, ST_AsEWKB) Issue Number: close apache#62498 Problem Summary: Doris GEO engine lacked 3D dimension support. WKT parser could not parse POINT Z / POINT M coordinates; WKB parser did not recognize EWKB Z/M flags or ISO WKB type codes (+1000/+2000/+3000), causing silent data corruption when reading PostGIS-produced 3D EWKB. This commit adds: - WKT parser support for Z/M/ZM dimension keywords and 3D coordinates - WKB parser support for EWKB Z/M flags and ISO WKB dimension type codes - New scalar functions: ST_Z, ST_M, ST_NDims, ST_ZmFlag, ST_AsEWKB - Proper dimension-aware WKB output (EWKB with Z/M flags) Added ST_Z, ST_M, ST_NDims, ST_ZmFlag, ST_AsEWKB scalar functions and 3D WKT/WKB parsing support for GEO functions. - Test: Unit tests added for wkb_parse, wkt_parse, geo_types, functions_geo; FunctionRegistryTest updated - Behavior changed: Yes - WKT/WKB parser now accepts 3D coordinates (Z/M/ZM) - Does this need documentation: Yes
f610235 to
2c0847a
Compare
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
maybe @linrrzqqq could have a look |
…plete type before fmt template instantiation The 'extern template struct fmt::formatter<Int128>' declarations triggered fmt's is_base_of/is_string type traits against the forward-declared wide::integer, causing 'implicit instantiation of undefined template' with libc++ >= 19. Including the full definition makes the type complete at the point of instantiation.
|
run buildall |
TPC-H: Total hot run time: 29579 ms |
TPC-DS: Total hot run time: 152816 ms |
ClickBench: Total hot run time: 24.38 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
…n test_st_3d_dimension_functions.out The expected hex contained 8 trailing garbage bytes (one extra zero double) left over from an early development build of the EWKB serializer. The current byte-exact streaming implementation emits a structurally complete 133-byte EWKB (verified: header+gtype+nrings+npts+5 pts x 3 doubles consumes the whole buffer). Updated the expectation to the actual output which matches the EWKB spec.
|
run buildall |
TPC-H: Total hot run time: 29226 ms |
TPC-DS: Total hot run time: 152594 ms |
ClickBench: Total hot run time: 24.63 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
FE UT Coverage ReportIncrement line coverage |
…ns onto scoped enum refactor Conflict resolution follows upstream/master as the primary skeleton: - geo_tobinary_type.h/geo_tobinary.h/geo_tobinary.cpp: adopt upstream enum class byteOrder/wkbType and ByteOrderValues::EndianType, keep EWKB Z/M/SRID flag emission in writeGeometryType via GeoShape hints. - geo_types.cpp: keep our dimensional encoding protocol (version byte + has_z/has_m) translated to upstream GeoShapeType/GeoParseStatus idioms. - wkb_parse.cpp: rebuilt on upstream reader; EWKB/ISO +1000/+2000/+3000 parsing, MULTI_POLYGON support and boundary checks ported with scoped enums; upstream byte-order pre-handling in read() retained. - wkt_yacc.y: dimension_modifier grammar kept, GeoParseStatus:: scoped. - Audited all PR-touched files for stale unscoped enum usage (46 sites). Verified: full BE+FE build clean (clang-20, bison 3.8.2), clang-format 16 zero violations, regression suite test_st_3d_dimension_functions 132/132 blocks match on local cluster incl. EWKB POLYGON Z 133-byte expectation.
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
TPC-H: Total hot run time: 28897 ms |
TPC-DS: Total hot run time: 150602 ms |
ClickBench: Total hot run time: 24.6 s |
FE Regression Coverage ReportIncrement line coverage |
What problem does this PR solve?
Issue Number: close #62498
Problem Summary: Doris GEO engine lacked 3D dimension support. WKT parser could not parse POINT Z / POINT M coordinates; WKB parser did not recognize EWKB Z/M flags or ISO WKB type codes (+1000/+2000/+3000), causing silent data corruption when reading PostGIS-produced 3D EWKB. This commit adds:
Release note
Added ST_Z, ST_M, ST_NDims, ST_ZmFlag, ST_AsEWKB scalar functions and 3D WKT/WKB parsing support for GEO functions.
Check List (For Author)