ffacs commented on code in PR #2032:
URL: https://github.com/apache/orc/pull/2032#discussion_r2134773446


##########
java/core/src/java/org/apache/orc/TypeDescription.java:
##########
@@ -44,12 +44,28 @@ public class TypeDescription
   public static final long MAX_DECIMAL64 = 999_999_999_999_999_999L;
   public static final long MIN_DECIMAL64 = -MAX_DECIMAL64;
   private static final int DEFAULT_LENGTH = 256;
+  private static final String DEFAULT_CRS = "OGC:CRS84";
   static final Pattern UNQUOTED_NAMES = Pattern.compile("^[a-zA-Z0-9_]+$");
 
   // type attributes
   public static final String ENCRYPT_ATTRIBUTE = "encrypt";
   public static final String MASK_ATTRIBUTE = "mask";
 
+  public enum EdgeInterpolationAlgorithm {
+    SPHERICAL("spherical"),
+    VINCENTY("vincenty"),
+    THOMAS("thomas"),
+    ANDOYER("andoyer"),
+    KARNEY("karney");
+
+    EdgeInterpolationAlgorithm(String name) {
+      this.name = name;
+    }
+    final String name;
+  }

Review Comment:
   Done



##########
java/core/src/java/org/apache/orc/OrcUtils.java:
##########
@@ -325,6 +354,43 @@ TypeDescription 
convertTypeFromProtobuf(List<OrcProto.Type> types,
           result.withPrecision(type.getPrecision());
         }
         break;
+      case GEOMETRY:
+        result = TypeDescription.createGeometry();
+        if (type.hasCrs()) {
+          result.withCRS(type.getCrs());
+        }
+        break;
+      case GEOGRAPHY:
+        result = TypeDescription.createGeography();
+        if (type.hasCrs()) {
+          result.withCRS(type.getCrs());
+        }
+        switch (type.getAlgorithm()) {
+          case SPHERICAL:
+            result.withEdgeInterpolationAlgorithm(
+                    TypeDescription.EdgeInterpolationAlgorithm.SPHERICAL);
+            break;
+          case VINCENTY:
+            result.withEdgeInterpolationAlgorithm(
+                    TypeDescription.EdgeInterpolationAlgorithm.VINCENTY);
+            break;
+          case THOMAS:
+            result.withEdgeInterpolationAlgorithm(
+                    TypeDescription.EdgeInterpolationAlgorithm.THOMAS);
+            break;
+          case ANDOYER:
+            result.withEdgeInterpolationAlgorithm(
+                    TypeDescription.EdgeInterpolationAlgorithm.ANDOYER);
+            break;
+          case KARNEY:
+            result.withEdgeInterpolationAlgorithm(
+                    TypeDescription.EdgeInterpolationAlgorithm.KARNEY);

Review Comment:
   Done



##########
java/core/src/java/org/apache/orc/GeospatialColumnStatistics.java:
##########
@@ -0,0 +1,28 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>

Review Comment:
   Done



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