-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/sem: add check for interval for asof.DatumToHLC()
fixes #91021 Currently, if the given interval for `AS OF SYSTEM TIME interval` is a small postive duration, the query will incorrectly pass. It's because when we call `clock.Now()`, it has passed the threashold ('statement timestamp + duration'). Now we add a check for the duration value. It has to be negative, with the absolute value >= a nanosecond. Similarly, when the logic is used under the SPLIT stmt, the interval's value has to be positive (for the experation duration), with an absolute value >= a nanosecond. link epic CRDB-17785 Release note (bug fix): add restriction for duration value for AS OF SYSTEM TIME and SPLIT statement.
- Loading branch information
1 parent
916ca31
commit cd07b13
Showing
4 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters