distribute Value logic to each implementation

This commit is contained in:
Asdine El Hrychy
2024-01-20 18:47:14 +04:00
parent f970bc625e
commit 21ac003166
16 changed files with 1299 additions and 501 deletions

View File

@@ -363,7 +363,7 @@ func (m *MinAggregator) Aggregate(env *environment.Environment) error {
}
if m.Min.Type() == v.Type() || m.Min.Type().IsNumber() && v.Type().IsNumber() {
ok, err := types.IsGreaterThan(m.Min, v)
ok, err := m.Min.GT(v)
if err != nil {
return err
}
@@ -467,7 +467,7 @@ func (m *MaxAggregator) Aggregate(env *environment.Environment) error {
}
if m.Max.Type() == v.Type() || m.Max.Type().IsNumber() && v.Type().IsNumber() {
ok, err := types.IsLesserThan(m.Max, v)
ok, err := m.Max.LT(v)
if err != nil {
return err
}