feat: make geodatafusion/geoarrow optional via geo feature flag#5934
Merged
wjones127 merged 4 commits intolance-format:mainfrom Feb 23, 2026
Merged
feat: make geodatafusion/geoarrow optional via geo feature flag#5934wjones127 merged 4 commits intolance-format:mainfrom
geo feature flag#5934wjones127 merged 4 commits intolance-format:mainfrom
Conversation
jackye1995
approved these changes
Feb 11, 2026
Contributor
jackye1995
left a comment
There was a problem hiding this comment.
thanks for adding this, mostly looks good to me, pending CI
Contributor
Author
|
I am working on more gracefull error reporting when user uses GEO functions when GEO is featured out |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
a35265b to
725e4ec
Compare
Make geospatial dependencies (geodatafusion, geoarrow-array, geoarrow-schema, geo-traits, geo-types) optional across the lance crate stack via a new `geo` feature flag. This allows consumers that don't need spatial indexing or geospatial UDFs to avoid pulling in ~40 transitive dependencies and the associated runtime overhead of registering geo UDFs in every DataFusion SessionContext. The `geo` feature is enabled by default in the top-level `lance` crate, preserving backward compatibility. Consumers can opt out with `default-features = false`. Crates modified: - lance-geo: all geo deps made optional, bbox module gated - lance-datafusion: lance-geo made optional, geo UDF registration gated - lance-index: lance-geo + geoarrow deps optional, rtree module and RTreeIndexPlugin registration gated, geo bench requires feature - lance: geo feature added to defaults, propagates to sub-crates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the `geo` feature is not enabled, users now get actionable errors and graceful degradation instead of confusing failures: - Registry: "No plugin for name 'rtree'" error now suggests enabling the `geo` feature - scalar_index_info: skips unsupported geo indices with a warning, allowing non-geo filtered scans to work on datasets with RTree indices - remap_index: drops geo indices gracefully during compaction instead of failing the entire operation - merge_indices: skips index merge for unavailable plugins instead of blocking append operations - UDFs: registers stub ST_* functions that return clear "enable geo feature" errors instead of DataFusion's generic "Unknown function" - Dead code: gates GeoQuery, RelationQuery, and GeoQueryParser behind #[cfg(feature = "geo")] since they are unreachable without it Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0e88c7b to
09188a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make geospatial dependencies (geodatafusion, geoarrow-array, geoarrow-schema, geo-traits, geo-types) optional across the lance crate stack via a new
geofeature flag.This allows consumers that don't need spatial indexing or geospatial UDFs to avoid pulling in ~40 transitive dependencies and the associated runtime overhead of registering geo UDFs in every DataFusion SessionContext.
The
geofeature is enabled by default in the top-levellancecrate, preserving backward compatibility. Consumers can opt out withdefault-features = false.Crates modified: