From 2d832eef4f4132af147481ad87b0a72875764739 Mon Sep 17 00:00:00 2001 From: Masha Basmanova Date: Tue, 26 Mar 2024 08:09:40 -0700 Subject: [PATCH] Delete unused ExpressionFuzzer::generateXxxArgs methods (#9256) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/9256 Reviewed By: pedroerp Differential Revision: D55368519 fbshipit-source-id: 1d1759ae7dd6c20a6acc10e0d1104098dad39de1 --- velox/expression/tests/ExpressionFuzzer.cpp | 22 --------------------- velox/expression/tests/ExpressionFuzzer.h | 15 -------------- 2 files changed, 37 deletions(-) diff --git a/velox/expression/tests/ExpressionFuzzer.cpp b/velox/expression/tests/ExpressionFuzzer.cpp index ec99da84e3a3..d954ea984a47 100644 --- a/velox/expression/tests/ExpressionFuzzer.cpp +++ b/velox/expression/tests/ExpressionFuzzer.cpp @@ -940,28 +940,6 @@ core::TypedExprPtr ExpressionFuzzer::generateArg( } } -// Specialization for the "empty_approx_set" function: first optional -// parameter needs to be constant. -std::vector ExpressionFuzzer::generateEmptyApproxSetArgs( - const CallableSignature& input) { - if (input.args.empty()) { - return {}; - } - return {generateArgConstant(input.args[0])}; -} - -// Specialization for the "regexp_replace" function: second and third -// (optional) parameters always need to be constant. -std::vector ExpressionFuzzer::generateRegexpReplaceArgs( - const CallableSignature& input) { - std::vector inputExpressions = { - generateArg(input.args[0]), generateArgConstant(input.args[1])}; - if (input.args.size() == 3) { - inputExpressions.emplace_back(generateArgConstant(input.args[2])); - } - return inputExpressions; -} - std::vector ExpressionFuzzer::generateSwitchArgs( const CallableSignature& input) { VELOX_CHECK_EQ( diff --git a/velox/expression/tests/ExpressionFuzzer.h b/velox/expression/tests/ExpressionFuzzer.h index da6e50a28adc..fcc7bee02a27 100644 --- a/velox/expression/tests/ExpressionFuzzer.h +++ b/velox/expression/tests/ExpressionFuzzer.h @@ -239,21 +239,6 @@ class ExpressionFuzzer { core::TypedExprPtr generateArg(const TypePtr& arg, bool isConstant); - /// Specialization for the "like" function: second and third (optional) - /// parameters always need to be constant. - std::vector generateLikeArgs( - const CallableSignature& input); - - /// Specialization for the "empty_approx_set" function: first optional - /// parameter needs to be constant. - std::vector generateEmptyApproxSetArgs( - const CallableSignature& input); - - /// Specialization for the "regexp_replace" function: second and third - /// (optional) parameters always need to be constant. - std::vector generateRegexpReplaceArgs( - const CallableSignature& input); - // Return a vector of expressions for each argument of callable in order. std::vector getArgsForCallable( const CallableSignature& callable);