Kontinuation commented on code in PR #57:
URL: https://github.com/apache/sedona-db/pull/57#discussion_r2340915878


##########
rust/sedona-geoparquet/src/file_opener.rs:
##########
@@ -200,7 +200,13 @@ fn geoparquet_file_geo_stats(
             // If this column is in the GeoParquet metadata, construct actual 
statistics
             // (otherwise, construct unspecified statistics)
             if let Some(column_metadata) = metadata.columns.get(field.name()) {
-                Ok(column_metadata.to_geo_statistics())
+                if is_prunable_geospatial_field(field) {
+                    Ok(column_metadata.to_geo_statistics())
+                } else {
+                    // Bounding box based pruning does not work for geography 
fields, so we remove
+                    // the bbox from statistics to ensure that they are not 
used for pruning.
+                    Ok(column_metadata.to_geo_statistics().with_bbox(None))
+                }

Review Comment:
   Good idea.



-- 
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]

Reply via email to