forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0c7d537
committed
Move estimate_hashagg_tablesize to selfuncs.c, and widen result to double.
It seems to make more sense for this to be in selfuncs.c, since it'slargely a statistical-estimation thing, and it's related to otherfunctions like estimate_hash_bucket_stats that are there.While at it, change the result type from Size to double. Perhaps at onepoint it was impossible for the result to overflow an integer, butI've got no confidence in that proposition anymore. Nothing's actuallydone with the result except to compare it to a work_mem-based limit,so as long as we don't get an overflow on the way to that comparison,things should be fine even with very large dNumGroups.Code movement proposed by Antonin Houska, type change by meDiscussion:https://postgr.es/m/25767.1549359615@localhost1 parentf9692a7 commit0c7d537
File tree
3 files changed
+48
-44
lines changed- src
- backend
- optimizer/plan
- utils/adt
- include/utils
3 files changed
+48
-44
lines changedLines changed: 7 additions & 44 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 | 151 |
| |
155 | 152 |
| |
156 | 153 |
| |
| |||
3659 | 3656 |
| |
3660 | 3657 |
| |
3661 | 3658 |
| |
3662 |
| - | |
3663 |
| - | |
3664 |
| - | |
3665 |
| - | |
3666 |
| - | |
3667 |
| - | |
3668 |
| - | |
3669 |
| - | |
3670 |
| - | |
3671 |
| - | |
3672 |
| - | |
3673 |
| - | |
3674 |
| - | |
3675 |
| - | |
3676 |
| - | |
3677 |
| - | |
3678 |
| - | |
3679 |
| - | |
3680 |
| - | |
3681 |
| - | |
3682 |
| - | |
3683 |
| - | |
3684 |
| - | |
3685 |
| - | |
3686 |
| - | |
3687 |
| - | |
3688 |
| - | |
3689 |
| - | |
3690 |
| - | |
3691 |
| - | |
3692 |
| - | |
3693 |
| - | |
3694 |
| - | |
3695 |
| - | |
3696 | 3659 |
| |
3697 | 3660 |
| |
3698 | 3661 |
| |
| |||
4130 | 4093 |
| |
4131 | 4094 |
| |
4132 | 4095 |
| |
4133 |
| - | |
| 4096 | + | |
4134 | 4097 |
| |
4135 | 4098 |
| |
4136 | 4099 |
| |
| |||
4297 | 4260 |
| |
4298 | 4261 |
| |
4299 | 4262 |
| |
4300 |
| - | |
4301 |
| - | |
4302 |
| - | |
| 4263 | + | |
| 4264 | + | |
| 4265 | + | |
4303 | 4266 |
| |
4304 | 4267 |
| |
4305 | 4268 |
| |
| |||
6424 | 6387 |
| |
6425 | 6388 |
| |
6426 | 6389 |
| |
6427 |
| - | |
| 6390 | + | |
6428 | 6391 |
| |
6429 | 6392 |
| |
6430 | 6393 |
| |
| |||
6735 | 6698 |
| |
6736 | 6699 |
| |
6737 | 6700 |
| |
6738 |
| - | |
| 6701 | + | |
6739 | 6702 |
| |
6740 | 6703 |
| |
6741 | 6704 |
| |
| |||
6768 | 6731 |
| |
6769 | 6732 |
| |
6770 | 6733 |
| |
6771 |
| - | |
| 6734 | + | |
6772 | 6735 |
| |
6773 | 6736 |
| |
6774 | 6737 |
| |
|
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
| 116 | + | |
116 | 117 |
| |
117 | 118 |
| |
118 | 119 |
| |
| |||
3428 | 3429 |
| |
3429 | 3430 |
| |
3430 | 3431 |
| |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
3431 | 3469 |
| |
3432 | 3470 |
| |
3433 | 3471 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 |
| |
190 | 193 |
| |
191 | 194 |
| |
|
0 commit comments
Comments
(0)