petern48 commented on code in PR #385:
URL: https://github.com/apache/sedona-db/pull/385#discussion_r2573091444
##########
rust/sedona-expr/src/spatial_filter.rs:
##########
@@ -389,6 +394,82 @@ impl SpatialFilter {
}
}
+/// Table GeoStatistics
+///
+/// Enables providing a collection of GeoStatistics to
[SpatialFilter::evaluate]
+/// such that attemmpts to access out-of-bounds values results in an readable
+/// error.
+pub enum TableGeoStatistics {
+ /// Provide statistics for every Column in the table. These must be
+ /// [GeoStatistics::unspecified] for non-spatial columns.
+ ///
+ /// These are resolved using [Column::index].
+ ByPosition(Vec<GeoStatistics>),
+
+ /// Provide statistics for specific named columns. Columns not included
+ /// are treated as [GeoStatistics::unspecified].
+ ///
+ /// These are resolved using [Column::name]. While the column name is
+ /// typically intended for debugging, at least some DataFusion versions
+ /// pass a filter to the data source with an incorrect index but a correct
+ /// name <https://github.com/apache/sedona-db/pull/385>. This option may
+ /// be removed if the incorrect index can be resolved upstream.
Review Comment:
If you have any (and I mean any) hunches of what the exact behavior causing
this in DataFusion is, now would be a good time to mention it while you're
fresh off your investigation. Not top priority, but I'd eventually like to
narrow it down enough to submit an issue at least.
##########
rust/sedona-expr/src/spatial_filter.rs:
##########
@@ -389,6 +394,82 @@ impl SpatialFilter {
}
}
+/// Table GeoStatistics
+///
+/// Enables providing a collection of GeoStatistics to
[SpatialFilter::evaluate]
+/// such that attemmpts to access out-of-bounds values results in an readable
Review Comment:
```suggestion
/// such that attempts to access out-of-bounds values results in a readable
```
nit: spelling and grammar :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]