steveloughran commented on code in PR #3508:
URL: https://github.com/apache/parquet-java/pull/3508#discussion_r3221230410
##########
parquet-column/src/main/java/org/apache/parquet/column/statistics/geospatial/GeospatialStatistics.java:
##########
@@ -43,14 +43,22 @@ public class GeospatialStatistics {
public static class Builder {
private BoundingBox boundingBox;
private GeospatialTypes geospatialTypes;
- private final WKBReader reader = new WKBReader();
+ private WKBReader reader;
/**
* Create a builder to create a GeospatialStatistics.
*/
public Builder() {
this.boundingBox = new BoundingBox();
this.geospatialTypes = new GeospatialTypes();
+ this.reader = new WKBReader();
+ }
+
+ /**
+ * Internal constructor that skips field initialization for subclasses
that don't need it.
+ */
+ Builder(boolean noop) {
Review Comment:
It's a workaround to add second empty constructor, isn't it?
what about having a protected builder(box, types, reader) which the base
builder invokes with those newly created types, and which the subclass calls
with (null, null, null)? That makes clear what it is doing: creating an
instance with no values
--
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]