File tree Expand file tree Collapse file tree
parquet-column/src/main/java/org/apache/parquet/column/statistics/geometry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,12 +48,23 @@ public class GeospatialStatistics {
4848 */
4949 private boolean valid = true ;
5050
51+ /**
52+ * Merge the statistics from another GeospatialStatistics object.
53+ *
54+ * @param other the other GeospatialStatistics object
55+ */
5156 public void mergeStatistics (GeospatialStatistics other ) {
57+ if (!valid ) return ;
58+
5259 if (other == null ) {
5360 return ;
5461 }
55- this .boundingBox .merge (other .boundingBox );
56- this .geospatialTypes .merge (other .geospatialTypes );
62+ if (this .boundingBox != null && other .boundingBox != null ) {
63+ this .boundingBox .merge (other .boundingBox );
64+ }
65+ if (this .geospatialTypes != null && other .geospatialTypes != null ) {
66+ this .geospatialTypes .merge (other .geospatialTypes );
67+ }
5768 }
5869
5970 /**
@@ -247,6 +258,16 @@ public GeospatialStatistics build() {
247258 stats .valid = false ; // Mark as invalid since this is a noop builder
248259 return stats ;
249260 }
261+
262+ @ Override
263+ public void update (Binary value ) {
264+ // do nothing
265+ }
266+
267+ @ Override
268+ public void abort () {
269+ // do nothing
270+ }
250271 }
251272
252273 /**
You can’t perform that action at this time.
0 commit comments