[SERVER-30751] Test against optimized match expressions in json_schema_parser_test.cpp Created: 18/Aug/17  Updated: 30/Oct/23  Resolved: 23/Oct/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.6.0-rc1

Type: Improvement Priority: Minor - P4
Reporter: David Storch Assignee: Justin Seyster
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-30991 Introduce MatchExpression::optimize() Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2017-10-02, Query 2017-10-23, Query 2017-11-13
Participants:

 Description   

The unoptimized, serialized expressions can be difficult to read. If we implement MatchExpression::optimize(), we should call it in these tests in order to make the assertions a bit easier for a human to digest.



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

Author:

{'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}

Message: SERVER-30751 Use optimized MatchExpressions in JSON parser test.

The JSON Schema parser tests check that the output of the parser
matches an expected MatchExpression. The initial output of the parser
often includes a lot of unnecessary $and and $or stages that make it
confusing to read. Optimizing this output and using that for the check
instead makes the test more readable and adds some additional testing
for the optimizer.

This patch also adds getOptimizer() logic to a few MatchExpression
classes that still needed it.
Branch: master
https://github.com/mongodb/mongo/commit/c981f8578b30c3b8d86dc06605feb292264cebc2

Generated at Thu Feb 08 04:24:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.