Commit c954d49
committed
Extend ExecBuildAggTrans() to support a NULL pointer check.
Optionally push a step to check for a NULL pointer to the pergroup
state.
This will be important for disk-based hash aggregation in combination
with grouping sets. When memory limits are reached, a given tuple may
find its per-group state for some grouping sets but not others. For
the former, it advances the per-group state as normal; for the latter,
it skips evaluation and the calling code will have to spill the tuple
and reprocess it in a later batch.
Add the NULL check as a separate expression step because in some
common cases it's not needed.
Discussion: https://postgr.es/m/20200221202212.ssb2qpmdgrnx52sj%40alap3.anarazel.de1 parent 3ed2005 commit c954d49
File tree
6 files changed
+101
-7
lines changed- src
- backend
- executor
- jit/llvm
- include/executor
6 files changed
+101
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
2924 | 2925 | | |
2925 | 2926 | | |
2926 | 2927 | | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2927 | 2931 | | |
2928 | 2932 | | |
2929 | 2933 | | |
2930 | | - | |
| 2934 | + | |
2931 | 2935 | | |
2932 | 2936 | | |
2933 | 2937 | | |
| |||
3158 | 3162 | | |
3159 | 3163 | | |
3160 | 3164 | | |
3161 | | - | |
| 3165 | + | |
| 3166 | + | |
3162 | 3167 | | |
3163 | 3168 | | |
3164 | 3169 | | |
| |||
3177 | 3182 | | |
3178 | 3183 | | |
3179 | 3184 | | |
3180 | | - | |
| 3185 | + | |
| 3186 | + | |
3181 | 3187 | | |
3182 | 3188 | | |
3183 | 3189 | | |
| |||
3227 | 3233 | | |
3228 | 3234 | | |
3229 | 3235 | | |
3230 | | - | |
| 3236 | + | |
| 3237 | + | |
3231 | 3238 | | |
3232 | 3239 | | |
| 3240 | + | |
3233 | 3241 | | |
3234 | 3242 | | |
3235 | 3243 | | |
3236 | 3244 | | |
3237 | 3245 | | |
3238 | 3246 | | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
3239 | 3258 | | |
3240 | 3259 | | |
3241 | 3260 | | |
| |||
3303 | 3322 | | |
3304 | 3323 | | |
3305 | 3324 | | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
3306 | 3335 | | |
3307 | 3336 | | |
3308 | 3337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
1603 | 1604 | | |
1604 | 1605 | | |
1605 | 1606 | | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
1606 | 1623 | | |
1607 | 1624 | | |
1608 | 1625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2928 | 2928 | | |
2929 | 2929 | | |
2930 | 2930 | | |
2931 | | - | |
| 2931 | + | |
| 2932 | + | |
2932 | 2933 | | |
2933 | 2934 | | |
2934 | 2935 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2046 | 2046 | | |
2047 | 2047 | | |
2048 | 2048 | | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2049 | 2088 | | |
2050 | 2089 | | |
2051 | 2090 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
625 | 633 | | |
626 | 634 | | |
627 | 635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
0 commit comments