MCPcopy Create free account
hub / github.com/documentdb/documentdb / LogSortKeys

Function LogSortKeys

pg_documentdb/src/explain/documentdb_explain.c:1128–1147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126
1127
1128static void
1129LogSortKeys(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
1150static void

Callers 1

WritePlanStateFunction · 0.85

Calls 4

LogSortKeysCoreFunction · 0.85
PgbsonWriterEndDocumentFunction · 0.85
PgbsonWriterAppendInt32Function · 0.85

Tested by

no test coverage detected