[SERVER-80315] grouped_match_push_down.js wrong assert on getStageSequence() result Created: 22/Aug/23  Updated: 29/Oct/23  Resolved: 06/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.1.0-rc0
Fix Version/s: 7.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kevin Cherkauer Assignee: Matt Olma
Resolution: Fixed Votes: 0
Labels: query-optimization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

jstests/aggregation/sources/group/grouped_match_push_down.js function assertOptimizeMatchRenameAggregationPipelineWithDottedRename() has an incorrect assertion in it on the result of child call getStageSequence():

assert(getStageSequence(explainOutput), stageSequence);

This assert() should actually be assertEq(). As it stands, this assert always passes because it asserts that the result from getStageSequence() is defined (which it always is), and it will print the value of 'stageSequence' as the error message if this is false.

The intention of this is to assertEq() that the result from getStageSequence() matches the value of 'stageSequence'.

Introduced to 7.1.0-rc0 by SERVER-73253.



 Comments   
Comment by Githook User [ 04/Oct/23 ]

Author:

{'name': 'Matt Olma', 'email': 'matt.olma@mongodb.com', 'username': 'mattsimply'}

Message: SERVER-80315: grouped_match_push_down.js wrong assert on getStageSequence() result
Branch: master
https://github.com/mongodb/mongo/commit/5b11c22c6cc9366c03951bb4f6ed53c871e87f9a

Comment by Kevin Cherkauer [ 22/Aug/23 ]

Note: the corrected test will fail in all-feature-flag runs due to featureFlagSbeFull causing plan differences due to PM-3162. The fixed version will need to include alternative expected stages for that based on

// TODO SERVER-72549: Remove 'featureFlagSbeFull' used by SBE Pushdown feature here and below.
const featureFlagSbeFull = checkSBEEnabled(db, ["featureFlagSbeFull"]); 

See jstests/aggregation/optimize_away_pipeline.js for a concrete example.

Comment by Kevin Cherkauer [ 22/Aug/23 ]

matt.olma@mongodb.com Sent this your way as you created this test recently, but if it needs to go to someone else or backlog, no problem.

Generated at Thu Feb 08 06:43:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.