Skip to content

Commit

Permalink
Fix fuzz different output types for generated expression sets in expr…
Browse files Browse the repository at this point in the history
…ession fuzzer (#7910)

Summary:
Pull Request resolved: #7910

A previous refactor resulted in a bug that makes all the fields of the fuzzed expression
final output be of the same type.

This fix it.

Reviewed By: kagamiori

Differential Revision: D51926820

fbshipit-source-id: 4b1fc0e035d9d1887ad1a2dc7183849bcc3783c4
  • Loading branch information
laithsakka authored and facebook-github-bot committed Dec 7, 2023
1 parent 8374e66 commit db64f6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions velox/expression/tests/ExpressionFuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,10 +1009,9 @@ ExpressionFuzzer::FuzzedExpressionData ExpressionFuzzer::fuzzExpressions(
VELOX_CHECK_EQ(
state.remainingLevelOfNesting_, std::max(1, options_.maxLevelOfNesting));

auto outType = fuzzReturnType();

std::vector<core::TypedExprPtr> expressions;
for (int i = 0; i < numberOfExpressions; i++) {
auto outType = fuzzReturnType();
expressions.push_back(generateExpression(outType));
}
return {
Expand Down

0 comments on commit db64f6f

Please sign in to comment.