[SERVER-41700] query $type:"xxx" should be covered Created: 13/Jun/19  Updated: 29/Oct/23  Resolved: 20/Dec/19

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

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Sophie Saskin
Resolution: Fixed Votes: 0
Labels: neweng, qopt-team, query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 2019-12-16, Query 2019-12-30
Participants:

 Description   

If I query for value of type string by comparing it to >= '' or for number comparing if it's greater than max negative number, an index will be used without FETCH. However, if the query is {{ a:{$type:'string'} }} we use an index and FETCH.

$type queries should be covered.



 Comments   
Comment by Githook User [ 20/Dec/19 ]

Author:

{'name': 'Sophie Saskin', 'email': 'sophie.saskin@mongodb.com'}

Message: SERVER-41700 query $type:xxx defaults to exact bounds or inexact covered bounds whenever possible
Branch: master
https://github.com/mongodb/mongo/commit/21abe36245600807b68198de636d368f96e669d7

Comment by Ian Boros [ 03/Dec/19 ]

It looks like we've implemented a special case of this for $type "number" only. See here.

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