2010YOUY01 commented on code in PR #578:
URL: https://github.com/apache/sedona-db/pull/578#discussion_r2773421391


##########
rust/sedona-geoparquet/src/file_opener.rs:
##########
@@ -98,11 +106,11 @@ pub(crate) struct GeoParquetFileOpener {
     pub inner: Arc<dyn FileOpener>,
     pub object_store: Arc<dyn ObjectStore>,
     pub metadata_size_hint: Option<usize>,
-    pub predicate: Arc<dyn PhysicalExpr>,
+    pub predicate: Option<Arc<dyn PhysicalExpr>>,
     pub file_schema: SchemaRef,
     pub enable_pruning: bool,
     pub metrics: GeoParquetFileOpenerMetrics,
-    pub overrides: Option<HashMap<String, GeoParquetColumnMetadata>>,
+    pub options: TableGeoParquetOptions,

Review Comment:
   refactor 2: before `overrides` lives inside `TableGeoParquetOptions`, the 
new `validate` flag also lives inside that option, so I think only keeping the 
option here can make it simpler.



##########
rust/sedona-geoparquet/src/format.rs:
##########
@@ -361,7 +362,7 @@ pub struct GeoParquetFileSource {
     inner: ParquetSource,
     metadata_size_hint: Option<usize>,
     predicate: Option<Arc<dyn PhysicalExpr>>,
-    overrides: Option<HashMap<String, GeoParquetColumnMetadata>>,
+    options: TableGeoParquetOptions,

Review Comment:
   refactor 3: similar to another refactor in `file_opener.rs`



##########
rust/sedona-geoparquet/src/file_opener.rs:
##########
@@ -98,11 +106,11 @@ pub(crate) struct GeoParquetFileOpener {
     pub inner: Arc<dyn FileOpener>,
     pub object_store: Arc<dyn ObjectStore>,
     pub metadata_size_hint: Option<usize>,
-    pub predicate: Arc<dyn PhysicalExpr>,
+    pub predicate: Option<Arc<dyn PhysicalExpr>>,

Review Comment:
   refactor 1: before it's required since `GeoParquetFileOpener` is only used 
when there is geo column, and also there is valid spatial predicate, otherwise 
it fall back to inner parquet opener.
   
   Now it also have to be used if validation is enabled, and there is no 
spatial predicate, so making it optional.



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