usql update

This commit is contained in:
2022-03-08 17:48:14 +01:00
parent 55ee694f6f
commit 65abc2fd07
6 changed files with 42 additions and 11 deletions

View File

@@ -173,6 +173,9 @@ std::unique_ptr<ValueNode> USql::eval_function_value_node(Table *table, Row &row
evaluatedPars.push_back(eval_value_node(table, row, param.get(), nullptr, nullptr));
}
// coalesce function can have first parameter null, so must be calles before following "return null"
if (fnc->function == FunctionNode::Type::coalesce) return coalesce_function(evaluatedPars);
if (evaluatedPars.empty() || evaluatedPars[0]->isNull())
return std::make_unique<NullValueNode>();