diff --git a/velox/exec/fuzzer/DuckQueryRunner.cpp b/velox/exec/fuzzer/DuckQueryRunner.cpp index 6fdf10613bb69..6b7ac7d972a96 100644 --- a/velox/exec/fuzzer/DuckQueryRunner.cpp +++ b/velox/exec/fuzzer/DuckQueryRunner.cpp @@ -448,8 +448,11 @@ std::optional DuckQueryRunner::toSql( std::optional DuckQueryRunner::toSql( const std::shared_ptr& joinNode) { + const auto& outputNames = joinNode->outputType()->names(); std::stringstream sql; + sql << "SELECT " << folly::join(", ", outputNames); + // Nested loop join without filter. VELOX_CHECK( joinNode->joinCondition() == nullptr, diff --git a/velox/exec/fuzzer/PrestoQueryRunner.cpp b/velox/exec/fuzzer/PrestoQueryRunner.cpp index 6c69400525b85..12772bdc3a74c 100644 --- a/velox/exec/fuzzer/PrestoQueryRunner.cpp +++ b/velox/exec/fuzzer/PrestoQueryRunner.cpp @@ -662,8 +662,11 @@ std::optional PrestoQueryRunner::toSql( std::optional PrestoQueryRunner::toSql( const std::shared_ptr& joinNode) { + const auto& outputNames = joinNode->outputType()->names(); std::stringstream sql; + sql << "SELECT " << folly::join(", ", outputNames); + // Nested loop join without filter. VELOX_CHECK( joinNode->joinCondition() == nullptr,