Kontinuation commented on code in PR #43977:
URL: https://github.com/apache/arrow/pull/43977#discussion_r1766340183


##########
cpp/src/parquet/types.cc:
##########
@@ -1603,6 +1646,139 @@ class LogicalType::Impl::Float16 final : public 
LogicalType::Impl::Incompatible,
 
 GENERATE_MAKE(Float16)
 
+#define geometry_edges_string(u___)             \
+  ((u___) == LogicalType::GeometryEdges::PLANAR \
+       ? "planar"                               \
+       : ((u___) == LogicalType::GeometryEdges::SPHERICAL ? "spherical" : 
"unknown"))
+
+#define geometry_encoding_string(u___) \
+  ((u___) == LogicalType::GeometryEncoding::WKB ? "wkb" : "unknown")
+
+class LogicalType::Impl::Geometry final : public 
LogicalType::Impl::Incompatible,
+                                          public 
LogicalType::Impl::SimpleApplicable {
+ public:
+  friend class GeometryLogicalType;
+
+  std::string ToString() const override;
+  std::string ToJSON() const override;
+  format::LogicalType ToThrift() const override;
+  bool Equals(const LogicalType& other) const override;
+
+  const std::string& crs() const { return crs_; }
+  LogicalType::GeometryEdges::edges edges() const { return edges_; }
+  LogicalType::GeometryEncoding::geometry_encoding encoding() const { return 
encoding_; }
+  const std::string& metadata() const { return metadata_; }
+
+ private:
+  Geometry(std::string crs, LogicalType::GeometryEdges::edges edges,
+           LogicalType::GeometryEncoding::geometry_encoding encoding,
+           std::string metadata)
+      : LogicalType::Impl(LogicalType::Type::GEOMETRY, SortOrder::UNKNOWN),

Review Comment:
   This is life-saving. Now all the special handling of geometry statistics for 
unknown sort order has gone away.



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