From 8dda84bb0c019fcc17e28aec1c41d3e75db48c7d Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 19 Dec 2022 12:38:10 +0200 Subject: [PATCH] cql3: expr: fix function evaluation with NULL inputs Function call evaluation rejects NULL inputs, unnecssarily. Functions work well with NULL inputs. Fix by relaxing the check. This currently has no impact because functions are not evaluated via expressions, but via selectors. --- cql3/expr/expression.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/cql3/expr/expression.cc b/cql3/expr/expression.cc index 6678f36fc7..235e7170f6 100644 --- a/cql3/expr/expression.cc +++ b/cql3/expr/expression.cc @@ -2137,9 +2137,6 @@ static cql3::raw_value evaluate(const function_call& fun_call, const evaluation_ for (const expression& arg : fun_call.args) { cql3::raw_value arg_val = evaluate(arg, inputs); - if (arg_val.is_null()) { - throw exceptions::invalid_request_exception(format("Invalid null value for argument to {}", *scalar_fun)); - } arguments.emplace_back(to_bytes_opt(std::move(arg_val))); }