dcapwell commented on code in PR #3863:
URL: https://github.com/apache/cassandra/pull/3863#discussion_r1939907576


##########
test/unit/org/apache/cassandra/utils/AbstractTypeGenerators.java:
##########
@@ -550,10 +550,11 @@ public static Gen<AbstractType<?>> safeTypeGen()
                                                         
.withoutTypeKinds(COUNTER)
                                                         
.withoutPrimitive(DecimalType.instance)
                                                         // its ordering is 
special...
-                                                        
.withoutPrimitive(DurationType.instance);
-        // composite requires all elements fit into Short.MAX_VALUE bytes
-        // so try to limit the possible expansion of types
-        return baseline.withCompositeElementGen(new 
TypeGenBuilder(baseline).withDefaultSizeGen(1).withMaxDepth(1).build())
+                                                        
.withoutPrimitive(DurationType.instance)
+                                                        // To make sure all 
elements fit within Short.MAX_VALUE bytes,
+                                                        // need to limit the 
possible expansion of types
+                                                        
.withDefaultSizeGen(1).withMaxDepth(1);

Review Comment:
   this makes sure collections/udt/tuple/vector/etc. are also bound.
   
   The top level can be any type, but `list<list<int>>` is no longer possible; 
only `list<int>`



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