paleolimbot commented on code in PR #8943:
URL: https://github.com/apache/arrow-rs/pull/8943#discussion_r2586350834


##########
parquet/src/arrow/schema/extension.rs:
##########
@@ -133,3 +148,44 @@ pub(crate) fn logical_type_for_string(field: &Field) -> 
Option<LogicalType> {
 pub(crate) fn logical_type_for_string(_field: &Field) -> Option<LogicalType> {
     Some(LogicalType::String)
 }
+
+#[cfg(feature = "geospatial")]
+pub(crate) fn logical_type_for_binary(field: &Field) -> Option<LogicalType> {
+    use parquet_geospatial::WkbType;
+    use parquet_geospatial::WkbTypeHint;
+
+    match field.extension_type_name() {

Review Comment:
   I think with this added in we should be able to test this in 
parquet/tests/geospatial.rs by tacking on the expected field metadata here:
   
   
https://github.com/apache/arrow-rs/blob/b93fa52e47a83dff130709a6e80a4be5017dbf09/parquet/tests/geospatial.rs#L41-L44
   
   ...and by using the Arrow schema converter to create the Parquet schema 
instead of doing it by hand here:
   
   
https://github.com/apache/arrow-rs/blob/b93fa52e47a83dff130709a6e80a4be5017dbf09/parquet/tests/geospatial.rs#L409-L420



##########
parquet-geospatial/src/types.rs:
##########
@@ -0,0 +1,393 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use arrow::error::Result;

Review Comment:
   I think this is also available from `arrow_schema`? (I have no idea what the 
conventions are in these crates)



##########
parquet/src/basic.rs:
##########
@@ -1017,6 +1017,24 @@ impl fmt::Display for EdgeInterpolationAlgorithm {
     }
 }
 
+impl FromStr for EdgeInterpolationAlgorithm {
+    type Err = ParquetError;
+
+    fn from_str(s: &str) -> Result<Self> {
+        match s.to_ascii_uppercase().as_str() {
+            "SPHERICAL" => Ok(EdgeInterpolationAlgorithm::SPHERICAL),

Review Comment:
   Is there a good spot in this file to add a test for this? (I think there are 
also some tests for testing time unit serialization somewhere)



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