From 9dc336347ed8fa6f000df8ff7ca51df2065c2fd6 Mon Sep 17 00:00:00 2001 From: Daniel Hunte Date: Fri, 13 Dec 2024 17:15:55 -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 | 2 ++ velox/exec/fuzzer/PrestoQueryRunner.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/velox/exec/fuzzer/DuckQueryRunner.cpp b/velox/exec/fuzzer/DuckQueryRunner.cpp index 6fdf10613bb6..472b53230c8e 100644 --- a/velox/exec/fuzzer/DuckQueryRunner.cpp +++ b/velox/exec/fuzzer/DuckQueryRunner.cpp @@ -450,6 +450,8 @@ std::optional DuckQueryRunner::toSql( const std::shared_ptr& joinNode) { 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 0ff5021167e2..d376aefaeda6 100644 --- a/velox/exec/fuzzer/PrestoQueryRunner.cpp +++ b/velox/exec/fuzzer/PrestoQueryRunner.cpp @@ -670,6 +670,8 @@ std::optional PrestoQueryRunner::toSql( const std::shared_ptr& joinNode) { std::stringstream sql; + sql << "SELECT " << folly::join(", ", outputNames); + // Nested loop join without filter. VELOX_CHECK( joinNode->joinCondition() == nullptr,