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

Function ExplainRawCompositeScanToWriter

pg_documentdb/src/index_am/rum.c:1722–1755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1720
1721
1722void
1723ExplainRawCompositeScanToWriter(Relation index_rel, List *indexQuals, List *indexOrderBy,
1724 ScanDirection indexScanDir, pgbson_writer *writer)
1725{
1726 bool supportsOrderedOperatorScans = false;
1727 GetMultikeyStatusFunc multiKeyStatusFunc = NULL;
1728 CanOrderInIndexScan isIndexScanOrdered = NULL;
1729 if (!GetCompositeOpClassWithProps(index_rel, &supportsOrderedOperatorScans,
1730 &multiKeyStatusFunc, &isIndexScanOrdered))
1731 {
1732 return;
1733 }
1734
1735 bool enableCompositeReducedCorrelatedTerms = false;
1736 if (index_rel->rd_opcoptions != NULL)
1737 {
1738 BsonGinCompositePathOptions *options =
1739 (BsonGinCompositePathOptions *) index_rel->rd_opcoptions[0];
1740 pgbson_writer keyWriter;
1741 PgbsonWriterStartDocument(writer, "keyPattern", -1, &keyWriter);
1742 SerializeCompositeIndexKeyForExplainToWriter(
1743 index_rel->rd_opcoptions[0], &keyWriter);
1744 PgbsonWriterEndDocument(writer, &keyWriter);
1745 enableCompositeReducedCorrelatedTerms =
1746 options->enableCompositeReducedCorrelatedTerms;
1747 }
1748
1749 ExplainCompositeProperties(writer, multiKeyStatusFunc, index_rel,
1750 enableCompositeReducedCorrelatedTerms, indexQuals,
1751 indexOrderBy,
1752 supportsOrderedOperatorScans,
1753 PgbsonExplainWriterWriteBool,
1754 PgbsonExplainWriterWriteStringList);
1755}
1756
1757
1758void

Callers 1

LogIndexScanDetailsFunction · 0.85

Tested by

no test coverage detected