Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add GEOS library as an optional dependency #12243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wraymo
Copy link

@wraymo wraymo commented Feb 3, 2025

Summary
This PR introduces GEOS as an optional dependency, marking the first step in splitting #12053 to enable geospatial support.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 3, 2025
Copy link

netlify bot commented Feb 3, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 1660caa
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67a4eea3fffc650008b22c08

Copy link
Collaborator

@czentgr czentgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this.

CMakeLists.txt Outdated
@@ -138,6 +138,7 @@ option(VELOX_ENABLE_ABFS "Build Abfs Connector" OFF)
option(VELOX_ENABLE_HDFS "Build Hdfs Connector" OFF)
option(VELOX_ENABLE_PARQUET "Enable Parquet support" ON)
option(VELOX_ENABLE_ARROW "Enable Arrow support" OFF)
option(VELOX_ENABLE_GEO "Enable Geospatial support" ON)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should turn this OFF by default for now. Otherwise, we just bundle it needlessly.

We should add this to the setup scripts to make it a system dependency.

Copy link
Author

@wraymo wraymo Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review, updated the code

@@ -78,7 +78,7 @@ function install_velox_deps_from_dnf {
dnf_install libevent-devel \
openssl-devel re2-devel libzstd-devel lz4-devel double-conversion-devel \
libdwarf-devel elfutils-libelf-devel curl-devel libicu-devel bison flex \
libsodium-devel zlib-devel
libsodium-devel zlib-devel geos-devel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the geos versions be pinned ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current version is 3.10.1-1.el9 (an old version). I can replace it with geos-devel-3.10.1-1.el9. Does that work for you? Also, do you want to pin the version for the Ubuntu setup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinning to some top level like 3.10.1 is good enough :)

@@ -138,6 +138,7 @@ option(VELOX_ENABLE_ABFS "Build Abfs Connector" OFF)
option(VELOX_ENABLE_HDFS "Build Hdfs Connector" OFF)
option(VELOX_ENABLE_PARQUET "Enable Parquet support" ON)
option(VELOX_ENABLE_ARROW "Enable Arrow support" OFF)
option(VELOX_ENABLE_GEO "Enable Geospatial support" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add VELOX_ENABLE_GEO to the adapters build : https://github.com/facebookincubator/velox/blob/main/.github/workflows/linux-build-base.yml#L87 ?
If it doesnt get exercised by default, we need a signal these changes pass CI.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

Copy link
Contributor

@kgpai kgpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ;
Would be great if you can pin the versions. Thanks !

@@ -78,7 +78,7 @@ function install_velox_deps_from_dnf {
dnf_install libevent-devel \
openssl-devel re2-devel libzstd-devel lz4-devel double-conversion-devel \
libdwarf-devel elfutils-libelf-devel curl-devel libicu-devel bison flex \
libsodium-devel zlib-devel
libsodium-devel zlib-devel geos-devel-3.10.1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking (this may be my ignorance here): We are using Geos 3.13.0 above and 3.10.1 (devel) here. Is that fine or will that break things?

Copy link
Author

@wraymo wraymo Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It looks like only brew keeps the version up to date (3.13.0), while the latest versions available are 3.10.1 in epel and 3.12.1 in apt. Based on the release logs of GEOS, there don't seem to be any missing features relevant to our requirements, but I'm unsure about the performance differences.

One option is to remove it as a system dependency, similar to what we did for simdjson or xsimd. For example, we don't install libsimdjson-dev or simdjson-devel in the Ubuntu and CentOS setup scripts (even though they're available) but only include them in the macOS setup script. In CMakeLists.txt, we just specify the minimum version in resolve_dependency in case the user uses a non-bundled version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants