message: Added tests fot the like optimizations.
diff: #include "duckdb/planner/binder.hpp"
  #include "duckdb/planner/expression/bound_operator_expression.hpp"
  #include "test_helpers.hpp"
  -#include <duckdb/optimizer/like_optimizer.hpp>
  -#include <duckdb/optimizer/optimizer.hpp>
  +#include "duckdb/optimizer/rule/like_optimizations.hpp"
  using namespace duckdb;
  using namespace std;
  +TEST_CASE("Test Like Optimization Rules", "[like-optimizer]") {
  + ExpressionHelper helper;
  +
  + REQUIRE(helper.AddColumns("S VARCHAR").empty());
  +
  + helper.AddRule<LikeOptimizationRule>();
  +
  + string input, expected_output;
  +
  + input = "S ~~ 'aaa%'";
  + expected_output = "prefix(S, 'aaa')";
  + REQUIRE(helper.VerifyRewrite(input, expected_output));
  +
  + input = "S ~~ '%aaa'";
  + expected_output = "suffix(S, 'aaa')";
  + REQUIRE(helper.VerifyRewrite(input, expected_output));
  +
  + input = "S ~~ '%aaa%'";
  + expected_output = "contains(S, 'aaa')";
  + REQUIRE(helper.VerifyRewrite(input, expected_output));
  +
  + // REQUIRE_FAIL ----------------
  + input = "S ~~ 'a_a%'";
  + expected_output = "prefix(S, 'aaa')";
  + REQUIRE(helper.VerifyRewrite(input, expected_output, true) == false);
  +
  + input = "S ~~ '%a_a'";
  + expected_output = "suffix(S, 'aaa')";
  + REQUIRE(helper.VerifyRewrite(input, expected_output, true) == false);
  +
  + input = "S ~~ '%a_a%'";
  + expected_output = "contains(S, 'a_a')";
  + REQUIRE(helper.VerifyRewrite(input, expected_output, true) == false);
  +}
  +
  TEST_CASE("Test Like Optimizer", "[like-optimizer]") {
  unique_ptr<QueryResult> result;
  ExpressionHelper helper;
  @@ -30,8 +64,7 @@ TEST_CASE("Test Like Optimizer", "[like-optimizer]") {
  Value pattern = ExpressionExecutor::EvaluateScalar(*like_func_expr.children[1]);
  assert(pattern.str_value == "w%");
  - LikeOptimizer like_opt(optimizer);
  - auto pref_plan = like_opt.Rewrite(move(tree->children[0]));
  + auto pref_plan = optimizer.Optimize(move(tree->children[0]));
  assert(pref_plan->type == LogicalOperatorType::FILTER);
  // testing if the optimizer transform LIKE into a scalar prefix function
  @@ -62,8 +95,9 @@ TEST_CASE("Test Like Optimizer", "[like-optimizer]") {
  Value pattern = ExpressionExecutor::EvaluateScalar(*like_func_expr.children[1]);
  assert(pattern.str_value == "%tern");
  - LikeOptimizer like_opt(optimizer);
  - auto suff_plan = like_opt.Rewrite(move(tree->children[0]));
  +// LikeOptimizer like_opt(optimizer);
  +// auto suff_plan = like_opt.Rewrite(move(tree->children[0]));
  + auto suff_plan = optimizer.Optimize(move(tree->children[0]));
  assert(suff_plan->type == LogicalOperatorType::FILTER);
  // testing if the optimizer transform LIKE into a scalar suffix function
  @@ -94,8 +128,9 @@ TEST_CASE("Test Like Optimizer", "[like-optimizer]") {
  Value pattern = ExpressionExecutor::EvaluateScalar(*like_func_expr.children[1]);
  assert(pattern.str_value == "%h%");
  - LikeOptimizer like_opt(optimizer);
  - auto contains_plan = like_opt.Rewrite(move(tree->children[0]));
  +// LikeOptimizer like_opt(optimizer);
  +// auto contains_plan = like_opt.Rewrite(move(tree->children[0]));
  + auto contains_plan = optimizer.Optimize(move(tree->children[0]));
  assert(contains_plan->type == LogicalOperatorType::FILTER);
  // testing if the optimizer transform LIKE into a scalar contains function
  