manuzhang commented on code in PR #2682:
URL: https://github.com/apache/datafusion-comet/pull/2682#discussion_r2492494260
##########
fuzz-testing/src/main/scala/org/apache/comet/fuzz/QueryGen.scala:
##########
@@ -103,7 +104,12 @@ object QueryGen {
val func = Utils.randomChoice(Meta.scalarFunc, r)
try {
val signature = Utils.randomChoice(func.signatures, r)
- val args = signature.inputTypes.map(x => pickRandomColumn(r, table, x))
+ val args =
+ if (signature.varArgs) {
+ pickRandomColumns(r, table, signature.inputTypes.head)
Review Comment:
Yes, it's easier to implement and avoid refactoring `pickRandomColumn` and
other methods.
##########
fuzz-testing/src/main/scala/org/apache/comet/fuzz/QueryGen.scala:
##########
@@ -103,7 +104,12 @@ object QueryGen {
val func = Utils.randomChoice(Meta.scalarFunc, r)
try {
val signature = Utils.randomChoice(func.signatures, r)
- val args = signature.inputTypes.map(x => pickRandomColumn(r, table, x))
+ val args =
+ if (signature.varArgs) {
+ pickRandomColumns(r, table, signature.inputTypes.head)
Review Comment:
Yes, it's easier to implement, and avoid refactoring `pickRandomColumn` and
other methods.
--
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]