-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Description
Consider the following:
print
date(2001) between (date(2000) .. date(null)), // null: possibly true
date(2001) between (date(null) .. date(2002)), // null: possibly true
date(2001) between (date(2002) .. date(null)), // false: impossible
date(2001) between (date(null) .. date(2000)), // false: impossible
date(2001) between (date(2000) .. timespan(null)), // false: possibly true!
date(2001) between (date(2002) .. timespan(null)) // null: possibly true for negative timespanIn the case of a null timespan, returning false seems incorrect, since the expression could be true if the unknown timespan has a suitable positive value. In the case where the left value is greater than the expression value, the result could still be true for a suitable negative timespan, so returning null seems correct.
Kusto supports between with negative timespans, but not reversed left/right bounds:
print
date(2001-05-05) between (date(2001-05-10) .. -10d), // true
date(2001-05-05) between (date(2001-05-10) .. date(2001-05-01)) // falseIs the above expected behavior?
Metadata
Metadata
Assignees
Labels
No labels