message: Fix for filter pushdown into left join: properly handle case where optimizer splits single expression into multiple expressions (fixes
diff: #include "duckdb/planner/expression_iterator.hpp"
  #include "duckdb/planner/operator/logical_comparison_join.hpp"
  #include "duckdb/planner/operator/logical_filter.hpp"
  +#include "duckdb/execution/expression_executor.hpp"
  using namespace duckdb;
  using namespace std;
  @@ -39,19 +40,22 @@ static bool FilterRemovesNull(ExpressionRewriter &rewriter, Expression *expr, un
  auto filter = make_unique<LogicalFilter>();
  filter->expressions.push_back(move(copy));
  rewriter.Apply(*filter);
  - assert(filter->expressions.size() == 1);
  - if (filter->expressions[0]->type != ExpressionType::VALUE_CONSTANT) {
  - // could not flatten the result
  - assert(!filter->expressions[0]->IsFoldable());
  + // check if all expressions are foldable
  + for(idx_t i = 0; i < filter->expressions.size(); i++) {
  + if (!filter->expressions[i]->IsFoldable()) {
  return false;
  }
  // we flattened the result into a scalar, check if it is FALSE or NULL
  - auto val = ((BoundConstantExpression &)*filter->expressions[0]).value.CastAs(TypeId::BOOL);
  + auto val = ExpressionExecutor::EvaluateScalar(*filter->expressions[i]).CastAs(TypeId::BOOL);
  // if the result of the expression with all expressions replaced with NULL is "NULL" or "false"
  // then any extra entries generated by the LEFT OUTER JOIN will be filtered out!
  // hence the LEFT OUTER JOIN is equivalent to an inner join
  - return val.is_null || !val.value_.boolean;
  + if (val.is_null || !val.value_.boolean) {
  + return true;
  + }
  + }
  + return false;
  }
  unique_ptr<LogicalOperator> FilterPushdown::PushdownLeftJoin(unique_ptr<LogicalOperator> op,
  