zeroshade commented on code in PR #1533:
URL: https://github.com/apache/arrow-go/pull/1533#discussion_r4553277616


##########
parquet/file/column_writer.go:
##########
@@ -125,7 +125,19 @@ type columnWriter struct {
        // It is tracked once per column chunk (i.e. per row group), never per
        // page since Parquet format defines GeospatialStatistics only on
        // ColumnMetaData
-       geoStatistics      *metadata.GeoStatistics
+       geoStatistics *metadata.GeoStatistics
+
+       // countGeoNulls is set for GEOMETRY and GEOGRAPHY columns with
+       // statistics enabled. Their sort order is undefined, so they have no
+       // typed statistics, but the chunk still gets a Statistics block holding
+       // only null_count (the spec forbids min/max for these types, but says
+       // writers should still write null_count). Some readers, such as DuckDB,
+       // ignore geospatial_statistics unless a Statistics block is present.
+       countGeoNulls bool

Review Comment:
   nit: the spec's "should always write `null_count`" applies to every type 
with an undefined sort order, not only the geo types (INTERVAL, for example). 
This could be a general counter rather than a geo-specific one. Keeping this PR 
to GEOMETRY and GEOGRAPHY is fine; generalizing could be a follow-up.



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