zhangfengcdt commented on code in PR #44:
URL: https://github.com/apache/sedona-db/pull/44#discussion_r2335105836


##########
rust/sedona-geoparquet/src/provider.rs:
##########
@@ -78,22 +78,38 @@ pub async fn geoparquet_listing_table(
 #[derive(Default, Clone)]
 pub struct GeoParquetReadOptions<'a> {
     inner: ParquetReadOptions<'a>,
+    table_options: Option<HashMap<String, String>>,
 }
 
 impl GeoParquetReadOptions<'_> {
     /// Create a new GeoParquetReadOptions with default values
     pub fn new() -> Self {
         Default::default()
     }
+
+    /// Create GeoParquetReadOptions from table options HashMap
+    pub fn from_table_options(options: HashMap<String, String>) -> Self {
+        GeoParquetReadOptions {
+            inner: ParquetReadOptions::default(),
+            table_options: Some(options),
+        }
+    }
 }
 
 #[async_trait]
 impl ReadOptions<'_> for GeoParquetReadOptions<'_> {
     fn to_listing_options(
         &self,
         config: &SessionConfig,
-        table_options: TableOptions,
+        mut table_options: TableOptions,
     ) -> ListingOptions {
+        // Merge custom table options if provided
+        if let Some(ref custom_options) = self.table_options {
+            for (key, value) in custom_options {
+                let _ = table_options.set(key, value);
+            }
+        }

Review Comment:
   I added some logic to validate the aws options from the end users.



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