jstests/noPassthrough/sbe_pipeline_plan_cache_key_reporting.js
/**
 * This function validates given explain and return and object with extracted and validated
 * PlanCacheKey and QueryHash.
 * @returns {planCacheKey, queryHash, explain}
 */
This function validates given explain and return and object with extracted and validated
PlanCacheKey and QueryHash.
@returns {planCacheKey, queryHash, explain}
This function validates given explain and return and object with extracted and validated PlanCacheKey and QueryHash . @returns { planCacheKey queryHash explain }
function processAndValidateExplain(explain, assertMessage) {
    assert.neq(explain, null);
    assert.eq(explain.explainVersion,
              "2",
              `[${assertMessage}] invalid explain version ${tojson(explain)}`);
    const planCacheKey = explain.queryPlanner.planCacheKey;
    validateKey(planCacheKey, `[${assertMessage}] Invalid planCacheKey: ${tojson(explain)}`);
    const queryHash = explain.queryPlanner.queryHash;
    validateKey(queryHash, `[${assertMessage}] Invalid queryHash: ${tojson(explain)}`);
    return {planCacheKey, queryHash, explain};
}
function processAndValidateExplain ( explain , assertMessage ) { assert . neq ( explain , null ) ; assert . eq ( explain . explainVersion , "2" , ` ${ assertMessage } ${ tojson ( explain ) } ` ) ; const planCacheKey = explain . queryPlanner . planCacheKey ; validateKey ( planCacheKey , ` ${ assertMessage } ${ tojson ( explain ) } ` ) ; const queryHash = explain . queryPlanner . queryHash ; validateKey ( queryHash , ` ${ assertMessage } ${ tojson ( explain ) } ` ) ; return { planCacheKey , queryHash , explain } ; }
This function validates given explain and return and object with extracted and validated
 PlanCacheKey and QueryHash.
This function validates given explain and return and object with extracted and validated PlanCacheKey and QueryHash .