Hello Balazs Hevele, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24540

to look at the new patch set (#8).

Change subject: POC IMPALA-15164: Port native C++ geospatial functions to WKB 
mode
......................................................................

POC IMPALA-15164: Port native C++ geospatial functions to WKB mode

Implement native C++ ST_ geospatial functions for WKB_EXPERIMENTAL mode
so they no longer fall back to the Java (ESRI) implementations. Builds on
the WKB serialization foundation (common.h / wkb-format.h /
wkb-serialization.*) added in the previous commit. Kept as a single
commit; it can be split further later if desired.

Adds:
- geometry-wrapper-wkb.{h,cc}: GeometryWrapperWkb -- deserializes WKB into
  boost::geometry types and back, and hosts the geometry property methods
  (Area/Length/Distance/Centroid/...).
- relation-wrapper-wkb.{h,cc} (+ relation-wrapper-wkb-test.cc): native
  relation predicates (Contains/Crosses/Disjoint/Equals/Intersects/
  Overlaps/Touches/Within), with C++ unit coverage.
- geospatial-functions-wkb-ir.cc: the _WKB IR entry points -- accessors,
  constructors, predicates, transformations, binning and properties.
- wkt.h: WKT read helpers; bin-utils.h: ST_Bin binning helpers.
- HiveEsriGeospatialBuiltins.addWkbNatives(): registers the natives in
  WKB_EXPERIMENTAL mode; functions not registered fall back to Java.
- impala-ir.cc include + scalar-expr-evaluator force-refs so the IR is
  compiled into the codegen module and not stripped.

New geo files use the bg:: alias (= boost::geometry) to match common.h.

Tests:
- relation-wrapper-wkb-test.cc: C++ coverage of the relation predicates.
- test_wkb_experimental_relations_table + geospatial-relations-table.test:
  native relations over functional.geom_relations_wkt.
- The existing WKB geospatial tests now exercise the native path.
- ST_NumPoints of an empty point (0 in ESRI; 1 in the WKB native, since
  boost has no empty-point concept) moved to geospatial-esri-specific-
  overloads.test as an ESRI-only case, pending unified empty-point handling.

Change-Id: I0047acebd4aaa774bf6bb8ec0618515d38ad6aae
Asssisted-by: Claude Opus 4.8
---
M be/src/codegen/impala-ir.cc
M be/src/exprs/geo/CMakeLists.txt
A be/src/exprs/geo/bin-utils.h
M be/src/exprs/geo/common.h
A be/src/exprs/geo/geometry-wrapper-wkb.cc
A be/src/exprs/geo/geometry-wrapper-wkb.h
A be/src/exprs/geo/geospatial-functions-wkb-ir.cc
M be/src/exprs/geo/geospatial-functions.h
A be/src/exprs/geo/relation-wrapper-wkb-test.cc
A be/src/exprs/geo/relation-wrapper-wkb.cc
A be/src/exprs/geo/relation-wrapper-wkb.h
A be/src/exprs/geo/wkt.h
M be/src/exprs/scalar-expr-evaluator.cc
M 
fe/src/compat-hive-3/java/org/apache/impala/compat/HiveEsriGeospatialBuiltins.java
M 
testdata/workloads/functional-query/queries/QueryTest/geospatial-esri-specific-overloads.test
M testdata/workloads/functional-query/queries/QueryTest/geospatial-esri.test
M 
testdata/workloads/functional-query/queries/QueryTest/geospatial-relations-table.test
M tests/custom_cluster/test_geospatial_library.py
18 files changed, 2,371 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/40/24540/8
--
To view, visit http://gerrit.cloudera.org:8080/24540
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0047acebd4aaa774bf6bb8ec0618515d38ad6aae
Gerrit-Change-Number: 24540
Gerrit-PatchSet: 8
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Balazs Hevele <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>

Reply via email to