forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
38036: opt: fix overflow causing zero row-count r=justinj a=justinj We were subtracting two ints that could overflow and then casting the result to a float64. There's an easy solution to avoid the overflow: just cast each integer to a float64 *before* performing the subtraction. I will backport this to 19.1 and 2.1. Release note (bug fix): Previously, due to a bug when estimating result set sizes in the optimizer, queries involving int ranges that were very large could result in poor plans being generated. Co-authored-by: Justin Jaffray <[email protected]>
- Loading branch information
Showing
2 changed files
with
17 additions
and
3 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