[pkg/ottl] Mathematical Expressions are able to handle time.Time
and time.Duration
types.
#22009
Labels
time.Time
and time.Duration
types.
#22009
Uh oh!
There was an error while loading. Please reload this page.
In order to support complex interactions with time we need to support the following cases in our mathematical expressions:
time.Time
fromtime.Time
must result in atime.Duration
.time.Duration
to atime.Time
must result in atime.Time
time.Duration
from atime.Time
must result in atime.Time
time.Duration
to atime.Duration
must result in atime.Duration
time.Duration
from atime.Duration
must result in atime.Duration
Only these type interactions should be supported. For example, the following SHOULD NOT be allowed:
time.Time
.time.Duration
.At the moment these rules cannot be enforced by the grammar, instead we will have to enforce these rules in the execution of the mathematical expressions. This is the existing pattern we use for other type checking.
The text was updated successfully, but these errors were encountered: