[SERVER-69172] [CQF] Add generative test for array traversal semantics Created: 25/Aug/22  Updated: 20/Apr/23  Resolved: 20/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: David Percy Assignee: Backlog - Query Optimization
Resolution: Won't Fix Votes: 0
Labels: testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Participants:

 Description   

Let create a test that focuses on dotted paths and array traversal. For example, given a predicate with a dotted path like {'a.b.c': {$eq: 2}}, there is a wide variety of input data that is interesting to test:

  • 'a' might be missing, or a scalar
  • 'a' might be an object, in which:
    • 'b' might be missing, scalar, object, array ...
  • 'a' might be an array, in which the elements are:
    • scalars, objects, arrays ...

The path 'a.b.c' can pick out zero, one, or many values depending on where the arrays / scalars / missing fields are. So another thing we can vary is: how many leaves match the {$eq: 2} predicate? zero, one or many.



 Comments   
Comment by David Percy [ 19/Jan/23 ]

Updated title/description because I don't think a golden test is the right way to do this--the output is too large to review.

sbe_abt_diff_test.cpp might be a good place.

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