Skip to content

Commit a8f45fe

Browse files
czentgrlga-zurich
authored andcommitted
[native] Add PRESTO_ENABLE_SPATIAL option
With Velox PR 14103 the VELOX_ENABLE_GEO is off by default. PrestoC++ needs a method to enable the build of the GEO functions in the Velox submodule. Generally, this is called spatial functionality and, therefore, PRESTO_ENABLE_SPATIAL is introduced which enables VELOX_ENABLE_GEO.
1 parent 2a2de61 commit a8f45fe

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

.github/workflows/prestocpp-linux-adapters-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
-DPRESTO_STATS_REPORTER_TYPE=PROMETHEUS \
7777
-DPRESTO_MEMORY_CHECKER_TYPE=LINUX_MEMORY_CHECKER \
7878
-DPRESTO_ENABLE_TESTING=OFF \
79+
-DPRESTO_ENABLE_SPATIAL=ON \
7980
-DCMAKE_PREFIX_PATH=/usr/local \
8081
-DThrift_ROOT=/usr/local \
8182
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \

.github/workflows/prestocpp-linux-build-and-unit-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
-DPRESTO_ENABLE_JWT=ON \
9292
-DPRESTO_STATS_REPORTER_TYPE=PROMETHEUS \
9393
-DPRESTO_MEMORY_CHECKER_TYPE=LINUX_MEMORY_CHECKER \
94+
-DPRESTO_ENABLE_SPATIAL=ON \
9495
-DCMAKE_PREFIX_PATH=/usr/local \
9596
-DThrift_ROOT=/usr/local \
9697
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \

.github/workflows/prestocpp-linux-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
-DPRESTO_ENABLE_JWT=ON \
5252
-DPRESTO_STATS_REPORTER_TYPE=PROMETHEUS \
5353
-DPRESTO_MEMORY_CHECKER_TYPE=LINUX_MEMORY_CHECKER \
54+
-DPRESTO_ENABLE_SPATIAL=ON \
5455
-DPRESTO_ENABLE_TESTING=OFF \
5556
-DCMAKE_PREFIX_PATH=/usr/local \
5657
-DThrift_ROOT=/usr/local \

presto-native-execution/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ option(PRESTO_ENABLE_JWT "Enable JWT (JSON Web Token) authentication" OFF)
7070

7171
option(PRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR "Enable Arrow Flight connector" OFF)
7272

73+
option(PRESTO_ENABLE_SPATIAL "Enable spatial support" OFF)
74+
7375
# Set all Velox options below and make sure that if we include folly headers or
7476
# other dependency headers that include folly headers we turn off the coroutines
7577
# and turn on int128.
@@ -124,6 +126,12 @@ if(PRESTO_ENABLE_CUDF)
124126
cmake_policy(SET CMP0104 NEW)
125127
endif()
126128

129+
if(PRESTO_ENABLE_SPATIAL)
130+
set(VELOX_ENABLE_GEO
131+
ON
132+
CACHE BOOL "Enable Velox Geometry (aka spatial) support")
133+
endif()
134+
127135
set(VELOX_BUILD_TESTING
128136
OFF
129137
CACHE BOOL "Enable Velox tests")

presto-native-execution/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ The make command will look like:
138138

139139
The required dependencies are bundled from the Velox setup scripts.
140140

141+
#### Spatial type and function support
142+
To enable support for spatial types and functions, add to the extra cmake flags:
143+
`EXTRA_CMAKE_FLAGS = -PRESTO_ENABLE_SPATIAL`
144+
145+
The spatial support adds new types (OGC geometry types) and functionality for spatial calculations.
146+
141147
### Makefile Targets
142148
A reminder of the available Makefile targets can be obtained using `make help`
143149
```

0 commit comments

Comments
 (0)