From 7c743da93646be894e08bdfbea417cd1976115c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Tue, 11 Oct 2022 13:32:43 +0200 Subject: [PATCH] Fix aggregate attribute expr type guessing for functions --- pkg/dal/def_aggregate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/dal/def_aggregate.go b/pkg/dal/def_aggregate.go index 12eb4f0d8..8aff2449b 100644 --- a/pkg/dal/def_aggregate.go +++ b/pkg/dal/def_aggregate.go @@ -3,6 +3,7 @@ package dal import ( "context" "fmt" + "strings" "github.com/cortezaproject/corteza-server/pkg/filter" "github.com/cortezaproject/corteza-server/pkg/ql" @@ -255,7 +256,7 @@ func (def *Aggregate) determineAttrType(base AggregateAttr, ss []AttributeMappin } if a.Ref != "" { - tmp := refToGvalExp[a.Ref] + tmp := refToGvalExp[strings.ToLower(a.Ref)] if tmp == nil || tmp.OutType == nil || tmp.OutTypeUnknown { return true, a, nil }