rdblue commented on code in PR #3072:
URL: https://github.com/apache/parquet-java/pull/3072#discussion_r2023622669
##########
parquet-format-structures/src/main/java/org/apache/parquet/format/LogicalTypes.java:
##########
@@ -53,4 +53,10 @@ public static LogicalType DECIMAL(int scale, int precision) {
public static final LogicalType JSON = LogicalType.JSON(new JsonType());
public static final LogicalType BSON = LogicalType.BSON(new BsonType());
public static final LogicalType FLOAT16 = LogicalType.FLOAT16(new
Float16Type());
+
+ public static final LogicalType VARIANT() {
Review Comment:
It looks like this is attempting to copy the declared constants, but is a
method. It doesn't need to be a method because it produces the same value every
time. I would recommend updating this to produce a constant using a `private`
`static` method to produce the `VariantType` instance:
```java
public static final LogicalType VARIANT = LogicalType.VARIANT(variant());
private static VariantType variant() {
VariantType variant = new VariantType();
variant.setSpecification_version((byte) 1);
return variant;
}
```
--
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]