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.
This commit is contained in:
Avi Kivity
2022-12-19 12:38:10 +02:00
parent ecdd49317a
commit 8dda84bb0c

View File

@@ -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)));
}