Implement AVG, COUNT, MAX, MIN, SUM functions

This commit is contained in:
Pijus Kamandulis
2024-03-11 19:10:41 +02:00
parent b72bba86c8
commit 6ed74688ca
7 changed files with 1429 additions and 560 deletions

View File

@@ -119,9 +119,23 @@ const (
FunctionCallSetIntersect FunctionCallType = "SetIntersect"
FunctionCallSetUnion FunctionCallType = "SetUnion"
FunctionCallAggregateAvg FunctionCallType = "AggregateAvg"
FunctionCallAggregateCount FunctionCallType = "AggregateCount"
FunctionCallAggregateMax FunctionCallType = "AggregateMax"
FunctionCallAggregateMin FunctionCallType = "AggregateMin"
FunctionCallAggregateSum FunctionCallType = "AggregateSum"
FunctionCallIn FunctionCallType = "In"
)
var AggregateFunctions = []FunctionCallType{
FunctionCallAggregateAvg,
FunctionCallAggregateCount,
FunctionCallAggregateMax,
FunctionCallAggregateMin,
FunctionCallAggregateSum,
}
type FunctionCall struct {
Arguments []interface{}
Type FunctionCallType