basic version of coalesce function

This commit is contained in:
2022-03-08 17:35:08 +01:00
parent 056b45c831
commit 038d891db5
6 changed files with 56 additions and 22 deletions

View File

@@ -132,6 +132,7 @@ struct FunctionNode : Node {
pp,
lower,
upper,
coalesce,
min,
max,
count
@@ -144,6 +145,7 @@ struct FunctionNode : Node {
if (str=="pp") return Type::pp;
if (str=="lower") return Type::lower;
if (str=="upper") return Type::upper;
if (str=="coalesce") return Type::coalesce;
if (str=="min") return Type::min;
if (str=="max") return Type::max;
if (str=="count") return Type::count;
@@ -158,6 +160,7 @@ struct FunctionNode : Node {
if (type == Type::pp) return "pp";
if (type == Type::lower) return "lower";
if (type == Type::upper) return "upper";
if (type == Type::coalesce) return "coalesce";
if (type == Type::min) return "min";
if (type == Type::max) return "max";
if (type == Type::count) return "count";
@@ -166,7 +169,7 @@ struct FunctionNode : Node {
};
Type function;
Type function;
std::vector<std::unique_ptr<Node>> params;
FunctionNode(std::string func_name, std::vector<std::unique_ptr<Node>> pars) :