Commit 1f171a1
committed
Fix thinko in estimate_num_groups
The code for the reworked n-distinct estimation on commit 7b504eb was
written differently in a previous version of the patch, prior to commit;
on rewriting it, we missed updating an initializer. This caused the
code to (mistakenly) apply a fudge factor even in the case where a
single value is applied, leading to incorrect results.
This means that the 'relvarcount' variable name is now wrong. Add a
comment to try and make the situation clearer, and remove an incorrect
comment I added.
Problem noticed, and code patch, by Tomas Vondra. Additional commentary
by Álvaro.1 parent 827d6f9 commit 1f171a1
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3404 | 3404 | | |
3405 | 3405 | | |
3406 | 3406 | | |
3407 | | - | |
| 3407 | + | |
3408 | 3408 | | |
3409 | 3409 | | |
3410 | 3410 | | |
| |||
3436 | 3436 | | |
3437 | 3437 | | |
3438 | 3438 | | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
3439 | 3443 | | |
3440 | 3444 | | |
3441 | 3445 | | |
| |||
3447 | 3451 | | |
3448 | 3452 | | |
3449 | 3453 | | |
3450 | | - | |
| 3454 | + | |
3451 | 3455 | | |
3452 | 3456 | | |
3453 | 3457 | | |
| |||
0 commit comments