* Show the Split key for an SplitTuple */
| 3272 | * Show the Split key for an SplitTuple |
| 3273 | */ |
| 3274 | static void |
| 3275 | show_tuple_split_keys(TupleSplitState *tstate, List *ancestors, |
| 3276 | ExplainState *es) |
| 3277 | { |
| 3278 | TupleSplit *plan = (TupleSplit *)tstate->ss.ps.plan; |
| 3279 | |
| 3280 | ancestors = lcons(tstate, ancestors); |
| 3281 | |
| 3282 | List *context; |
| 3283 | bool useprefix; |
| 3284 | List *result = NIL; |
| 3285 | /* Set up deparsing context */ |
| 3286 | context = set_deparse_context_plan(es->deparse_cxt, |
| 3287 | (Plan *) plan, |
| 3288 | ancestors); |
| 3289 | useprefix = (list_length(es->rtable) > 1 || es->verbose); |
| 3290 | |
| 3291 | StringInfoData buf; |
| 3292 | initStringInfo(&buf); |
| 3293 | |
| 3294 | ListCell *lc; |
| 3295 | foreach(lc, plan->dqa_expr_lst) |
| 3296 | { |
| 3297 | DQAExpr *dqa_expr = (DQAExpr *)lfirst(lc); |
| 3298 | result = lappend(result, |
| 3299 | deparse_expression((Node *) dqa_expr, context, |
| 3300 | useprefix, true)); |
| 3301 | } |
| 3302 | ExplainPropertyList("Split by Col", result, es); |
| 3303 | |
| 3304 | if (plan->numCols > 0) |
| 3305 | show_sort_group_keys(outerPlanState(tstate), "Group Key", |
| 3306 | plan->numCols, 0, plan->grpColIdx, |
| 3307 | NULL, NULL, NULL, |
| 3308 | ancestors, es); |
| 3309 | |
| 3310 | ancestors = list_delete_first(ancestors); |
| 3311 | } |
| 3312 | |
| 3313 | /* |
| 3314 | * Show the grouping keys for an Agg node. |
no test coverage detected