From ead999ade622d8df8a4c566d64b74b38e2c7deb8 Mon Sep 17 00:00:00 2001 From: Daniel Hunte Date: Sun, 15 Dec 2024 20:41:12 -0800 Subject: [PATCH] fix(fuzzer): Fix toSql methods for NestedLoopJoinNode in Reference Query Runners (#11576) Summary: The select clause is completely missing in the produced query string. Reviewed By: kagamiori Differential Revision: D66132514 --- velox/exec/fuzzer/DuckQueryRunner.cpp | 1 + velox/exec/fuzzer/PrestoQueryRunner.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/velox/exec/fuzzer/DuckQueryRunner.cpp b/velox/exec/fuzzer/DuckQueryRunner.cpp index 6fdf10613bb6..d6d606f6497e 100644 --- a/velox/exec/fuzzer/DuckQueryRunner.cpp +++ b/velox/exec/fuzzer/DuckQueryRunner.cpp @@ -449,6 +449,7 @@ std::optional DuckQueryRunner::toSql( std::optional DuckQueryRunner::toSql( const std::shared_ptr& joinNode) { std::stringstream sql; + sql << "SELECT " << folly::join(", ", joinNode->outputType()->names()); // Nested loop join without filter. VELOX_CHECK( diff --git a/velox/exec/fuzzer/PrestoQueryRunner.cpp b/velox/exec/fuzzer/PrestoQueryRunner.cpp index 0ff5021167e2..c8bba9cdb64d 100644 --- a/velox/exec/fuzzer/PrestoQueryRunner.cpp +++ b/velox/exec/fuzzer/PrestoQueryRunner.cpp @@ -669,6 +669,7 @@ std::optional PrestoQueryRunner::toSql( std::optional PrestoQueryRunner::toSql( const std::shared_ptr& joinNode) { std::stringstream sql; + sql << "SELECT " << folly::join(", ", joinNode->outputType()->names()); // Nested loop join without filter. VELOX_CHECK(