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


##########
test/unit/org/apache/cassandra/utils/ASTGenerators.java:
##########
@@ -534,16 +563,45 @@ private static void values(RandomnessSource rnd,
             }
             else
             {
-                //TODO (coverage): support IN rather than just EQ
                 for (Symbol s : columns)
                     builder.value(s, 
columnExpressions.get(s).build().generate(rnd));
             }
         }
 
+        private static void where(RandomnessSource rnd,
+                                  Map<Symbol, ExpressionBuilder> 
columnExpressions,
+                                  Conditional.ConditionalBuilder<?> builder,
+                                  LinkedHashSet<Symbol> columns,
+                                  @Nullable Gen<? extends Map<Symbol, Object>> 
gen)
+        {
+            if (gen != null)
+            {
+                Map<Symbol, Object> map = gen.generate(rnd);
+                for (Map.Entry<Symbol, ?> e : 
assertDeterministic(map).entrySet())
+                    builder.value(e.getKey(), valueGen(e.getValue(), 
e.getKey().type()).generate(rnd));
+                return;
+            }
+
+            for (Symbol s : columns)
+            {
+                if (SourceDSL.booleans().all().generate(rnd))
+                {
+                    builder.value(s, 
columnExpressions.get(s).build().generate(rnd));
+                    continue;
+                }
+                var valueGen = columnExpressions.get(s).build();
+                builder.in(s, SourceDSL.lists().of(valueGen).ofSizeBetween(1, 
3).generate(rnd));
+            }
+        }
+
         public Gen<Mutation> build()
         {
             Gen<Boolean> bool = SourceDSL.booleans().all();
             Map<? extends AbstractType<?>, List<Reference>> typeToReference = 
references.stream().collect(Collectors.groupingBy(Reference::type));
+            if (allowUpdateMultipleClusteringKeys

Review Comment:
   see here for details: 
https://the-asf.slack.com/archives/CK23JSY2K/p1744146663569859



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to