You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to facilitate contexts returning time fields as time.Time and their inclusion in mathematical expressions we need to be able to compare time.Duration values in boolean expressions. Although not supported by the grammar as literals, OTTL should allow working with these types.
When comparing time.Duration fields, the following rules should be followed:
Use Go comparison for int64.
If either A or B is not a duration, the comparison is false.
The text was updated successfully, but these errors were encountered:
Description: Allows time comparison by enabling boolean behavior for
time objects.
Link to tracking Issue: Closes#22713
Testing: Unit tests
Documentation:
---------
Co-authored-by: Tyler Helmuth <[email protected]>
Component(s)
pkg/ottl
Describe the issue you're reporting
In order to facilitate contexts returning time fields as
time.Time
and their inclusion in mathematical expressions we need to be able to comparetime.Duration
values in boolean expressions. Although not supported by the grammar as literals, OTTL should allow working with these types.When comparing
time.Duration
fields, the following rules should be followed:If either A or B is not a duration, the comparison is false.
The text was updated successfully, but these errors were encountered: