Class GeometryFieldMetrics

java.lang.Object
org.apache.iceberg.FieldMetrics<GeospatialBound>
org.apache.iceberg.GeometryFieldMetrics

public class GeometryFieldMetrics extends FieldMetrics<GeospatialBound>
Field-level metrics for a geometry column, tracked by the Parquet writer.

The Parquet footer's lexicographic min/max over the WKB bytes is not meaningful for spatial values, so the writer instead scans each value's coordinates with a GeometryBoundsBuilder and accumulates a two-dimensional bounding box. The resulting FieldMetrics carries the box's lower and upper corners as GeospatialBound points, which serialize through the existing geometry conversion path. The null value count is left at zero here; it is reconciled by the optional-field writer that owns null accounting.

The average WKB size over the non-null values is also tracked, matching the avg_value_size_in_bytes metric that the counts-only geospatial writer produces, so adding bounds does not drop that metric for generic Parquet geometry writes.