divjotarora commented on code in PR #3876:
URL: https://github.com/apache/parquet-java/pull/3876#discussion_r4493533196


##########
parquet-column/src/main/java/org/apache/parquet/schema/Types.java:
##########
@@ -846,10 +850,46 @@ public THIS addFields(Type... types) {
 
     @Override
     protected GroupType build(String name) {
-      if (newLogicalTypeSet) {
-        return new GroupType(repetition, name, logicalTypeAnnotation, fields, 
id);
-      } else {
-        return new GroupType(repetition, name, getOriginalType(), fields, id);
+      GroupType group = newLogicalTypeSet
+          ? new GroupType(repetition, name, logicalTypeAnnotation, fields, id)
+          : new GroupType(repetition, name, getOriginalType(), fields, id);
+      if (logicalTypeAnnotation instanceof FiniteVectorLogicalTypeAnnotation) {
+        checkFiniteVector(group);

Review Comment:
   Ack, I think that's what I was missing earlier and why I'd put all of this 
in the `GroupType` constructors before. Your suggestion makes sense, I'll look 
into it.



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