wgtmac commented on code in PR #240:
URL: https://github.com/apache/parquet-format/pull/240#discussion_r1698623982


##########
src/main/thrift/parquet.thrift:
##########
@@ -237,6 +237,83 @@ struct SizeStatistics {
    3: optional list<i64> definition_level_histogram;
 }
 
+/**
+ * Interpretation for edges of GEOMETRY logical type, i.e. whether the edge
+ * between points represent a straight cartesian line or the shortest line on
+ * the sphere. Please note that it only applies to polygons.
+ */
+enum Edges {
+  PLANAR = 0;
+  SPHERICAL = 1;
+}
+
+/**
+ * A custom WKB-encoded polygon or multi-polygon to represent a covering of
+ * geometries. For example, it may be a bounding box, or an evelope of 
geometries
+ * when a bounding box cannot be built (e.g. a geometry has spherical edges, 
or if
+ * an edge of geographic coordinates crosses the antimeridian). In addition, 
it can
+ * also be used to provide vendor-agnostic coverings like S2 or H3 grids.
+ */
+struct Covering {
+  /** Bytes of a WKB-encoded geometry */
+  1: required binary geometry;
+  /** Edges of the geometry, which is independent of edges from the logical 
type */
+  2: required Edges edges;

Review Comment:
   This new design of `Covering` looks flexible to me. If this is desired, I 
can change the PR to adopt it.
   
   > How will the update function work for the covering (WKT polygon / S2 / 
H3)? 
   
   I think implementations can use any kind of representation (geometry, 
bounding box, long list, etc). We just need to serialize them into thrift 
objects when the statistics are finalized.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to