-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2024-02-19
-
35
We currently support dateDiff() only because the time field has a declared type that allows the removal of the extra checks on the input type.
Writing the query
[{$match: { "$expr": { "$gt": [ { "$dateDiff": { "startDate": "$time", "endDate": new Date(datePrefix + 150), "unit": "millisecond" } }, 0 ] } } }]
generates a plan using the non-optimized tree that includes a few calls to typeMatch() that, being not yet supported, don't allow the vectorized execution of dateDiff().
Probably this is caused by not forwarding the type information into the conversion from ABT to EExpr
- causes
-
SERVER-90683 Type checker removes $switch that has no "default" branch
- Closed