| 1126 | |
| 1127 | |
| 1128 | static void |
| 1129 | LogSortKeys(pgbson_writer *writer, Sort *plan, PlanState *leftTree, int numPresorted) |
| 1130 | { |
| 1131 | if (plan->numCols > 0) |
| 1132 | { |
| 1133 | pgbson_writer sortKeyWriter; |
| 1134 | PgbsonWriterStartDocument(writer, "sortPattern", -1, &sortKeyWriter); |
| 1135 | LogSortKeysCore(&sortKeyWriter, plan, leftTree, 0, plan->numCols); |
| 1136 | PgbsonWriterEndDocument(writer, &sortKeyWriter); |
| 1137 | |
| 1138 | if (numPresorted > 0) |
| 1139 | { |
| 1140 | PgbsonWriterAppendInt32(writer, "numPresortedKeys", -1, numPresorted); |
| 1141 | pgbson_writer presortedKeyWriter; |
| 1142 | PgbsonWriterStartDocument(writer, "preSortedKeys", -1, &presortedKeyWriter); |
| 1143 | LogSortKeysCore(&presortedKeyWriter, plan, leftTree, 0, numPresorted); |
| 1144 | PgbsonWriterEndDocument(writer, &presortedKeyWriter); |
| 1145 | } |
| 1146 | } |
| 1147 | } |
| 1148 | |
| 1149 | |
| 1150 | static void |
no test coverage detected