diff --git a/src/shared/services/bolt/boltMappings.js b/src/shared/services/bolt/boltMappings.js index c3c8b1edb25..8b8962747f9 100644 --- a/src/shared/services/bolt/boltMappings.js +++ b/src/shared/services/bolt/boltMappings.js @@ -95,24 +95,16 @@ export function extractPlan (result, calculateTotalDbHits = false) { const boltPlanToRESTPlanShared = plan => { return { operatorType: plan.operatorType, - LegacyExpression: plan.arguments.LegacyExpression, - ExpandExpression: plan.arguments.ExpandExpression, DbHits: plan.dbHits, Rows: plan.rows, - EstimatedRows: plan.arguments.EstimatedRows, identifiers: plan.identifiers, - Index: plan.arguments.Index, - children: plan.children.map(boltPlanToRESTPlanShared) + children: plan.children.map(_ => ({ + ..._.arguments, + ...boltPlanToRESTPlanShared(_) + })) } } - let obj = boltPlanToRESTPlanShared(rawPlan) - obj['runtime-impl'] = rawPlan.arguments['runtime-impl'] - obj['planner-impl'] = rawPlan.arguments['planner-impl'] - obj['version'] = rawPlan.arguments['version'] - obj['KeyNames'] = rawPlan.arguments['KeyNames'] - obj['planner'] = rawPlan.arguments['planner'] - obj['runtime'] = rawPlan.arguments['runtime'] - obj['Signature'] = rawPlan.arguments['Signature'] + let obj = { ...rawPlan.arguments, ...boltPlanToRESTPlanShared(rawPlan) } if (calculateTotalDbHits === true) { obj.totalDbHits = collectHits(obj) diff --git a/src/shared/services/bolt/boltMappings.test.js b/src/shared/services/bolt/boltMappings.test.js index 9938e7ff987..261eff469bc 100644 --- a/src/shared/services/bolt/boltMappings.test.js +++ b/src/shared/services/bolt/boltMappings.test.js @@ -371,7 +371,7 @@ describe('boltMappings', () => { expect(extractedPlan.Signature).toEqual('Signature') } - test.skip('should extract plan from result summary', () => { + test('should extract plan from result summary', () => { // Given const result = { summary: { @@ -382,7 +382,7 @@ describe('boltMappings', () => { checkExtractedPlan(extractedPlan) }) - test.skip('should extract profile from result summary', () => { + test('should extract profile from result summary', () => { // Given const profile = createPlan() profile.dbHits = 20