nssalian commented on code in PR #16818:
URL: https://github.com/apache/iceberg/pull/16818#discussion_r3418392367
##########
parquet/src/main/java/org/apache/iceberg/parquet/VariantShreddingAnalyzer.java:
##########
@@ -407,10 +418,14 @@ private static Type createPrimitiveTypedValue(FieldInfo
info, PhysicalType primi
/** Tracks occurrence count and types for a single field. */
private static class FieldInfo {
- private final Map<PhysicalType, Integer> typeCounts = Maps.newHashMap();
+ private static final PhysicalType[] PHYSICAL_TYPES = PhysicalType.values();
+
+ private final int[] typeCounts = new int[PHYSICAL_TYPES.length];
private int maxDecimalScale = 0;
private int maxDecimalIntegerDigits = 0;
private int observationCount = 0;
+ private boolean mostCommonComputed = false;
+ private PhysicalType mostCommonCached = null;
Review Comment:
Good call out. Fixed.
--
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]