arouel opened a new issue, #3507:
URL: https://github.com/apache/parquet-java/issues/3507

   ### Describe the enhancement requested
   
   `GeospatialStatistics.noopBuilder()` is called for every non-geometry column 
in every row group. Today, each call allocates a new `NoopBuilder` (plus a 
`WKBReader`, `BoundingBox`, and `GeospatialTypes` that are never used), and 
each `build()` allocates a new `GeospatialStatistics(null, null)` that is 
immediately discarded.
   
   Since `NoopBuilder` carries no state and all its methods are no-ops, it can 
be a singleton. Its `build()` result is equally stateless (null fields, with 
merge/abort guarded by null checks), so it can be cached too.
   
   ### Proposed Changes
   - Make `NoopBuilder` a singleton via a static `INSTANCE` field
   - Cache `build()` output as a static `EMPTY` instance
   - Add a package-private super constructor that skips field initialization so 
the singleton doesn't allocate unused objects
   
   This eliminates per-column-per-row-group allocations on the common path 
where geospatial statistics are disabled.
   
   ### Component(s)
   
   Core


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