Trait GeoStatsAccumulator

Source
pub trait GeoStatsAccumulator: Send {
    // Required methods
    fn is_valid(&self) -> bool;
    fn update_wkb(&mut self, wkb: &[u8]);
    fn finish(&mut self) -> Option<Box<GeospatialStatistics>>;
}
Expand description

Dynamic GeospatialStatistics accumulator

The GeoStatsAccumulator is a trait whose implementors can ingest the (non-null) elements of a column and return compliant GeospatialStatistics (or None). When built with geospatial support this will usually be the [ParquetGeoStatsAccumulator]

Required Methods§

Source

fn is_valid(&self) -> bool

Returns true if this instance can return GeospatialStatistics from GeoStatsAccumulator::finish.

This method returns false when this crate is built without geospatial support (i.e., from the VoidGeoStatsAccumulator) or if the accumulator encountered invalid or unsupported elements for which it cannot compute valid statistics.

Source

fn update_wkb(&mut self, wkb: &[u8])

Update with a single slice of WKB-encoded values

This method is infallible; however, in the event of improperly encoded values, implementations must ensure that GeoStatsAccumulator::finish returns None.

Source

fn finish(&mut self) -> Option<Box<GeospatialStatistics>>

Compute the final statistics and reset internal state

Implementors§