-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bugs in
Interval::IsTrueWhenAndWith
This function's definition didn't quite meet its specification; in particular, it used an invalid mask. The result was incorrect behavior of all types (false positives & false negatives). This could have caused some incorrect optimization analyses for `PrioritySelect` in the RangeQueryEngine. Making an efficient implementation of this required the new `interval_ops::CoversTernary` function, which tests whether a ternary pattern intersects an `Interval` in O(bits) time. Since this function turned out to be quite complicated, I ended up writing a corresponding proof in the inline comments, and added fuzz testing (which quickly caught several bugs in my first implementation). I also exhaustively tested it for all combinations of 7-bit `Interval`s and 7-bit ternary patterns. (The exhaustive test took several minutes to run on my local machine, so I haven't checked that part in.) PiperOrigin-RevId: 627946453
- Loading branch information
1 parent
dc8f6b0
commit d8b09c6
Showing
12 changed files
with
250 additions
and
38 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
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
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
Oops, something went wrong.