* Select the current grouping set; affects current_set and * curaggcontext. */
| 489 | * curaggcontext. |
| 490 | */ |
| 491 | static void |
| 492 | select_current_set(AggState *aggstate, int setno, bool is_hash) |
| 493 | { |
| 494 | /* |
| 495 | * When changing this, also adapt ExecAggPlainTransByVal() and |
| 496 | * ExecAggPlainTransByRef(). |
| 497 | */ |
| 498 | if (is_hash) |
| 499 | aggstate->curaggcontext = aggstate->hashcontext; |
| 500 | else |
| 501 | aggstate->curaggcontext = aggstate->aggcontexts[setno]; |
| 502 | |
| 503 | aggstate->current_set = setno; |
| 504 | } |
| 505 | |
| 506 | /* |
| 507 | * Switch to phase "newphase", which must either be 0 or 1 (to reset) or |
no outgoing calls
no test coverage detected